GNOME Bugzilla – Bug 707645
Cannot log into my lastfm account (NullReferenceException in RequestAuthorization)
Last modified: 2020-03-17 10:01:50 UTC
Created attachment 254285 [details] Debug log of banshee that contains debug info about logging in last.fm account OS: Linux Mint 15 Cinnamon After I installed brand new OS on my notebook I opened Banshee player. First to do I went to last.fm scrobbler and tried to log in. I was't transferred to last.fm web page to approve Banshee to scrobble my music as usual. My first thought: "Last time I used Banshee on another PC I already approved Banshee so I think I should delete it at first from my approved apps page". After I deleted it I opened Banshee again and tried to log in again. I opened scrobbler's settings and clicked 'Try again' but nothing happened. Then I clicked on 'Finish logging in' and nothing happened. So I cannot log into my last.fm account and scrobble music. I attached the debug log that was created while I was fooling around with this two buttons. Feel free to ask more info, I'll be glad to help.
Can you get debug packages of banshee? It would tell us the exact line where the NRE is happening: [1 Warn 20:51:02.285] Error in Lastfm.Account.RequestAuthorization - System.NullReferenceException: Object reference not set to an instance of an object (in `Lastfm') at Lastfm.Account.RequestAuthorization () [0x00000] in <filename unknown>:0
Andrés, what actions should I perform to do this? Thanks.
Sorry for the delay nico. You might find a banshee package that ends with "-dbg", it's called a debug package. If you don't find it, you may need to enable some "debug packages repo", depending on your distribution. Another alternative to get the exact line number of the failure is compiling banshee yourself. If you want to do this, follow this guide (but I recommend you to use the "stable-2.6" branch, not master): http://banshee.fm/download/development/
Created attachment 254731 [details] Banshee debug log
Thanks Niko! Phil, niko provided a stack trace with line numbers, do you mind looking at it? Take in account that the code corresponds to 2.6.0, not 2.6.1 or master!
Sure thing! I've looked into the code and I see where the error is occurring. Banshee receives a 'NameResolutionFailure' when it attempts to perform an HTTP request to the 'http://ws.audioscrobbler.com/2.0/' URL. That's the first question: why is Nico receiving this? Nico, if you attempt to go to that URL in your browser can you tell us what happens? For reference, I receive an XML response that has an 'Invalid Method - No method with that name in this package' message from the Last.FM service. Do you have some kind of proxy or some perhaps have custom DNS servers that cause that URL to not resolve correctly? You should at least receive something in response, even if it is a similar error. Second question is: why doesn't Banshee recover gracefully from this error? I am able to recreate the bug by changing the target Last.FM URL to some garbage address. My feeling is that we should display something to the user when the initial contact failed rather than this confusing state where a user is unable to proceed. I will continue to dig and attempt to come up with a solution on that front.
When I go to this URL using browser it says same as yours: <lfm status="failed"> <error code="3"> Invalid Method - No method with that name in this package </error> </lfm> As far as I can see Banshee was developed using Mono. I have some experience with C# (not Mono, only MS .NET Framework), so maybe I can debug it to see what happens if you teach me how to set up the environment?
Created attachment 254953 [details] [review] Correctly handle HTTP request exception during Last.FM authentication I can definitely help with environment setup for debugging but I'm going to need to think a bit on why only Banshee cannot reach that address. If you want to get started you can follow the instructions here: http://banshee.fm/contribute/write-code/ Can you do another test in the meantime? Can you tell me whether you can access Youtube or the Amazon Store or the eMusic store from within Banshee? Is this Last.fm signup the only network action that is failing? Also, do you have any kind of special proxy or networking situation on your machine? I did some googling to try to figure out what the 'NameResolutionError' could mean and I found this on stackoverflow: http://stackoverflow.com/questions/12922062/nameresolutionfailure-in-mono-but-not-net It states that a user was able to use a proxy in their browser but for some reason using a Mono app would throw this error. Are you using any kind of proxy? On the other front, your issue of only seeing the 'Try again' and 'Finish Logging In' buttons is definitely a bug. I've produced a patch that will at least make for a better user experience in this kind of situation. Unfortunately I think the rest of this weekend I will be unavailable but before I took off I wanted to post this patch to solicit feedback so we can keep things moving. Andrés, can you please give it a look? I'd be happy to answer questions later this weekend.
Thanks for the instructions, I will seek through them when I have free time. > Can you do another test in the meantime? Can you tell me whether you can access Youtube or the Amazon Store or the eMusic store from within Banshee? When I click on youtube extension in the context pane it says "Loading..." and loading never ends. When I click Wikipedia in the context pane it opens the proper webpage. When I open Amazon MP3 Store in Online Media category it opens Amazon page and I can log in (but I'm not registered in Amazon). > It states that a user was able to use a proxy in their browser but for some reason using a Mono app would throw this error. Are you using any kind of proxy? I'm not using any proxy, at least I don't know about it.
Hi again, unfortunately I don't have any good information for you about the actual connection issues. I've not been able to replicate it on my own machines. I've been trying different proxy situations to see if I can't cause the same problem...I know that you said you aren't using a proxy but I'm hoping if I can reliably replicate the problem it might give me some ideas. I won't be offended if you don't want to dig into it any more considering that I am running blind but could you tell me what version of mono you are using in Mint? You can find that with 'mono --version'.
Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-5ubuntu1) Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: amd64 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: Included Boehm (with typed GC and Parallel Mark)
Banshee is not under active development anymore and had its last code changes more than three years ago. Its codebase has been archived. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is being shut down) if anyone takes the responsibility for active development again. See https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/264 for more info.