[Linux] Unable to open browser from the UI

Discussion in 'Mac and Linux' started by sevmek, August 27, 2015.

?

Are you able to open your browser from the UI ? (please specify your OS in the comments)

  1. Yes

    75.0%
  2. No

    25.0%
  1. sevmek

    sevmek Active Member

    Messages:
    114
    Likes Received:
    59
    Hi,

    Links to the web (forums, video, twitch...) never worked in PA for me. I'm using Fedora 22. I had weird stuff about SQL or just nothing at all. Well, the game is broken for me atm, I decided to have a closer look at it.

    Asking for a web link from the UI triggers this error:
    Code:
    XPCOMGlueLoad error for file /usr/lib64/firefox/libxul.so:
    /home/steam/.steam/bin32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libnss3.so: version `NSS_3.19' not found (required by /usr/lib64/firefox/libxul.so)
    Couldn't load XPCOM.
    xdg-open: no method available for opening 'https://forums.uberent.com/categories/planetary-annihilation-titans.94/'
    Obviously there is a call to Firefox (which is my default browser). Sounds good. But then Fireox complain about a library (libnss) not in the right version (NSS_3.19).

    The weird thing is firefox tries to use a library in the /home folder! And more precisely a library installed by steam instead of my system libray. And indeed there is an issue here:
    The steam installed library:
    Code:
    $ strings /home/steam/.steam/bin32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libnss3.so | grep NSS_3.
    NSS_3.2
    NSS_3.2.1
    NSS_3.3
    NSS_3.3.1
    NSS_3.4
    NSS_3.5
    NSS_3.6
    NSS_3.7
    NSS_3.7.1
    NSS_3.8
    NSS_3.9
    NSS_3.9.2
    NSS_3.9.3
    NSS_3.10
    NSS_3.10.2
    NSS_3.11
    NSS_3.11.1
    NSS_3.11.2
    NSS_3.11.7
    NSS_3.11.9
    NSS_3.12
    NSS_3.12.1
    NSS_3.12.3
    NSS_3.12.4
    NSS_3.12.5
    NSS_3.12.6
    NSS_3.12.7
    NSS_3.12.9
    NSS_3.12.10
    NSS_3.13
    NSS_3.13.2
    NSS_3.14
    NSS_3.14.1
    NSS_3.14.3
    NSS_3.15
    NSS_3.15.4
    NSS_3.16.1
    NSS_3.16.2
    My system library:
    Code:
    $ whereis libnss3.so
    libnss3: /usr/lib/libnss3.so /usr/lib64/libnss3.so
    Code:
    $ strings /usr/lib64/libnss3.so | grep NSS_3.
    NSS_3.2
    NSS_3.2.1
    NSS_3.3
    NSS_3.3.1
    NSS_3.4
    NSS_3.5
    NSS_3.6
    NSS_3.7
    NSS_3.7.1
    NSS_3.8
    NSS_3.9
    NSS_3.9.2
    NSS_3.9.3
    NSS_3.10
    NSS_3.10.2
    NSS_3.11
    NSS_3.11.1
    NSS_3.11.2
    NSS_3.11.7
    NSS_3.11.9
    NSS_3.12
    NSS_3.12.1
    NSS_3.12.3
    NSS_3.12.4
    NSS_3.12.5
    NSS_3.12.6
    NSS_3.12.7
    NSS_3.12.9
    NSS_3.12.10
    NSS_3.13
    NSS_3.13.2
    NSS_3.14
    NSS_3.14.1
    NSS_3.14.3
    NSS_3.15
    NSS_3.15.4
    NSS_3.16.1
    NSS_3.16.2
    NSS_3.18
    NSS_3.19
    NSS_3.19.1
    Let's see if we can workaround this by faking the steam library with the system library (with a symbolic link):
    DO NOT TRY THIS! (it will mess with steam)
    Code:
    $ mv /home/steam/.steam/bin32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libnss3.so /home/steam/.steam/bin32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libnss3.so.BACKUP
    $ ln -s /usr/lib64/libnss3.so /home/steam/.steam/bin32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libnss3.so
    And indeed there is some progress: the error changed.
    Code:
    (firefox:5976): GLib-GObject-CRITICAL **: /usr/src/packages/BUILD/glib2.0-2.32.3/./gobject/gtype.c:2722: You forgot to call g_type_init()
    
    (firefox:5976): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed
    
    (firefox:5976): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed
    My guess is PA:T is using some libraries from steam instead of using the library from my system.

    If I run directly:
    Code:
    $ xdg-open https://forums.uberent.com/categories/planetary-annihilation-titans.94/
    It works.

    @Uber, can you please look into this?

    EDIT: and silly me, I voted "Yes'...
    tracert likes this.
  2. tracert

    tracert Member

    Messages:
    51
    Likes Received:
    13
    Not working for me on Ubuntu 15.04 in Titans and classic, never has.
  3. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Works fine for me on Kubuntu 14.04. They weren't working for the longest time until Uber fixed it about two or three months ago. Maybe even longer.

    But I don't use Steam, so the PA client might just grab the system library. Or it might not, as my PA client does come with the steam-runtime libraries. And I do have Firefox as my default browser and PA indeed opens its links in there.
  4. sevmek

    sevmek Active Member

    Messages:
    114
    Likes Received:
    59
    I guess if you rename steam's libnss3.so (and you can find your way with a terminal, cause this is pretty dangerous for steam to mess with it's files)
    Code:
    mv ~/.steam/bin32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libnss3.so ~/.steam/bin32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libnss3.so.BAK
    
    and start PA like this:
    Code:
    ~/.steam/bin32/steam-runtime/run.sh /home/steam/.local/share/Steam/SteamApps/common/Planetary\ Annihilation\ Titans/PA
    You'll get the answer...
  5. n00n

    n00n Active Member

    Messages:
    345
    Likes Received:
    210
    As you've found applications using the steam runtime are not supposed to launch system applications. This is expected behaviour.

    You shouldn't mess with the steam runtime files. That can mess things up for other games. Running the game without the runtime as (DeathByDenim said) should work fine.
    DeathByDenim likes this.
  6. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    I think you missed the part where I said "But I don't use Steam". :)
    It's just that the Linux client of PA comes with the Steam libraries, no matter if you actually have Steam installed or now.

    However, as a test, I did rename the libnss.so.3 file in ~/Games/PA/stable/steam-runtime/blablabla and replaced it with an empty file. PA then fails to load, so it's indeed using that one.
  7. sevmek

    sevmek Active Member

    Messages:
    114
    Likes Received:
    59
    You nailed it!
    I was launching with steam runtime:
    Code:
    $ ~/.steam/bin32/steam-runtime/run.sh /home/steam/.local/share/Steam/SteamApps/common/Planetary\ Annihilation\ Titans/PA
    Launching directly fix the issue here:
    Code:
    $ /home/steam/.local/share/Steam/SteamApps/common/Planetary\ Annihilation\ Titans/PA
    tracert likes this.
  8. n00n

    n00n Active Member

    Messages:
    345
    Likes Received:
    210
    Last edited: August 27, 2015
  9. tracert

    tracert Member

    Messages:
    51
    Likes Received:
    13
    So I launched Titans directly from the command line and the links open firefox :)
    It doesn't automatically login to playfab tho for some reason.
  10. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    That's because you are basically running it outside of Steam now, so PA isn't getting login credentials.
    tracert likes this.
  11. tracert

    tracert Member

    Messages:
    51
    Likes Received:
    13
    I just installed your alternative launcher and now auto login works too. Thanks for making it.
  12. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Yeah, about that. Those only seem to remain valid for a day or so. That's because I don't store the password somewhere, but only the session ticket.

    On the bright side, I had one report that my launcher is 2.5 times faster than Steam in updating PA, so there is that. :)

Share This Page