Bug 336835 - cannot export to flickr anymore
Summary: cannot export to flickr anymore
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-WebService-Flickr (show other bugs)
Version: 5.6.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-28 16:43 UTC by Marc Cousin
Modified: 2018-01-30 21:22 UTC (History)
17 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Cousin 2014-06-28 16:43:06 UTC
I get  "Your token is invalid. Would you like to get a new token to proceed?", which fails, every time I try to export a picture to flickr. It worked last time I used it, one or two weeks ago.

Here is the stdout message.

digikam(324)/KIPI (general) KIPIFlickrExportPlugin::FlickrTalker::parseResponseGetFrob: Checking Error in response
digikam(324)/KIPI (general) KIPIFlickrExportPlugin::FlickrTalker::parseResponseGetFrob: Error code= "95"
digikam(324)/KIPI (general) KIPIFlickrExportPlugin::FlickrTalker::parseResponseGetFrob: Msg= "SSL is required"
digikam(324)/KIPI (general) KIPIFlickrExportPlugin::FlickrTalker::parseResponseGetFrob: GetFrob finished


Reproducible: Always

Steps to Reproduce:
1. Select a picture
2. Export to flickr
Comment 1 edwhitakerdc 2014-06-28 21:20:56 UTC
I found an announcement on Flickr's blog that they've gone SSL-only as of June 27th.  (http://code.flickr.net/2014/04/30/flickr-api-going-ssl-only-on-june-27th-2014/).  This appears to have caused the plugin problem.
Comment 2 Steve Crawford 2014-06-28 22:32:47 UTC
Confirmed here as well. Worked yesterday but not today which matches the dates in Marc's observation. The blackout periods in the same page may now explain the intermittent failures I've recently had.

Unfortunately it appears that the URI is hard-coded rather than in a config (following sampling of strings pulled from /usr/lib/kde4/kipiplugin_flickrexport.so on Kubuntu 14.04:
http://www.flickr.com/services/rest/
http://www.flickr.com/services/auth/
http://api.flickr.com/services/upload/
Comment 3 Volker Lerch 2014-06-29 08:45:40 UTC
I confirm this wrong behaviour as well. For me, the workaround (rebooting PC) does not solve this issue.

I have been experiencing a similar behaviour since today. Actions I performed: 1. Choose picture to upload 2. Open kipi flickr upload window. 3. kipi modules tells me that the token is not valid any more and asks me if I like to receive a new token. I answer with "yes". 4. "Unknown error" returned to frontend 5. "Frob" window opens, but stops at 50% progress bar. 6. I try to modify the user, But again, "Frob" window. What I already did in order to remediate the fault, but without success: 1. I already deleted the api_key on my flickr account. 2. I deleted all files from /tmp and restarted the system 3. From /home/my_user_account/.config/Trolltech.conf , i deleted line usr\lib64\kde4\kipiplugin_flickrexport.so=40805, 0, x86_64 linux g++-4 full-config, 2013-10-21T17:55:29 4. I deletet the webbrowser cache completely. 5. I Deleted flickr chapter from /home/vlerch/.kde4/share/apps/kcookiejar/cookies Version details: Digikam: 3.5.0 KDE: 4.11.5 Kipi-Module: 3.5.0 LibKipi: 2.1.0 digiKam/kipi Output from stdout: igikam(6056)/KIPI (general) KIPIFlickrExportPlugin::FlickrList::slotAddImages: Insterting new item "P6280115.JPG" digikam(6056)/KIPI (general) KIPIPlugins::KPImagesListViewItem::KPImagesListViewItem: Creating new ImageListViewItem with url KUrl("file:///data/digiKam/Ausflüge und Kurzreisen/Gasometer_der_schöne_Schein_Juni_2014/zum_Drucken/P6280115.JPG") for list view KIPIPlugins::KPImagesListView(0x691acf0) digikam(6056)/KIPI (general) KIPIPlugins::KPImagesListViewItem::setThumb: Received new thumbnail for url KUrl("") . My view is KIPIPlugins::KPImagesListView(0x691acf0) digikam(6056)/KIPI (general) KIPIFlickrExportPlugin::FlickrListViewItem::setFamily: Family status set to true digikam(6056)/KIPI (general) KIPIFlickrExportPlugin::FlickrListViewItem::setFriends: Friends status set to true digikam(6056)/KIPI (general) KIPIFlickrExportPlugin::FlickrListViewItem::setPublic: Public status set to false digikam(6056)/KIPI (general) KIPIFlickrExportPlugin::FlickrListViewItem::setSafetyLevel: Safety level set to 1 digikam(6056)/KIPI (general) KIPIFlickrExportPlugin::FlickrListViewItem::setContentType: Content type set to 1 digikam(6056)/KIPI (general) KIPIPlugins::KPImagesListViewItem::setThumb: Received new thumbnail for url KUrl("file:///data/digiKam/Ausflüge und Kurzreisen/Gasometer_der_schöne_Schein_Juni_2014/zum_Drucken/P6280115.JPG") . My view is KIPIPlugins::KPImagesListView(0x691acf0) digikam(6056)/KIPI (general) KIPIFlickrExportPlugin::FlickrWindow::slotUserChangeRequest: Slot Change User Request digikam(6056)/KIPI (general) KIPIFlickrExportPlugin::FlickrTalker::getFrob: Get frob url: KUrl("http://www.flickr.com/services/rest/?method=flickr.auth.getFrob&api_key=49d585bafa0758cb5c58ab67198bf632&api_sig=b025bddda699fc5ba4dd6fc55b9391c3") digikam(6056)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x5bad040) digikam(6056)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("http://www.flickr.com/services/rest/?method=flickr.auth.getFrob&api_key=49d585bafa0758cb5c58ab67198bf632&api_sig=b025bddda699fc5ba4dd6fc55b9391c3") digikam(6056)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0x5bad040) KIO::Slave(0x5d8b270) digikam(6056)/KIPI (general) KIPIFlickrExportPlugin::FlickrTalker::parseResponseGetFrob: Checking Error in response digikam(6056)/KIPI (general) KIPIFlickrExportPlugin::FlickrTalker::parseResponseGetFrob: Error code= "95" digikam(6056)/KIPI (general) KIPIFlickrExportPlugin::FlickrTalker::parseResponseGetFrob: Msg= "SSL is required" digikam(6056)/KIPI (general) KIPIFlickrExportPlugin::FlickrTalker::parseResponseGetFrob: GetFrob finished digikam(6056)/kdeui (KNotification) KNotificationManager::close: 137 digikam(6056)/digikam (core) Digikam::DImg::load: "/usr/share/kde4/apps/digikam/data/sample-aix.png" : PNG file identified digikam(6056)/digikam (core) Digikam::DMetadata::getImageHistory: Loading image history "" digikam(6056)/KEXIV2 KExiv2Iface::KExiv2::getImageDateTime: DateTime => Exif.Photo.DateTimeOriginal => QDateTime("Di. Jul 27 06:40:05 2010") libpng warning: iCCP: known incorrect sRGB profile digikam(6056)/digikam (core) Digikam::AlbumFilterModel::setSearchTextSettings: new search text settings: "" : hasResult = true , validRows = 67 digikam(6056)/kio (Slave) KIO::Slave::kill: killing slave pid 6615 ( "http://www.flickr.com" )
Comment 4 Volker Lerch 2014-06-29 08:50:31 UTC
I tried the api flickr call separately with curl in a shell, both via http and secure https protocol. In either case, I recive the response:
"Key has invalid format" 

It seems to be necessary to modify the required format in the Kipi module.

vlerch@linux-m5a2:~> curl https://www.flickr.com/services/rest/?method=flickr.auth.getFrob&api_key=49d585bafa0758cb5c58ab67198bf632&api_sig=b025bddda699fc5ba4dd6fc55b9391c3                                                                                         
[1] 3886                                                                                                                                                                                                                                                             
[2] 3887                                                                                                                                                                                                                                                             
[2]+  Fertig                  api_key=49d585bafa0758cb5c58ab67198bf632                                                                                                                                                                                               
vlerch@linux-m5a2:~> <?xml version="1.0" encoding="utf-8" ?>                                                                                                                                                                                                         
<rsp stat="fail">                                                                                                                                                                                                                                                    
        <err code="100" msg="Invalid API Key (Key has invalid format)" />                                                                                                                                                                                            
</rsp>                                                                                                                                                                                                                                                               
^C                                                                                                                                                                                                                                                                   
[1]+  Fertig                  curl https://www.flickr.com/services/rest/?method=flickr.auth.getFrob                                                                                                                                                                  
vlerch@linux-m5a2:~> curl http://www.flickr.com/services/rest/?method=flickr.auth.getFrob&api_key=49d585bafa0758cb5c58ab67198bf632&api_sig=b025bddda699fc5ba4dd6fc55b9391c3
[1] 3895                                                                                                                                                                                                                                                             
[2] 3896                                                                                                                                                                                                                                                             
[2]+  Fertig                  api_key=49d585bafa0758cb5c58ab67198bf632                                                                                                                                                                                               
vlerch@linux-m5a2:~> <?xml version="1.0" encoding="utf-8" ?>                                                                                                                                                                                                         
<rsp stat="fail">                                                                                                                                                                                                                                                    
        <err code="100" msg="Invalid API Key (Key has invalid format)" />                                                                                                                                                                                            
</rsp>                                                                                                                                                                                                                                                               
^C                                                                                                                                                                                                                                                                   
[1]+  Fertig                  curl http://www.flickr.com/services/rest/?method=flickr.auth.getFrob                                                                                                                                                                   
vlerch@linux-m5a2:~>
Comment 5 jon33040 2014-06-29 10:50:10 UTC
I've just recompiled digikam and done some tests changing the URLs.
 
The URLs to access flickr are defined in extra/kipi-plugins/flickrexport/flickrtalker.cpp. If you change all 3 URLs to use https then uploading works again. i.e.

flickrtalker.cpp:        m_apiUrl    = QString("https://www.flickr.com/services/rest/");
flickrtalker.cpp:        m_authUrl   = QString("https://www.flickr.com/services/auth/");
flickrtalker.cpp:        m_uploadUrl = QString("https://api.flickr.com/services/upload/");

The blog liked earlier in this bug report suggests that just changing the api.flickr.com URL should be enough. It wasn't. Changing that one and not the other two made no difference at all. The error was unchanged.

Before someone asks, while my very rusty developer skills are still just good enough to make changes like this, I'm certainly not up to packaging a new version of digikam including this fix. I've never found compiling digikam to be that bad. I spend 20-30 minutes fighting version issues with the libcv/libopencv library each time and then it's just waiting around.
Comment 6 ianp 2014-06-30 18:21:20 UTC
I'm experiencing exactly the same problem described above.
My workaround is to upload via an Android phone. Is there any thing normal users can do to get it working or do we have to wait for a fix?
Comment 7 jgoerzen 2014-07-04 20:08:37 UTC
Confirmed here.
Comment 8 ishmurzin 2014-07-04 23:13:12 UTC
*** This bug has been confirmed by popular vote. ***
Comment 9 ishmurzin 2014-07-04 23:23:49 UTC
My system is Ubuntu 14.04. I experience exactly the same problem with both  3.5.0 and 4.0.0 versions of digikam. The workaround in the Comment 5 is nice, but not everybody is able to compile digikam from sources. In digikam 4.1.0 the bug is not fixed (see the list of files closed for 4.1.0 here: https://bugs.kde.org/buglist.cgi?f1=cf_versionfixedin&o1=equals&query_format=advanced&bug_status=RESOLVED&bug_status=NEEDSINFO&bug_status=VERIFIED&bug_status=CLOSED&v1=4.1.0&product=digikam&product=digikamimageplugins&product=kipiplugins&product=showfoto&list_id=1098192)
Comment 10 kionez 2014-07-09 20:49:42 UTC
If you use arch linux, you should use this pkgbuild (with attached patch):
http://kionez.org/public/PKGBUILD.kipi-plugins
http://kionez.org/public/fix_flickr_over_ssl.patch
(you should install just kipi-plugins-4.0.0-2-x86_64.pkg.tar.xz )
hope it helps ;)

k.t
Comment 11 kionez 2014-07-23 07:28:16 UTC
The wrong Flickr URL is still in 4.1 version, so here's my udpdated ArchLinux PKGBUILD

http://kionez.org/public/PKGBUILD.kipi-plugins-4.1

k.
Comment 12 stupor_scurvy343 2014-07-27 19:20:38 UTC
(In reply to jon33040 from comment #5)
> I've just recompiled digikam and done some tests changing the URLs.
>  
> The URLs to access flickr are defined in
> extra/kipi-plugins/flickrexport/flickrtalker.cpp. If you change all 3 URLs
> to use https then uploading works again. i.e.
> 
> flickrtalker.cpp:        m_apiUrl    =
> QString("https://www.flickr.com/services/rest/");
> flickrtalker.cpp:        m_authUrl   =
> QString("https://www.flickr.com/services/auth/");
> flickrtalker.cpp:        m_uploadUrl =
> QString("https://api.flickr.com/services/upload/");

Since this apparently works, is it OK if I commit this change?
Comment 13 jon33040 2014-07-27 21:16:24 UTC
(In reply to Michael Palimaka from comment #12)
> (In reply to jon33040 from comment #5)
> > I've just recompiled digikam and done some tests changing the URLs.
> >  
> > The URLs to access flickr are defined in
> > extra/kipi-plugins/flickrexport/flickrtalker.cpp. If you change all 3 URLs
> > to use https then uploading works again. i.e.
> > 
> > flickrtalker.cpp:        m_apiUrl    =
> > QString("https://www.flickr.com/services/rest/");
> > flickrtalker.cpp:        m_authUrl   =
> > QString("https://www.flickr.com/services/auth/");
> > flickrtalker.cpp:        m_uploadUrl =
> > QString("https://api.flickr.com/services/upload/");
> 
> Since this apparently works, is it OK if I commit this change?

It's almost a month since I re-compiled DK with this change. In that month I've successfully uploaded a few hundred pictures using the recompiled version. Committing this change sounds like a good idea to me.

Is it possible to commit this to the DK 3 series to make it easier to get it picked up by distros who won't (yet) move to DK 4?

Even though I can re-compile DK, I'd prefer not to.
Comment 14 caulier.gilles 2014-07-28 05:58:12 UTC
Git commit 1d4a95bc3d36060a025b8950aaaca467253532bc by Gilles Caulier.
Committed on 28/07/2014 at 05:57.
Pushed by cgilles into branch 'master'.

use SSL based url for flickr web service communication
FIXED-IN: 4.2.0

M  +4    -4    flickrexport/flickrtalker.cpp
M  +1    -1    flickrexport/flickrtalker.h

http://commits.kde.org/kipi-plugins/1d4a95bc3d36060a025b8950aaaca467253532bc
Comment 15 caulier.gilles 2014-08-02 14:19:21 UTC
*** Bug 337980 has been marked as a duplicate of this bug. ***
Comment 16 Christoph Feck 2014-08-17 20:06:34 UTC
*** Bug 338333 has been marked as a duplicate of this bug. ***