Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't login to Digitally Imported (or Radiotunes) premium account #5457

Open
3 tasks done
fkelbe opened this issue Jul 31, 2016 · 12 comments
Open
3 tasks done

Can't login to Digitally Imported (or Radiotunes) premium account #5457

fkelbe opened this issue Jul 31, 2016 · 12 comments

Comments

@fkelbe
Copy link

fkelbe commented Jul 31, 2016

Before posting

Please follow the steps below and check the boxes with [x] once you did the step.

  • I checked the issue tracker for similar issues
  • I checked the changelog if the issue is already resolved
  • I tried the latest Clementine build from here
    • clementine-1.3.2-0.rc1.fc23.x86_64.rpm and ClementineSetup-1.3.2rc1.exe

System information

  • Operating System: Fedora 24 x86_64 and Windows 10 64-bit
  • Clementine version: 1.3.1 and later

Expected behaviour / actual behaviour

Expected:
Run Clementine and login to a Digitally Imported (or Radiotunes) premium account

Actual:
The latest versions of Clementine will no longer login to Digitally Imported (DI) Premium accounts. Since Radiotunes and Digitally Imported (DI) are the same company and use the same configuration/login, this applies to both.
The error is a small pop-up that has a title of "Authentication Failure" and the text in the box says "Unknown error". The DI account has been verified to still be valid and works fine through web logins.

Steps to reproduce the problem (only for bugs)

  • Start Clementine
  • Select "Internet"
  • Right click on "Digitally Imported" or "Radiotunes" and select "Configure"
  • Enter Premium account username and password
  • Error pop-up then appears
@major
Copy link

major commented Aug 2, 2016

I also tried removing ~/.cache/Clementine and that didn't fix it. For what it's worth, I can't listen to DI/RadioTunes in Clementine as a guest user, either.

@major
Copy link

major commented Aug 2, 2016

If I dump the network traffic from Clementine with ngrep, I see that DI's API is responding with success:

HTTP/1.1 200 OK.
Content-Type: application/json; charset=utf-8.
Vary: Accept-Encoding.
Status: 200 OK.
Cache-Control: max-age=0, private, must-revalidate.
Content-Language: en.
X-Request-Id: xxx.
ETag: W/"xxx".
X-Runtime: 0.111967.
Date: Tue, 02 Aug 2016 13:15:48 GMT.
X-Powered-By: Phusion Passenger Enterprise.
Server: nginx/1.8.1 + Phusion Passenger.
Content-Encoding: gzip.
X-Frame-Options: SAMEORIGIN.
X-Varnish: 620267412.
Age: 0.
Via: 1.1 varnish-v4.
Access-Control-Allow-Origin: *.
Accept-Ranges: bytes.
Transfer-Encoding: chunked.
Connection: keep-alive.

Also, I can fake out the same request in Python and I get a bunch of JSON back. Could there be a problem with the JSON schema itself, perhaps?

@mlindsay1977
Copy link

mlindsay1977 commented Aug 3, 2016

Same issue here:
Fedora 24
Clementine 1.3.1

I get the following when I try to login to di.fm when Clementine is invoked with: --verbose --log-level 3

10:59:39.105 ERROR unknown JSonScanner::yylex - error while reading from io device
10:59:39.105 ERROR unknown json_parser - syntax error found, forcing abort, Line 1 Column 1

@axelsimon
Copy link

Anything one can do to solve this? I thought i would re-login to DI.fm in Clementine, as it was telling me my current logged in session was past its expiry date (but it still worked, proving once more the adage “if it ain't broken, don't fix it”), and of course now i can't reconnect.
From what was being said in August, it looks like some json parsing problem, which would make sense as that's about the time DI.fm changed their website to a newer version, if i recall correctly.

@gooseensky
Copy link
Contributor

gooseensky commented Jan 18, 2017

I don't have a DI premium account, so I couldn't test it properly, but I think that the following PR will fix the issue. #5603
Could please someone with DI account test it?

@axelsimon
Copy link

Just tried to compile after manually patching src/internet/core/oauthenticator.cpp from parser.parse(reply, &ok).toMap(); to parser.parse(replyData, &ok).toMap();

No joy, make choked on:

[ 58%] Building CXX object src/CMakeFiles/clementine_lib.dir/internet/internetradio/savedradio.cpp.o
/home/axel/Software/Clementine/src/internet/core/oauthenticator.cpp: In member function ‘void OAuthenticator::FetchAccessTokenFinished(QNetworkReply*)’:
/home/axel/Software/Clementine/src/internet/core/oauthenticator.cpp:136:37: error: ‘replyData’ was not declared in this scope
   QVariantMap result = parser.parse(replyData, &ok).toMap();
                                     ^~~~~~~~~
[ 58%] Building CXX object src/CMakeFiles/clementine_lib.dir/internet/core/searchboxwidget.cpp.o
At global scope:
cc1plus: error: unrecognized command line option ‘-Wno-unknown-warning-option’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-unused-private-field’ [-Werror]
cc1plus: all warnings being treated as errors
src/CMakeFiles/clementine_lib.dir/build.make:6711: recipe for target 'src/CMakeFiles/clementine_lib.dir/internet/core/oauthenticator.cpp.o' failed
make[2]: *** [src/CMakeFiles/clementine_lib.dir/internet/core/oauthenticator.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:776: recipe for target 'src/CMakeFiles/clementine_lib.dir/all' failed
make[1]: *** [src/CMakeFiles/clementine_lib.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Did I miss something?

@gooseensky
Copy link
Contributor

@axelsimon, Did you add string "QByteArray replyData = reply->readAll();" ?
Looks like you've missed one line :)

@axelsimon
Copy link

axelsimon commented Jan 21, 2017

@selumin I absolutely had. Thanks for catching that.

I successfully compiled Clementine with the patch, started it, tried to login to di.fm but it didn't work unfortunately.
I got a popup with “Authentication failed – unknown error” and this error on the console output:

04:07:30.265 ERROR unknown                          JSonScanner::yylex - error while reading from io device  
04:07:30.265 ERROR unknown                          json_parser - syntax error found,  forcing abort, Line 1 Column 1  

Let me know if you want me to try something else.

I've checked it's the right login/password, and i even get a different error if i use a bad login/password combination.

@gooseensky
Copy link
Contributor

gooseensky commented Jan 21, 2017

Hi @axelsimon,
Thank you for providing a feedback.
Looks like DI doesn't use OAuth class and has own implementation of authorization.
So, you should do the same changes (just change parser.parse(reply).toMap() to parser.parse(reply->readAll()).toMap() in file src/internet/digitally/digitallyimportedclient.cpp.
Or you could use new patch from PR(#5603), I've updated all problem places in it and these changes resolve same problem for Dropbox and Google Drive for example.

@axelsimon
Copy link

Success :) It worked! Thanks a lot for the patch @selumin

@aldantas
Copy link

I was having the same problem with Dropbox authentication and the patch from PR(#5603) fixed it. Thank you @selumin

@dkiser
Copy link

dkiser commented Apr 17, 2017

Any idea when the PR will be merged in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants