You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Did you know that the more info on an issue is provided the more easily it is to locate and fix?
Nevertheless, I did encounter the same error, BUT, after running the script the second time after claiming the game.
Full error looks like following:
TypeError: Cannot read properties of null (reading '1')
at file:///free-games-claimer/gog.js:102:62
So I would assume the issue is that on the consecutive runs the matching text is not found returning null, and attempting to access [1] on the null value.
const title = text.match(/Claim (.*) and don't miss the/)[1];
I`ve never encountered this before personally, and I run the script twice each time, so most likely the are some changes on the GoG website that have caused this. Not sure how to test without a giveaway though.
I can confirm this happens after there are no more games to claim, so likely a change on the site occurred. If a game is available to claim it works just fine.
- const title = text.match(/Claim (.*) and don't miss the/)[1];+ const match_all = text.match(/Claim (.*) and don't miss the|Success! (.*) was added to/);+ const title = match_all[1] ? match_all[1] : match_all[2];
No description provided.
The text was updated successfully, but these errors were encountered: