Installation asking for GOG token

I’ve installed GOG games a bunch of times on my machine.

AFter a distro hop, I was looking to install Civ IV again, however I’m getting an error message that interrupts installation saying that it couldn’t detect a GOG token.

How do I resolve that error message (without signing in)?

Thanks

Edit: Here’s the error log

No GOG token available

Traceback (most recent call last):

File “/usr/lib/python3.12/site-packages/lutris/util/jobs.py”, line 30, in target
result = self.function(*a, **kw)
^^^^^^^^^^^^^^^^^^^^^^^

File “/usr/lib/python3.12/site-packages/lutris/installer/interpreter.py”, line 204, in get_extras
return self.service.get_extras(self.installer.service_appid)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File “/usr/lib/python3.12/site-packages/lutris/services/gog.py”, line 341, in get_extras
game = self.get_game_details(gogid)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File “/usr/lib/python3.12/site-packages/lutris/services/gog.py”, line 291, in get_game_details
return self.make_api_request(url)
^^^^^^^^^^^^^^^^^^^^^^^^^^

File “/usr/lib/python3.12/site-packages/lutris/services/gog.py”, line 228, in make_api_request
token = self.load_token()
^^^^^^^^^^^^^^^^^

File “/usr/lib/python3.12/site-packages/lutris/services/gog.py”, line 202, in load_token
raise AuthenticationError(“No GOG token available”)

lutris.exceptions.AuthenticationError: No GOG token available

Lutris log:
[INFO:2024-12-06 05:44:46,882:application]: Starting Lutris 0.5.18
[INFO:2024-12-06 05:44:46,909:startup]: “card1” is AMD Radeon RX 7700 XT (1002:747e 1da2:475f amdgpu) Driver 24.3.1
[INFO:2024-12-06 05:44:46,931:startup]: “card0” is AMD Radeon Graphics (1002:164e 1462:7d78 amdgpu) Driver 24.3.1
[ERROR:2024-12-06 05:44:46,932:startup]: i386 libgnutls.so.30 missing (needed by gnutls)
[INFO:2024-12-06 05:45:00,256:gog]: Getting game details for 1760534591
[ERROR:2024-12-06 05:45:00,256:jobs]: Error while completing task <bound method ScriptInterpreter.get_extras of <interpreter.ScriptInterpreter object at 0x7d3dbfc24300 (lutris+installer+interpreter+ScriptInterpreter at 0x5c76708ae7f0)>>: <class ‘lutris.exceptions.AuthenticationError’> No GOG token available

SOLVED: Major thanks to Asaftiifm, for not only helping me figure out how to bypass GOG token business, but also finding flaws in the script and fixing them!

You can’t use the GoG source or refresh your games list without a token (~/.cache/lutris/.gog.token), but you can use the old install script if you’ve already downloaded the exe.

But that’s the problem I’m running into.

I’m trying to use the install scripts (as i’ve always done), but it’s asking me for a token.

Are you saying I should download the install scripts separately and then run it?

As an FYI as to when this message is popping up: it pops up after I select the game script. Before I can even point to the install files.

In 5.18…
When that token expired a week or so ago (GoG put a time on it, I guess?) I had to log in again.
If I remove .gog.token then the GoG source becomes entirely unavailable and my GoG source games list vanishes. To get it back I have to reconnect the source…by logging in again.

Yes, I can still use an installer from the Lutris site - where it isn’t an (Auto) one that needs the GoG source to be available.
I just tested using the Batman: Arkham Asylum GoG GOTY installer (the installer I have cached) and it installs fine.

That said, some of the installers might be referring to the GoG source by default…

So just as a follow up to this:

I tried downloading the installation script directly from GOG’s site and running the script separately.

Unfortunately it also throws up an error asking for a GOG token.

At the time I just gave up and logged in (which again I don’t want to do, and you didn’t need to have to do. I think its a change with the recent 5.18 update)

It might be game specific…but I don’t think so. The game in question is Civ IV. The script was updated 9 months ago (for the complete edition).

However I recently installed the game in September and it worked fine, without asking for a token.

So I don’t know to be honest. I’m confused.

Just found out - downloading the .json behaves differently to copying the .yaml from the “view” option.
I nearly always view the script and copy the YAML out as if I’m going to make a new one.

Quick fix - change the variable “version:” from “GOG” to something random.

1 Like

First, just thank you in general. I didn’t think you would persevere in helping me.

I was wondering if I could ask you some follow up niggly details (I’m not very technical, using Lutris itself is daunting for me, and now we’re way way out of my comfort zone).

If you have time, I hope you don’t mind in me asking a few follow up questions

1.) Just to establish commonality: this is the script in question Lutris - Open Gaming Platform

Not the “script only” or “json” file, but the middle YAML link

2.) “Version” appears at the end, so I just change that to “Bob” instead of GOG?

3.) Just copy that text and save it in a text file. Do I have to name that text file something special? How do I save it as a YAML script? Or will it be automatically recognized as a YAML file?

4.) Finally how do I run the script? Within Lutris do I just select “local install script” or does it require some additional wizadry.

Thanks again for all the help you’ve given me, and in advance here also if you get a chance.

Thanks

Hi,

  1. Yes middle tab in YAML, copy out the content in the box
  2. Don’t need to edit the YAML, it works as is

Was this happening?
When you use the “download script” button which defaults to JSON, it has something like the following: -

{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": 555,
      "game_id": 2047,
      "game_slug": "system-shock-2",
      "name": "System Shock 2",
      "year": 1999,
      "user": "ryochan7",
      "runner": "wine",
      "slug": "system-shock-2-gog",
      "version": "GOG",
...

The variable/declaration “version:” with a value of “GOG” triggers the token behaviour we see in Lutris - it thinks it needs the GoG source to be active in order to install.

If you change the value in the JSON to something random, the installer works…

      "version": "random1",

…without prompting for a token.

I’ll dig through the installer.py to find out why JSON and YAML behave differently, but that’s a task for another day and a probably a GitHub bug log :slight_smile:

1 Like

So good news bad news.

The good news is that I think the edited script works! I am no longer asked for a token and proceed with installation as normal.

Bad news is that I’m still running into a bug that I’ve been experiencing with Lutris for over 2 months now; where it aborts installation of the game with error 256. I’ve tried searching for that code, but haven’t really found naything of substance. I think I’m going to sit by and wait for a future Lutris Update.

Thank you so much for ALL your help. I really appreciate it!!

@rrrsssttt which game has an error 256? which installer version? Post url here.

A bunch of of things cause 256 - old Lutris versions, permissions, broken cache, missing drivers, lacking pre-reqs, broken support tools (like winetricks,) or trying install into an existing directory :slight_smile:

Start Lutris in debug mode, then post the install log here.

Here’s the error page that pops up up

Here is the output from the terminal:

I will be genuinely amazed if you can make sense of that

Easy enough - now we just need to see the install script you changed to work out why it bails on that function :slight_smile:

Edit: Do you have a custom Python3? Just list out the GObject version for us?

pip3 list | grep -i gobject

So referring back to my comment about being technically inept, I (at least on purpose) don’t have a custom version of python

I am running Endeavour OS with defaults (just added a few apps and changed settings in Plasma).

Here is the output of that command (heck even I understand the output here):
bash: pip3: command not found

@rrrsssttt I saw in your log:
Wine is not installed on your system; required dependencies may be missing.

You need to install all dependencies:

That’s interesting; I thought the advantage of Lutris was that it would download wine on its own. I’ve never installed wine on my own and relied on Lutris downloading whatever it needs.

But it is what it is (though I am curious as to why I’ve never needed to download wine before), and I ran: sudo pacman -S wine

Then I proceeded with the installation as before, however now installation ends with a new error that I’m supposed to “share the details with the Lutris team.”

The error window says: Expected string but got 0<class ‘int’>

Did you read the doc I posted and did you install dependencies for your distribution? It’s not optionnal, install only wine like you did:
pacman -S wine
is not enough

Oh, sorry, I thought the quote you posted was the entire information. Didn’t realize there was a bigger link in there with more instructions.

Per instructions I have run:
sudo pacman -S wine-staging
sudo pacman -S --needed --asdeps giflib lib32-giflib gnutls lib32-gnutls v4l-utils lib32-v4l-utils libpulse
lib32-libpulse alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib sqlite lib32-sqlite libxcomposite
lib32-libxcomposite ocl-icd lib32-ocl-icd libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs
lib32-gst-plugins-base-libs vulkan-icd-loader lib32-vulkan-icd-loader sdl2 lib32-sdl2

I am getting the same error again

Full disclosure (and again I apologize for complicating the situation here): because I don’t want to log in to GOG, I’m running the “edited” installation script. So copied the new installation script, and then changed the second last line of the script as seen here:

description: Play "Civilization IV" on Linux!game_slug: sid-meiers-civilizatio - Pastebin.com

Edit; With apologies, I don’t know why the text is showing up funny. I hope its still legible. (oh got it fixed, never mind. Text shows up fine now)

The edit for GOG and formatting is fine.
I’ve replicated the fault, but two issues exist (and it’s not your fault! :slight_smile: )

  • line 53 - double dollar sign - remove one of them
  • the input menu values get assigned a type of int, breaking GObject.py which is expecting a string. The input_menu function should probably force a string.

You can work around the error by stripping the input_menu.
Remove lines 41-50 inclusive, then change $INPUT_LANG on the new line 44 to your desired language, for example to set it to French:

        = 0/Language = 1/g' $game_cfg;

Edit: sorry it’s late and took a while but I hate being beaten by scripts :stuck_out_tongue:
Tested and running the game without issues.
Looking at PyGObject 3.47 it changed some type handling, so this might have worked previously?

1 Like

SUCCESS!!!

Oh man, thank you so much. Thank you.

Again hats off to your for your perseverance, and expertise at being able to dig through the script and find flaws in it.

It’s been over two months that I’ve wanted to play this game and you’ve sorted it! You’ve just planned my entire weekend.

Thank you again.

And assuming you speak French, here’s me calling back to highschool french: merci beacoup pour votre aide! Merci mon amie!

1 Like