Token error on rarbg

Sonarr version (exact version): 2.0.0.4326
Mono version (if Sonarr is not running on Windows): n/a
OS: Windows 10 64bit
Debug logs: http://pastebin.com/5wwiWsyb
Description of issue:

Hi.

Like I said in 12047,

If I use manual search I get correct results:


But if I click on one of those links to open the page on rarbg, I get this message:

Invalid token. Use get_token for a new one!

I think only the opening from manual search is affected because automatic importing seems to work.
If I try to get a new token by invoking:

https://torrentapi.org/pubapi_v2.php?get_token=get_token

I get the very same token that Sonarr uses.

What can I do to fix this?

Thanks in advance!

Do the logs show an automatic search or a grab from the manual search? Because the logs show a successful grab.

Please post ((trace logs)) showing the issue sending the release to your download client.

Those logs were from manual search. I didn’t have the debug enabled when last successful automatic grab occured.

I won’t have an automatic event till probably Monday.
Will the automatic search be sufficient to investigate?

PS: Like I said - it seems to me like the everything is working between Sonarr and Deluge.
It’s just when I want to open the release page from within Sonarr, using the link that redirects me through torrentapi, that’s when it hits the wall and I get the “invalid token” message.

Ahh sorry, I misunderstood, I was thinking it failed when grabbing, but it’s failing when opening the release info page?

Correct.
It’s happening both when

  1. opening from the Manual search (like on the screen in the first post), and
  2. on the episode info, in History tab, when I point the question mark and click the “Info” link in the bubble.

In both instances, I get the same error message:

Invalid token. Use get_token for a new one!

I looked into this and I see it as well, but it is an issue on RARBG’s end, not something we can fix. I’ve filed an issue with them: https://github.com/rarbg/torrentapi/issues/12

Oh, I understand. Thank you for your help. Looks like I’m going to have to wait for them.

@markus101, Really should’ve pinged me before posting to torrentapi. This isn’t something rarbg will/can fix. The token is a protection mechanism. It’s there to make sure every url is invalid unless used in a short enough time.
The only way we can fix it is by redirecting the info link via sonarr first.

@Taloth If it’s used immediately it still fails, so there is an issue on the RARBG side.

Different useragent?

Edit: Nope, tested it outside of Sonarr, seems to be broken.

@ThatWhiteMonster rarbg fixed it

I can confirm it works :slight_smile: .

Thank you @markus101 and @Taloth !!

Quick question. How long is the token supposed to be valid? 24hrs?

Because I’m not getting that error in manual search anymore but looks like I keep getting it in links from release history. Even after 2-3hrs after grabbing.

Much shorter than 24 hours, I’m not sure how long its valid for though.

I’m using those links for quite some time now and just from experience I assumed that it’s around 24hrs. They tend to work the next morning after grabbing.

Now it’s not even “few hours” . . .

Afaik It’s valid as long as there’s a session in Sonarr that periodically refreshes the token. It gets extended on each rss sync.

By that logic it should be valid as long as Sonarr session runs uninterrupted.
I don’t have time to check periodically, but I checked last night, 1 hour after grabbing and the link was working. Then I checked this morning, which puts the link at being 9 hours old and I got the token error.
Today I also couldn’t use the link that was 3 hours old.

That’s really strange, because until recently I could use those link for (I think) up to 24hrs. I used to do that all the time. Did something change on rarbg side?

I don’t know if it was there before, but I’ve found the apidoc for rarbg and it says that the token is valid for 15 minutes. I’m lost. Like I said, I could use the link 1 hour after grabbing last night.

Anyway, here’s the link to apidoc that I’ve found: https://torrentapi.org/apidocs_v2.txt

yes, it’s valid for 15min unless extended. With the rsssync at 15min it’s a coin toss.
Best way would be to redirect the link via sonarr, so we can tack a new token on it, but atm I don’t want to invest the effort to do that.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.