cecobask / imdb-trakt-sync

Automatic sync from IMDb to Trakt (watchlist, lists, ratings and history) using GitHub actions.
MIT License
91 stars 216 forks source link

Error code 422 #37

Closed zoken01 closed 3 months ago

zoken01 commented 3 months ago

Hello!

I have been getting this error for a while and couldn't find any fixes.

I updated the code and resubmitted the secrets. I'm getting this error:

Error: error creating syncer: failure hydrating trakt client: failure simulating trakt device activation form submission: http request POST https://trakt.tv/activate returned status code 422: unexpected status code 422

image image

Is there anything I might have done wrong?

cecobask commented 3 months ago

Hi @zoken01, this looks like a problem with one of the secret values. One of them may contain an invalid character/s. I recommend double-checking that the values for the Trakt secrets are correctly set. If the possibility of invalid characters is ruled out, I won't be able to help without knowing your secret values. Please don't post any of your credentials here as they may be picked up by malicious actors. Feel free to email them to me at baskski@gmail.com and I can take a look for you. After I finish debugging you can rotate your credentials :+1:

zoken01 commented 3 months ago

Wow! You can feel the years of debugging ^^ I pasted the values of the Trakt secrets in a notepad and there were some inserted spaces.

It now works again flawlessly.

Thank you immensely for the quick reply and for your work.

Cheers :)

cecobask commented 3 months ago

I'm glad I could help you out! I just pushed a permanent fix for this issue now. From now on spaces will be automatically stripped from secret values. The only exceptions are the TRAKT_PASSWORD and IMDB_LISTS.