Linking to browser in Picard not working << SOLVED


#1

Hi all,

Installed Picard on a linux box and having an issue with it linking to my browser (it doesn’t!). So I cannot “Lookup in Browser” - or login (does not fetch authorisation code).

There is one error in the log at start up "Plugin directory ‘/app/lib/python2.7/site-packages/contrib/plugins’ does not exist.

So do I need to do something? Bit of a linux klutz so be nice :slight_smile:


#2

Part of the debug log when I try to log in:

D: 21:28:16 WSREQ: First request to (u’musicbrainz.org’, 443)
E: 21:28:18 Network request error for https://musicbrainz.org:443/oauth2/token: Error downloading https://musicbrainz.org:443/oauth2/token - server replied: Bad Request (QT code 299, HTTP code 400)
E: 21:28:18 OAuth: authorization_code exchange failed: {“error”:“invalid_request”,“error_description”:“Required parameter is missing: code”}


#3

Please give some more info to track this down:

  1. What Linux distribution are you using?
  2. What desktop environment are you using?
  3. What browsers do you have installed?
  4. Which is the default browser?

Also please try to run the following from the command line and tell us what happens:

python2 -m webbrowser -t "http://www.musicbrainz.org"

#4

Yea sorry:

  1. Linux Mint

  2. Firefox

  3. Firefox now, it wasn’t set as default but the only one I have.

  4. ??/ hmm not sure what you mean.

I will post the result in a sec


#5

gvfs-open: http//www.musicbrainz.org: error opening location: Error when getting information for file ‘/home/andrew/http/www.musicbrainz.org’: No such file or directory <<< forget it, missed the :


#6

Should be 2. I am not sure what you mean!! Tired sorry.

  1. Linux MInt
  2. Firefox
  3. Firefox now!

#7

Ok so numbers are being changed! I think you get what I mean!


#8

Desktop environment - Cinnamon perhaps?


#9

I’m tired…going to bed… just typed in your python2 -m webbrowser -t “http://www.musicbrainz.org” again and it opened the browser and took me to MB


#10

If it wasn’t set as default but you did it now, try opening a browser from within Picard again.


#11

No difference made by making it default.

Just to emphasise, picard does go and find the release and moves it to the right side (so not a connection issue that way). I cannot “Lookup in Browser” though.

If I do a look-up the log shows:

D: 15:56:30 webbrowser2: https://musicbrainz.org:443/release/9764773c-0895-4b0e-ad60-e7b567b93495?tport=8000


#12

Wait … the problem “webbrowser2” that throws a “no module named webbrowser2” ?? Ok so that’s a picard extension…so probably not.


#13

What version of Picard do you have and how did you install it?


#14

That looks totally fine, that should be the last line of log output just before the URL gets loaded in your browser. I tested on Linux Mint 18.1 with Cinnamon to try to reproduce this issue, but it is working fine for me both with Picard 1.3.2 from the repository and the latest 1.4 from source.

Maybe stupid question, but are you absolutely sure it does not load in Firefox? Maybe you have multiple Firefox windows open and the URL opens in a new tab in another window than you expect.

Yes, that’s an Picard internal module. It is an extension of webbrowser with some extensions. As a last test could you try to run this on the command line:

xdg-open https://musicbrainz.org:443/release/9764773c-0895-4b0e-ad60-e7b567b93495?tport=8000

I think this is what actually should get run by Picard on Linux in most cases.


#15

Freso: I installed it via Flatpak as per https://picard.musicbrainz.org/docs/linux/#flatpak

oustidecontext: Yea I should have checked further before I added that log. It is definitely not getting to the browser

I have even tried it on chromium and still nothing…

Might have to work out how to uninstall and try again. Will give that command a go…


#16

Works as expected, opened a browser etc


#17

Version 1.4.1 (it says on the version page, also says Discid is not installed?)


#18

The flatpak part might actually be the problem here. Flatpak just recently got support for xdg-open properly working inside the sandbox, maybe this is not yet working. Or it does not even use xdg-open inside the sandbox. You might try if a flatpak update and flatpak update --user helps.

Also libdiscid is currently not part of the flatpak install if I see this correctly. I think it could be added, but it might need some tinkering with the Flatpak sandboxing to access the CD devices.

Not sure who actually setup Picard’s Flatpak support, does anyone know?


#19

I uninstalled and re-installed (using flatpak again) - same result. The update has not helped.

Can you point me to where I can install from scratch then, please. And thanks for your help.


#20

Easiest for you would normally be to install from the PPA, but unfortunately this is out of date and I actually owe @samj1912 feedback on this, as I promised to update the PPA, but ran into issues and did not find the time to get this done :frowning:

You could also install from source, basic instructions are in https://github.com/metabrainz/picard/blob/1.4.x/INSTALL.txt