epicgames-freebies-claimer: TypeError in getOffer
Actual Behavior
> node claimer.js
2021-10-14 | 15:24:25.045 | ERROR | TypeError: Cannot read properties of null (reading 'split')
at getOffer (/app/src/gamePromotions.js:14:54)
at /app/src/gamePromotions.js:17:27
at Array.map (<anonymous>)
at freeGamesPromotions (/app/src/gamePromotions.js:16:45)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /app/claimer.js:72:30
Steps to Reproduce the Problem
- pull latest image from docker
docker-compose run epic_free
Specifications
Running using docker-compose instructions, pulled latest image
Notes
This was working previously, stopped working today.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 3
- Comments: 22 (14 by maintainers)
Anyone want to test/review my PR? Here is the changed file directly: https://github.com/Revadike/epicgames-freebies-claimer/blob/766ae427192417d4105930d098a006fc795ac031/src/gamePromotions.js
I think those endpoints can be replaced with https://www.epicgames.com/graphql?operationName=getMappingByPageSlug&variables={"pageSlug":"paladins--paladins-epic-pack"}&extensions={"persistedQuery":{"version":1,"sha256Hash":"5a08e9869c983776596498e0c4052c55f9e54c79e18a303cd5eb9a46be55c7d7"}}
But here the problem is calculating the hash, which I am currently looking into.
Docker image is updated. Sorry for the delay, it was 2AM at my timezone when v1.5.5 was released lol.
This bug is not related to device auth, just wait for a fix.
When visiting https://www.epicgames.com/store/en-US/p/paladins--paladins-epic-pack
Nice find. I don’t think we need to calculate the hash, try another addon:
https://www.epicgames.com/graphql?operationName=getMappingByPageSlug&variables={“pageSlug”:“horizon-chase-turbo--horizon-chase-turbo-rookie-series”}&extensions={“persistedQuery”:{“version”:1,“sha256Hash”:“5a08e9869c983776596498e0c4052c55f9e54c79e18a303cd5eb9a46be55c7d7”}}
This is for https://www.epicgames.com/store/en-US/p/horizon-chase-turbo--horizon-chase-turbo-rookie-series
I think the hash is for the query itself, so we can reuse the hash. Btw how did you find this query lol.