Bug 348519 - Auth Token 98 - Login failed - Picasa Import
Summary: Auth Token 98 - Login failed - Picasa Import
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-WebService-Google (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-31 20:17 UTC by Frédéric
Modified: 2018-01-30 21:28 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.12.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric 2015-05-31 20:17:49 UTC
Hi, 

In the import menu, there is a Picasa login dialogue in which I enter my login and password. I get a "login failed / invalid Auth Token 98". I have tried this on different Picasa accounts with different settings. This behaviour happens even if I enter a random login and password. 

Reproducible: Always

Steps to Reproduce:
1. Open login prompt of Picasa Import / Export 
2. Enter login and password 
3. Get your error 

Actual Results:  
Error dialogue 

Expected Results:  
Log me in
Comment 1 caulier.gilles 2015-05-31 21:29:57 UTC
Which kipi-plugins version you use ?

Gilles Caulier
Comment 2 Frédéric 2015-06-01 15:20:12 UTC
I use Ubuntu 15.04 and I think it is digikam 4.9.0 because I have just installed it yesterday using the "Software Center". 

I don't know how to tell the precise version of kipi-plugins because I don't have acces to my computer today.

Problem appears either on "import" or on "export". 
I have tried many different settings in my google account, including creating an application password with dual authentication.
Also, I have created a new picasa account with no success.
I have run dikicam as root with same error.
Comment 3 Frédéric 2015-06-01 17:22:21 UTC
Sorry, Actually it is version 4.7.0. I just checked.
Comment 4 caulier.gilles 2015-06-01 17:40:11 UTC
Just to be sure. Try GDrive tool instead PIcasaWeb. take a care to share Google Photo to your Grive account through web interface. You must found Google Photo content in GDrive tool.

PicasaWeb is now obsolete. We need to found a solution about this problem. GDrive sound like the best alternative for the moment.

Gilles Caulier
Comment 5 Frédéric 2015-06-01 19:12:50 UTC
Thanks but I have many albums on Picasa Web that I share with different people so it's going to be difficult to change all that.

If I need to find an alternative for the future, I might as well consider other options such as flickr or ubuntuone which are less intrusive than google.

Also, the great advantage of digikam over other software is the "album import" functionality. And this import functionnality doesn't seem to be available with google drive.
Comment 6 caulier.gilles 2015-06-01 19:21:32 UTC
No...

PicasaWeb is dead :

Picasa => G+ Photos => GDrive => Google Photos...

Gilles Caulier
Comment 7 Fabien 2015-06-11 09:53:25 UTC
Picasaweb is not yet dead. But, they changed the API for authentication by the end of May 2015:
https://groups.google.com/forum/#!topic/Google-Picasa-Data-API/4meiAJ40l3E

""Unfortunately, programmatic login was disabled for APIs last month, and will not work anymore. You'll need to update your code with Oauth 2 authentication.""
Comment 8 caulier.gilles 2015-06-11 09:56:32 UTC
By chance, Google authentication through Oauth 2 is already done in Gdrive tool. So we need to factoring here this king of code.

Gilles Caulier
Comment 9 Shourya Singh Gupta 2015-06-12 18:05:49 UTC
Yes, as Gilles rightly suggested we should keep GDrive and PicasaWeb as different entities(because afterall they are different tools) but in same directory(i.e. having same implementation). We can probably name this new reformed plugin as "GPhoto/PicasaWeb" :)
Comment 10 Frédéric 2015-06-13 13:56:46 UTC
Thanks a lot guys.
This explains why it has stopped working recently: google has changed the authentication mecanism.
Will you fix it in the next version of Digikam?
Comment 11 Shourya Singh Gupta 2015-06-13 14:00:31 UTC
Definitely and we are working towards that :)
Comment 12 Frédéric 2015-06-13 14:20:20 UTC
Cool, thank you very much :)
Looking forward to testing it !
Comment 13 caulier.gilles 2015-06-13 14:33:47 UTC
Frédéric,

digiKAm 4.11.0 release date is very close (tomorow if i remember). With this version we have already closed around 90 bugs.

So for this one, it will be done for next 4.12.0...

Gilles
Comment 14 Frédéric 2015-06-14 14:47:02 UTC
Ok, and when do you plan to release the 12?
I mean is it like 3 months or 6 months or 1 month?
Comment 15 caulier.gilles 2015-06-14 15:11:12 UTC
This summer
Comment 16 Frédéric 2015-08-01 20:39:14 UTC
Hi Guys !!

I just installed the 4.12.0, impatient to test how this unique feature was working back again !
Now it seems to be very close to working well... 
I like how it integrates with the google security mechanisms, with the browser opening up. I get the authentication hash from google, paste it in digikam and I get a list of all my albums. I select the one I need to download and click on continue, and then I get a new error:
"No image selected. Please select which images should be uploaded"

Please tell me I did something wrong because I really want this feature :-).

Cheers,

Fred
Comment 17 Shourya Singh Gupta 2015-08-01 21:13:19 UTC
Git commit 25b51b528216a3613726c5b1fe0bd896ee011cf3 by Shourya Singh Gupta.
Committed on 01/08/2015 at 21:13.
Pushed by shouryasinghgupta into branch 'master'.

Bug fix.

M  +1    -1    googleservices/gswindow.cpp

http://commits.kde.org/kipi-plugins/25b51b528216a3613726c5b1fe0bd896ee011cf3
Comment 18 Shourya Singh Gupta 2015-08-01 21:22:51 UTC
Hello Fred

No, it was not error from your side. There was a minor edge case that I missed while integrating the implementations of Picasaweb and Google Drive. I have fixed the bug. If you build and install digiKam using source code from git, then you can pull the recent changes in Kipi-plugins that I have made to fix the bug and build and re-install digiKam. This should resolve the problem you are facing :)

Shourya
Comment 19 Shourya Singh Gupta 2015-08-02 05:36:37 UTC
And if you do not use source code for installing digiKam 4.12.0 but use official tarball to install digiKam, I can tell you the workaround for this bug that you can use till the next digiKam 4.13.0 is released(in which this minor problem will be fixed officially). The workaround is to download images from Picasa to a "non-empty" local folder :)
Comment 20 Frédéric 2015-08-02 06:38:32 UTC
Hi Shourya,

Thanks alot for your prompt answer.
I cannot really compile a new version right now because up to now I was relying on packages and I have not setup all the dependencies etc... So I'm a bit afraid this could take a while ;-).
So I guess I will wait for 4.13.0, and it is not a problem because I'm just looking for a long term solution and in general for a picture managing software in Ubuntu.

Your workaround doesn't seem to be working for me though. I've tried adding a .jpeg image in the folder where I want to download the album and the same problem happens again. I have also tried adding several .jpeg images in the empty directory and no change at all.

I've you have an idea of another workaround, I can try it !!

Thanks for your support,

Fred
Comment 21 Shourya Singh Gupta 2015-08-02 08:05:55 UTC
Ahhh yes that workaround won't work. Sorry, it was wrong. Ignore the previous workaround that I had mentioned. The correct workaround is, just select an image from your digiKam album and with that image still selected click on Import to PicasaWeb and download your images from Picasa wherever you like. I am sure it will work :)

And I have made the permanent solution for this problem in git source code. So in the next digiKam 4.13.0 release you will for sure find this problem fixed permanently :)
Comment 22 Frédéric 2015-08-02 09:43:51 UTC
Your new workaround works and it's really easy to do so I think I will find my way from here and start downloading my albums.
It will be good when it is fixed in the next version, specially for those who don't know the trick ;-).

Thanks again,

Fred
Comment 23 Shourya Singh Gupta 2015-08-05 14:40:49 UTC
Hello Fred

Today I was testing few things with Picasa Import and I think there is also a problem that when you download photos from Picasa using PicasaImport then the images are not getting downloaded in the correct format(i.e. jpg) and hence you cannot open images. Can you also reproduce it ?

I have although figured out the problem. And also fixed the code for this. If this problem is reproducible for you, then you will surely find this issue also fixed in the next 4.13.0 release :)

Cheers,
Shourya
Comment 24 Frédéric 2015-08-05 14:57:01 UTC
Hi Shourya,

I need to try again when I get back home. 
From what I remember, when I tested this feature last time (2nd of August) with the simple workaround it was working fine and I was able to preview the pictures in my file explorer (Nemo). I remember that I was convinced it was working and I thought I would continue downloading my albums later. I haven't tried again since that time.  

So for now, I do not confirm that I have observed the issue that you are describing (having pictures in the wrong file format that you cannot open). Maybe it appears in particular conditions or use-cases. 

Thanks for the information!

Fred
Comment 25 Shourya Singh Gupta 2015-08-05 15:22:55 UTC
Hi Fred

Could you try this test case :

1) Upload a ".png" image  to Picasa using "Picasa Export of digiKam".
2) Then try downloading back the same image from Picasa using Picasa Import of digiKam.

Are you able to reproduce the problem using this test case ?

Shourya
Comment 26 Shourya Singh Gupta 2015-08-05 15:45:51 UTC
(In reply to Shourya Singh Gupta from comment #23)
> Hello Fred
> 
> Today I was testing few things with Picasa Import and I think there is also
> a problem that when you download photos from Picasa using PicasaImport then
> the images are not getting downloaded in the correct format(i.e. jpg) and
> hence you cannot open images. Can you also reproduce it ?

Just to avoid any confusion, the correct format of a downloaded image(from Picasa) is jpeg only if you had earlier uploaded that image to Picasa using digiKam.
Comment 27 Frédéric 2015-08-05 20:53:58 UTC
Hi Shourya,


You were right, the .PNG upload+download does not work. I get an image that I cannot open, even if the original image was ok. The file format seems to be unknown by digikam.

The .JPG album download still works well with the trick of selecting an image in a local album. 

Hope this helps,

Fred
Comment 28 Shourya Singh Gupta 2015-08-06 05:28:42 UTC
Hi Fred

Thanks for the feedback !

Yes, an image gets downloaded in the wrong format using digiKam Picasa Import, only if you had uploaded that image with digiKam Picasa Export. Otherwise digiKam Picasa Import will work fine and the images will get downloaded in the correct format.

I have solved this problem and you will find it fixed in the next digiKam 4.13.0 release :)

Shourya
Comment 29 Frédéric 2015-08-06 10:12:08 UTC
Thanks Shourya. 
It's a really nice feature that I believe not so many applications are able to provide.
Comment 30 Luca Olivetti 2015-08-07 17:00:46 UTC
Just a question while I wait for this update to be packaged: I added descriptions to the photos in google photos, when the import works, will they be preserved in digikam?
For the time being as a backup I just downloaded the albums from google photos and imported them in digikam, but unfortunately the descriptions aren't embedded in the pictures' metadata so they aren't available in digikam.
Comment 31 Shourya Singh Gupta 2015-08-08 05:45:19 UTC
Git commit 811861bc6a61d24da2b73935481671c10121dda4 by Shourya Singh Gupta.
Committed on 08/08/2015 at 05:45.
Pushed by shouryasinghgupta into branch 'master'.

Code modification to allow images downloaded from PicasaWeb/GoogleServices to retain the image description.

M  +2    -1    googleservices/gswindow.cpp
M  +5    -0    googleservices/picasawebtalker.cpp

http://commits.kde.org/kipi-plugins/811861bc6a61d24da2b73935481671c10121dda4
Comment 32 Shourya Singh Gupta 2015-08-08 05:50:02 UTC
Hello Luca

As you can see from my last commit, "Import from Google Photos/PicasaWeb" plugin of digiKam will now also retain image description of image downloaded from PicasaWeb/GoogleServices using this plugin.

Shourya
Comment 33 Luca Olivetti 2015-08-08 08:56:35 UTC
Thank you, now I just have to wait for kubuntu to package the updated digikam (I fear it will be a long wait).
I used to do it the other way round (i.e. doing everything in digikam then exporting to picasa as a backup), but now, with mobile phones directly uploading to google photos, I changed my workflow.
Comment 34 Unknown 2015-10-29 10:58:15 UTC
(In reply to Luca Olivetti from comment #33)
> Thank you, now I just have to wait for kubuntu to package the updated
> digikam (I fear it will be a long wait).
> I used to do it the other way round (i.e. doing everything in digikam then
> exporting to picasa as a backup), but now, with mobile phones directly
> uploading to google photos, I changed my workflow.

Overall is it time to change this plugin setup so that users can be sent newer plugins directly from KDE? Waiting for distro updates takes time (despite me installing from ppa-kubuntu-backports) Any senior devs like to comment?