Bug 285441 - Downloading presets from GHNS does no longer work
Summary: Downloading presets from GHNS does no longer work
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR critical
Target Milestone: ---
Assignee: srikanth Tiyyagura
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2011-11-01 08:04 UTC by Halla Rempt
Modified: 2011-12-30 08:30 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
full log of trying to use ghns (79.05 KB, text/plain)
2011-12-26 12:30 UTC, Halla Rempt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Halla Rempt 2011-11-01 08:04:27 UTC
If you try to download presets from GHNS, the dialog responds with an API error. I'm not sure what's going on, whether it's a KDE issue (I'm using 4.6.0 now) or something else, but it needs investigating and fixing before we can release.
Comment 1 Halla Rempt 2011-11-01 08:04:56 UTC
Srikanth, 

Can you please look into this?
Comment 2 Juan Palacios 2011-11-05 01:00:19 UTC
I can confirm this bug.
I'm using Kde 4.7.3 and Krita 2.4 beta3 on Archlinux 64 bit.

When i press the install button on the GNHS dialog, the next message is shown at the bottom of the dialog: "Unknown Open Collaboration Service API Error. (103)"
Comment 3 Kubuntiac 2011-11-07 02:18:38 UTC
Confirmed here as well.

Same error message.

Current trunk, KDE 4.7.3, Chakra Linux
Comment 4 srikanth Tiyyagura 2011-11-09 04:19:00 UTC
I observed that this error is not coming to all the resources updated by different users. Only some users updated resources are creating this error while downloading. I sent mail to GHNS developers and open desktop server people. I will resolve asap . .:D
Comment 5 Halla Rempt 2011-11-09 08:02:30 UTC
Thanks!
Comment 6 Sven Langkamp 2011-11-24 19:45:27 UTC
103 is "please specify a valid login", it's not a KDE issues as that already worked with the same KDE version. I assume it's a server problem.
Comment 7 Halla Rempt 2011-12-26 12:30:43 UTC
Created attachment 67124 [details]
full log of trying to use ghns
Comment 8 Halla Rempt 2011-12-26 12:39:12 UTC
no, 103 is item not found


OCS Request:  QUrl( "https://boudewijnrempt:15518468@api.opendesktop.org/v1/content/download/147799/1" )  
XML Returned:
 "<?xml version="1.0"?>
<ocs>
 <meta>
  <status>failed</status>
  <statuscode>103</statuscode>
  <message>content item not found</message>
 </meta>
</ocs>
"
Comment 9 Halla Rempt 2011-12-26 12:45:43 UTC
uploading a pattern gives:

" 
XML Returned:
 "<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
</ocs>
" 
PostJob::parse "<?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>
" 


And no download link -- I'm beginning to think that we actually fail to upload the actual files.
Comment 10 Halla Rempt 2011-12-26 14:57:14 UTC
This is the full log of uploading a preset with three preview images. On the site, there was no preset to download and only two preview images were shown.

" 
Parameter map:  QMap(("changelog", "local file")("description", "bug test")("downloadbuy1", "0")("downloadbuyprice1", "1")("downloadbuyreason1", "")("licensetype", "3")("name", "bug_test")("type", "626")("version", "1")) 
OCS Request:  QUrl( "https://boudewijnrempt:15518468@api.opendesktop.org/v1/content/add" )  
XML Returned:
 "<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <content>
   <id>147806</id>
  </content>
 </data>
</ocs>
" 
OCS Request:  QUrl( "https://boudewijnrempt:15518468@api.opendesktop.org/v1/content/data/147806" )  
XML Returned:
 "<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <content details="full">
   <id>147806</id>
   <name>bug_test</name>
   <version>1</version>
   <typeid>626</typeid>
   <typename>Krita Preset</typename>
   <language></language>
   <personid>boudewijnrempt</personid>
   <profilepage>http://opendesktop.org/usermanager/search.php?username=boudewijnrempt</profilepage>
   <created>2011-12-26T15:55:27+01:00</created>
   <changed>2011-12-26T15:55:27+01:00</changed>
   <downloads>0</downloads>
   <score>50</score>
   <description>bug test</description>
   <summary></summary>
   <feedbackurl></feedbackurl>
   <changelog>local file</changelog>
   <homepage></homepage>
   <homepagetype></homepagetype>
   <homepage2></homepage2>
   <homepagetype2></homepagetype2>
   <homepage3></homepage3>
   <homepagetype3></homepagetype3>
   <homepage4></homepage4>
   <homepagetype4></homepagetype4>
   <homepage5></homepage5>
   <homepagetype5></homepagetype5>
   <homepage6></homepage6>
   <homepagetype6></homepagetype6>
   <homepage7></homepage7>
   <homepagetype7></homepagetype7>
   <homepage8></homepage8>
   <homepagetype8></homepagetype8>
   <homepage9></homepage9>
   <homepagetype9></homepagetype9>
   <homepage10></homepage10>
   <homepagetype10></homepagetype10>
   <licensetype>3</licensetype>
   <license>Artistic 2.0</license>
   <donationpage></donationpage>
   <comments>0</comments>
   <commentspage>http://openDesktop.org/content/show.php?content=147806</commentspage>
   <fans>0</fans>
   <fanspage>http://openDesktop.org/content/show.php?action=fan&amp;content=147806</fanspage>
   <knowledgebaseentries>0</knowledgebaseentries>
   <knowledgebasepage>http://openDesktop.org/content/show.php?action=knowledgebase&amp;content=147806</knowledgebasepage>
   <depend></depend>
   <preview1></preview1>
   <preview2></preview2>
   <preview3></preview3>
   <previewpic1></previewpic1>
   <previewpic2></previewpic2>
   <previewpic3></previewpic3>
   <picsmall1></picsmall1>
   <picsmall2></picsmall2>
   <picsmall3></picsmall3>
   <detailpage>http://openDesktop.org/content/show.php?content=147806</detailpage>
  </content>
 </data>
</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>
" 
XML Returned:
 "<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
</ocs>
" 
PostJob::parse "<?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>101</statuscode>
  <message>localfile not found</message>
 </meta>
</ocs>
" 
PostJob::parse "<?xml version="1.0"?>
<ocs>
 <meta>
  <status>failed</status>
  <statuscode>101</statuscode>
  <message>localfile not found</message>
 </meta>
</ocs>
" 
XML Returned:
 "<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
</ocs>
" 
PostJob::parse "<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
</ocs>
" 
/usr/bin/xdg-open: line 322: test: KDE Development Platform: 4.7.2 (4.7.2) "release 5": integer expression expected
/usr/bin/xdg-open: line 323: test: KDE Development Platform: 4.7.2 (4.7.2) "release 5": integer expression expected
/usr/bin/xdg-open: line 324: test: KDE Development Platform: 4.7.2 (4.7.2) "release 5": integer expression expected
Comment 11 srikanth Tiyyagura 2011-12-27 01:08:34 UTC
   The problem for this error in not in the krita code. The actual problem is with attica plugin. Ghns uses attica for implementing the Open Collaboration Services.

 In Krita, we are using GHNS libraries from kde-base libraries. Kde-base libraries contain attica 0.2.0 only. The error we are getting is resolved in attica 0.2.9. Once, we can add attica 0.2.9 in our code then our problem is solved. 
 
  I am stuck at how to add the attica 0.2.9 to krita dev env .. :( 

Changelog of attica 0.2.9
 - Fix upload errors resulting from content-id not being set.
Comment 12 Halla Rempt 2011-12-27 10:01:30 UTC
Can't we set the content-id ourselves then?
Comment 13 Halla Rempt 2011-12-30 08:30:29 UTC
Git commit 67f3478806aea135892d1beda70139f63f42c8fc by Boudewijn Rempt.
Committed on 30/12/2011 at 09:28.
Pushed by rempt into branch 'master'.

Only show the GHNS upload button if the attica version is high enough

Attica is buggy prior to 3.0 (a.k.a. 2.9) because of bug 281850. This
caused Krita bug 285441, where upload would fail sometimes because of
missing content-id. There's nothing we can do to fix that from within
Krita, so only show the upload button if the version of attica is new
enough. The download button is always enabled.
Related: bug 281850

M  +7    -0    libs/widgets/KoResourceItemChooser.cpp

http://commits.kde.org/calligra/67f3478806aea135892d1beda70139f63f42c8fc