Open andrKonan opened 3 years ago
Could you go to about:debugging and click inspect on the extension. Can you email me the error message? It should show the request that was sent.
GET https://sponsor.ajay.app/api/getViewsForUser?userID=JVQiQ [HTTP/1.1 404 Not Found 242ms] GET https://sponsor.ajay.app/api/getSavedTimeForUser?userID=JVQiQ [HTTP/1.1 404 Not Found 334ms] POST https://sponsor.ajay.app/api/setUsername?userID=JVQiQ&username=a10db4eaace [HTTP/1.1 400 Bad Request 213ms]
@ajayyy It seems that my id isn't in your server
I have the same issue when I try to submit segment. I use the official plugin on firefox. Looking in about:debugging shows that this is the request payload:
{"videoID":"suyGWHqG3YM","userID":null,"segments":[{"segment":[56.622727,99],"UUID":null,"category":"selfpromo"}]}
Is it the null arguments causing issues?
Ah, that would make sense. Maybe this occurs when the browser storage sync is not fast enough and loads userID
as null. UUID
being null is fine.
I generated a fresh UUID by using uuidgen. Setting this new user id in options solved the issue for me :)
Edit: So I guess the user id somehow never got set to begin with?
Possibly. By the way, it should be a long randomly generated string instead of a UUID as it is used like a password.
Right now, it only generates it on install. Maybe it should try when submitting as well?
https://github.com/ajayyy/SponsorBlock/blob/master/src/background.ts#L68
uuidgen creates a random UUID, so should work just as well.
Perhaps giving the user the choice to generate is a good idea, don't want to silently switch the id if something else has gone wrong
Yea, that would be my worry, but a warning should help with that.
Generating a new userID is scary since it might just be missing from the storage temporarily, and generating a new one will overwrite that.
Possible solutions:
Browser: Firefox 80.0.1 Add-ons: there is no any difference with or without
For any of api requests from add-on server gives me an error 400. But when I use, as an example, python to request (
requests.get('https://sponsor.ajay.app/api/getTopUsers', params={'sortType':0})
) it response with code 200.