rommapp / romm

A beautiful, powerful, self-hosted rom manager
https://romm.app
GNU Affero General Public License v3.0
1.77k stars 80 forks source link

[Bug] Scan failed: invalid leading whitespace #776

Closed ShadowPeo closed 5 months ago

ShadowPeo commented 5 months ago

RomM version 3.0.0

Describe the bug Error getting Twitch Tokens (Invalid Client or Secret Error)

To Reproduce Steps to reproduce the behavior:

  1. Build new container with either existing or new credentials
  2. Start Container - Error in logs at startup

Further Diagnosis

  1. Log into Ap
  2. Select Admin Panel
  3. Select Library
  4. Select Scan
  5. Start Scan - Get error

Expected behavior Successfull retrieval of IGMP token

Screenshots

Dozzle Logs, One is startup, second is showing same error as what is shown in the GUI upon manual scan trigger

Screenshot 2024-03-31 at 21 50 36 Screenshot 2024-03-31 at 21 50 56

In App Library Scan Response, as you can see there is a leading space, this is not present in the config file

Screenshot 2024-03-31 at 21 45 56

Additional context Had this all working under a 2.X system, upon upgrade with the breaking changes, DB would not work and just threw errors, as there was nothing there dropped the DB, wiped all the data and folders to start again so this is clear. The error showed up with the original working Client ID and Client secret so tried new secret on same ID, same thing. Tried new application (and hence client ID) set up the same way as the old one, no change, tried set up as per instructions, no change all return the same error in both places

gantoine commented 5 months ago

can you post your docker compose? i see a space in the header value that might be causing issues, ' z4f...

ShadowPeo commented 5 months ago

Sorry, I have not gotten back to you over the past few days; I'm tied up with work.

A fresh set of eyes in the morning found one bug in the docker-compose, more specifically one of the ENV files I use to process changes had a space between the env file variable name and the declaration of the variable name from the env file where I store the secrets.

This, however, seems to be only one part of the issue as the authorisations would not work still.

The second part seems to have been a Twitch issue, as re-generating a new secret (not even ID) in the morning after it failed validation from the above error did get it to work. This could have just been again me being tired when trying to fix the issue, or it could have been an issue on their end or lockout on the secret; I have no idea, just that a reset for the secret fixed it.

Thanks for your help