Bug 286143 - Uploading a new example results in an empty file
Summary: Uploading a new example results in an empty file
Status: RESOLVED DUPLICATE of bug 281850
Alias: None
Product: cirkuit
Classification: Applications
Component: general (show other bugs)
Version: 0.4.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Matteo Agostinelli
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-08 22:40 UTC by Orestes Mas
Modified: 2011-11-10 17:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Debugging output when uploading an example file (59.81 KB, text/plain)
2011-11-10 12:58 UTC, Orestes Mas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Orestes Mas 2011-11-08 22:40:19 UTC
Version:           0.4.1 (using KDE 4.7.2) 
OS:                Linux

When I try to use the menu option to download examples (from Get New Hot
Stuff website), I got a list of examples. Currently (Nov'2011) there are only two examples: one uploaded by cirkuit's author (Agostinelly) and another uploaded by myself (after Bug 285993 was fixed by Agostinelly, thanks!)

Downloading the Agostinelli's example works fine, but when I try to download my contributed examples I always get the "Unknown Open collaboration Service API error (103)" message.


Reproducible: Always

Steps to Reproduce:
Try to download cirkuit example provided by orestesmas

Actual Results:  
Cannot download

Expected Results:  
Example downloaded and installed into the corresponding directory
Comment 1 Matteo Agostinelli 2011-11-09 09:23:33 UTC
For some reason, the example you created was not uploaded correctly. If you visit the webpage http://kde-files.org/content/show.php/Biquad+circuit?content=146632, you'll see that there is no content (the download button is missing). I've just uploaded another example and it seems to work properly. Downloading the other examples also works.

Did you upload the example using Cirkuit? Can you try re-submitting it?
Comment 2 Orestes Mas 2011-11-09 23:12:20 UTC
I've tried to re-submit it, with same result.

However, as I launched cirkuit from the command line, I noted that some messages sent out to the console when uploading content may indicate the source of error:

*********************
Parameter map:  QMap(("changelog", "Re-upload and added comment about cirkuit configuration")("description", "A low-to-mid-complexity circuit showing some drawing tricks.")("downloadbuy1", "0")("downloadbuyprice1", "0")("downloadbuyreason1", "")("licensetype", "10")("name", "Biquad circuit")("type", "658")("version", "0.2")) 
OCS Request:  QUrl( "https://username:password@api.opendesktop.org/v1/content/edit/146632" )  
XML Returned:
 "<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
</ocs>
" 
XML Returned:
 "<?xml version="1.0"?>
<ocs>
 <meta>
  <status>failed</status>
  <statuscode>102</statuscode>
  <message>localfile not found</message>
 </meta>
</ocs>
" 
PostJob::parse "<?xml version="1.0"?>
<ocs>
 <meta>
  <status>failed</status>
  <statuscode>102</statuscode>
  <message>localfile not found</message>
 </meta>
</ocs>
" 

So the error seems to be "localfile not found", which may indicate cirkuit is looking into the wrong place for the file to upload.

I must add that the file to upload is within the same directory from which I launched cirkuit.
Comment 3 Matteo Agostinelli 2011-11-10 10:01:45 UTC
Thanks for the additional information. I have just pushed a commit to make Cirkuit produce more debug info for this specific bug.

Could you please do the following:
- pull latest git master from the repository
- enable debug output for Cirkuit: launch 'kdebugdialog' and make sure that Cirkuit is checked
- click on File->Upload Example on a valid open document
- at this point, look at the output on console (you don't need to actually upload the file). You should have a line like this:

cirkuit(23163) MainWindow::uploadExample: Uploading to GHNS:  KUrl("file:///home/agostine/temp/control_example.m4")

Could you verify that it points to the correct file?
Comment 4 Orestes Mas 2011-11-10 12:55:36 UTC
I've done the steps suggested, and I don't appreciate anything wrong in the path of the file to upload. Still, I get the 'localfile not found' message at the end of the output.

Specifically, the steps I did were:

1) pull latest git master

2) Uninstall previous version (make uninstall)

3) Compile and install new version. Strangely, any fresh version I install complains about not finding any backend *the first time* I run the application. This error dialog doesn't appear anymore the other times I run cirkuit.

4) I open a terminal and change to my working directory

5) I execute cirkuit, redirecting ouput to a file, like this:
cirkuit &> output.txt

6) Try to upload my example file

7) Edit the output.txt to hide personal login info, and attach it to this bug report.

Is the output.txt info useful to you to determine what is happening?
Comment 5 Orestes Mas 2011-11-10 12:58:56 UTC
Created attachment 65477 [details]
Debugging output when uploading an example file

In my last comment I forgot to say that file URL is the correct one, it points to the file to upload.
Comment 6 Matteo Agostinelli 2011-11-10 14:19:45 UTC
Yes, that is exactly what I needed, thanks. Unfortunately, everything looks fine (auth, paths, ...) and I cannot reproduce the problem here. I've also tried on another machine and a different user.

I am cc'ing the maintainer of KNS3
Comment 7 Jeremy Whiting 2011-11-10 17:14:04 UTC
This was fixed in master branch of attica,  I'll propose a new release be made shortly.

*** This bug has been marked as a duplicate of bug 281850 ***