Git Product home page Git Product logo

epicgames-freebies-claimer's Introduction

epicgames-freebies-claimer's People

Contributors

akssshh avatar davispuh avatar drosocode avatar ffuubarbuzz avatar jackblk avatar journeyover avatar lingsamuel avatar lupohan44 avatar mustanglee avatar revadike avatar thorstenbe avatar wzxjohn avatar zaevi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

epicgames-freebies-claimer's Issues

Failed to exec start script

Hello
I'm trying to run this application, but it fails. I have the latest version on Windows.
I've installed nide.js and git.
Do I need to install EPic lanucher as well?
I tried to put my creds in config file and start it with npc start command (if you need log let me know)
Also I tried to run it on this way:
npc start myusername mypassword 1 my2facode LOG: https://pastebin.pl/view/6c4bf224
npc start myusername mypassword my2facode LOG: https://pastebin.pl/view/3f1e23a8
But it always fails.
I'm running cmd as admin. It seems like it can't create a directory, but idk why.
Please let me know what could be the issue?
Thanks

How to run automaticaly?

I finally managed to login today with this claimer, but I don't see the point of usage if it can't be automated. After login it log me out:

2020-08-31 | 22:02:36.376 | WARN | Invalid captcha!
2020-08-31 | 22:02:36.388 | WARN | Failed to login as [email protected], please attempt manually.
You need to solve CAPTCHA!
2020-08-31 | 22:05:59.208 | INFO | Logged in as loginname(exxxxxxx0)
2020-08-31 | 22:06:05.392 | INFO | Shadowrun Collection was already claimed for this account
2020-08-31 | 22:06:06.262 | INFO | Logged loginname out of Epic Games

Next time when I run npm start it again ask to solve the 9 CAPTCHA dices which takes more time and effort as if log into the website directly, so I really don't understand how to automate this script.
So far I thought after login it wil stay in check and claim loop. It seems I was wrong. Or am I wrong? Thanks

Git submodule error

Hi everyone, I tried to install this script on my raspberry pi and it didn't worked, so I tried on my windows and it also didn't worked, I have npm, nodejs and also git. I updated all of them even the OS but I still have this error:

>npm install
npm ERR! code 128
npm ERR! Command failed: git submodule update -q --init --recursive
npm ERR! fatal: No url found for submodule path 'docs/.vuepress/dist' in .gitmodules
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\MyUser\AppData\Roaming\npm-cache\_logs\2020-07-02T18_30_39_464Z-debug.log

When I use the sudo keyword on my raspberry pi, I have:

npm ERR! code 128
npm ERR! Command failed: git clone --depth=1 -q -b develop git://github.com/Revadike/node-epicgames-client.git /root/.npm/_cacache/tmp/git-clone-a37cbbd3
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-a37cbbd3': Permission denied
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-02T18_36_56_092Z-debug.log

Here's the complete log: https://pastebin.com/pPe3bACm

Thanks for your help

Cant run npm install

When I run npm install it gives the following output:

C:\Users\user\Downloads\epicgames-freebies-claimer-master>npm install
npm WARN deprecated [email protected]: Fixed a prototype pollution security issue in 4.1.0, please upgrade to ^4.1.1 or ^5.0.1.
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://[email protected]/Revadike/node-epicgames-client.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2020-09-20T12_22_42_582Z-debug.log

Here is the log: https://pastebin.com/cEp88L7Z
Im on Windows btw

e.isFile is not a function

As soon as the node.js script is runned, it exits immediately with the following error:
TypeError: e.isFile is not a function
at readdir.forEach (D:\epic-games-claimer\epicgames-freebies-claimer\node_modules\epicgames-client\resources\GraphQL.js:8:11)
at Array.forEach ()
at getGraphQL (D:\epic-games-claimer\epicgames-freebies-claimer\node_modules\epicgames-client\resources\GraphQL.js:7:39)
at Object. (D:\epic-games-claimer\epicgames-freebies-claimer\node_modules\epicgames-client\resources\GraphQL.js:17:15)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)

why show this error?

(node:25612) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'call' of undefined
at GotError.get (F:\epicgames-freebies-claimer-master\node_modules\nested-error-stacks\index.js:22:52)
at formatError (internal/util/inspect.js:907:19)
at formatRaw (internal/util/inspect.js:703:14)
at formatValue (internal/util/inspect.js:591:10)
at Object.inspect (internal/util/inspect.js:221:10)
at Object.exports.format (F:\epicgames-freebies-claimer-master\node_modules\tracer\lib\utils.js:22:22)
at logMain (F:\epicgames-freebies-claimer-master\node_modules\tracer\lib\console.js:53:25)
at Object._self. [as error] (F:\epicgames-freebies-claimer-master\node_modules\tracer\lib\console.js:151:12)
at F:\epicgames-freebies-claimer-master\claimer.js:171:12
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:25612) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:25612) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Github Actions setup option

Instead of running this on your own computer, you can use GitHub actions to run it every day automatically. This will help if you don't always have access to your personal computer e.g. if you live in a hostel, where you can't just write your password in a file and assume nobody will see it.

You can create a repository with an action which runs this project. But you can't store plaintext credentials in a public repository. (you can do this with a private repository but you need to write a separate action to first edit the config.js). You can use secrets in github actions which nobody but only you can access.

Using github actions would also mean that you don't have to update it manually. It would clone the latest version and everything will be automatic.

That happens but idk how to fix it

This happens:

C:\Users\user\Downloads\epicgames-freebies-claimer-master>npm start

> [email protected] start C:\Users\user\Downloads\epicgames-freebies-claimer-master
> node claimer.js

 2020-09-20 | 19:10:19.587 | ERROR | Error: ENOENT: no such file or directory, mkdir 'C:\Users\user\Downloads\epicgames-freebies-claimer-master\.egstore\a0ef9b22b34d3f3e6ab88ad0bad3d89ce208f5fab8909742596878999699d0eb'
    at Object.mkdirSync (fs.js:921:3)
    at new Launcher (C:\Users\user\Downloads\epicgames-freebies-claimer-master\node_modules\epicgames-client\src\Client\index.js:109:10)
    at C:\Users\user\Downloads\epicgames-freebies-claimer-master\claimer.js:79:26
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  errno: -4058,
  syscall: 'mkdir',
  code: 'ENOENT',
  path: 'C:\\Users\\user\\Downloads\\epicgames-freebies-claimer-master\\.egstore\\a0ef9b22b34d3f3e6ab88ad0bad3d89ce208f5fab8909742596878999699d0eb'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node claimer.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2020-09-20T17_10_19_618Z-debug.log

The log: https://pastebin.com/AVek7bVS

Add gog.com to freebies

I know this repo is focused on epic games, but we all just want free games, no matter where they come from.

Gog.com has a very simple way of giving away content. All you have to do is log into your account and visit this URL:
https://www.gog.com/giveaway/claim

There's not always active give aways.

Output results to log / generate log on error?

Is this possible or is it possible for this to be implemented?

I plan to run the script one a week using task scheduler. Would be nice to have an optional log writing parameter with timestamp output to the current working directory, just for reference sake in case bugs arise.

Seems something went wrong with login

Today I am trying to use this project to claim games, but it seems that there are some problems with login, the log is as follows...

$ node gimme_free_epic_shit '[email protected]' 'xxxxx'

Error: Error while initializing or logging in as xxxx@xxx.com
    at /home/melos/getepic/epicgames-freebies-claimer/gimme_free_epic_shit.js:10:15
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

I have analyzed whether it is a network problem, but whether it is my local host or remote vps, the same error is reported. If my account is banned (but in fact it is not, I can still log in using the webpage), my friend's can't get it too :(

So it is a bit confusing, maybe there is something wrong with epicgames-client. But no matter what, the previous use has been great, thank you and your project very much! 😄

rememberLastSession as an optional argument

Feature request.
Changing rememberLastSession to be an optional argument for command line AND in the config will enable running the script for multiple accounts in a batch run.

Maybe like this? :
node gimme_free_epic_shit USERNAME PASSWORD false

Could also be a flag like parameter? :
node gimme_free_epic_shit -r USERNAME PASSWORD

The default value in the config should probably stay true, it will streamline normal use for one account.

But where i need to run npm install?

"3. Run npm install
4. Run node gimme_free_epic_shit or node gimme_free_epic_shit USERNAME PASSWORD 0/1*"
thats ok, but where? in what folder?

TypeError not a function

I have this issue since the last pull

 2020-06-14 | 14:25:14.393 | INFO  | Logged in as xxxxxxxxxx(xxxxxxxxxxxxxxxxxxxxxx)
 2020-06-14 | 14:25:14.396 | ERROR | TypeError: client.freeGamesPromotions is not a function
    at freeGamesPromotions (D:\xxxxxxxx\epicgames-freebies-claimer\claimer.js:28:33)
    at D:\xxxxxxx\epicgames-freebies-claimer\claimer.js:91:36
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Process finished with exit code 1

Value error

every time i try to use it it get to the logged in then this happen
2020-10-12 | 02:24:17.199 | ERROR | TypeError: Cannot read property 'value' of undefined
at Launcher.enableTwoFactor (C:\Users\Oli\Desktop\epicgames-freebies-claimer-1.4.1\node_modules\epicgames-client\src\Client\index.js:1226:27)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async C:\Users\Oli\Desktop\epicgames-freebies-claimer-1.4.1\claimer.js:74:17
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node claimer.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Oli\AppData\Roaming\npm-cache_logs\2020-10-12T02_24_17_250Z-debug.log

2FA - remember device?

Hi there!

First of all, thanks for making this! It definitely makes it easy for lazy people like me to claim the free games on a weekly basis. I've missed claiming games a few times, so this definitely helps!

Anyway, I've tried this and it works well. But it always prompts me to enter the 2FA code. It shouldn't do that, because in a normal browser session, it will remember your device and shouldn't prompt you every single time you access the website. Could you please update the app to support remembering the device?

I cant start the program

Hello i cant start the program can you help me
i have this error

[email protected] start /home/pi/epicgames-freebies-claimer

node claimer.js "[email protected]" "password" "0"

internal/modules/cjs/loader.js:1023
throw err;
^

Error: Cannot find module 'check-update-github'
Require stack:

  • /home/pi/epicgames-freebies-claimer/claimer.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
    at Function.Module._load (internal/modules/cjs/loader.js:890:27)
    at Module.require (internal/modules/cjs/loader.js:1080:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object. (/home/pi/epicgames-freebies-claimer/claimer.js:3:21)
    at Module._compile (internal/modules/cjs/loader.js:1176:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
    at Module.load (internal/modules/cjs/loader.js:1040:32)
    at Function.Module._load (internal/modules/cjs/loader.js:929:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js :71:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/home/pi/epicgames-freebies-claimer/claimer.js' ]
    }
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] start: node claimer.js "antoinerzad2@ gmail.com" "password" "0"
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] start script.
    npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-05-15T13_37_41_731Z-debug.log

idfk what that means, failed to npm start

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Users\dspla\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]prestart: [email protected]
6 info lifecycle [email protected]
start: [email protected]
7 verbose lifecycle [email protected]start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
start: PATH: C:\Users\dspla\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\epicgames-freebies-claimer-master\node_modules.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Razer\ChromaBroadcast\bin;C:\Program Files\Razer\ChromaBroadcast\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\nodejs;C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Users\dspla\AppData\Local\Programs\Python\Python36\Scripts;C:\Users\dspla\AppData\Local\Programs\Python\Python36;C:\Users\dspla\AppData\L;C:\Program Files (x86)\Gpg4win..\GnuPG\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Python27;C:\Python27\Scripts;C:\Users\dspla\AppData\Local\Microsoft\WindowsApps;C:\Users\dspla\AppData\Local\atom\bin;C:\Users\dspla\AppData\Roaming\npm;C:\Users\dspla\AppData\Local\Microsoft\WindowsApps;C:\webdrivers\chromedriver.exe;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\bin
9 verbose lifecycle [email protected]start: CWD: C:\epicgames-freebies-claimer-master
10 silly lifecycle [email protected]
start: Args: [ '/d /s /c', 'node claimer.js' ]
11 silly lifecycle [email protected]start: Returned: code: 1 signal: null
12 info lifecycle [email protected]
start: Failed to exec start script
13 verbose stack Error: [email protected] start: node claimer.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Users\dspla\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess. (C:\Users\dspla\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\epicgames-freebies-claimer-master
16 verbose Windows_NT 10.0.19041
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\dspla\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "start"
18 verbose node v10.16.3
19 verbose npm v6.13.2
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: node claimer.js
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Unreal marketplace addition

I think its totally possible as it uses probably even the same purchase system, gonna look at some of the endpoints probably

ESOCKETTIMEOUT, ECONNRESET and more.

Getting a few different errors, I would guess the end cause to be timeout related.
Still investigating. In the past few days even pinging epicstore.com returns timeout sometimes (even with a fast vpn to different locations around the world).
Important to note, the accounts I'm testing these on does NOT have 2FA.

Logged in as *******
Close to the Sun was already claimed for this account
Error: ESOCKETTIMEDOUT
at ClientRequest. (****\epicgames-freebies-claimer\node_modules\request\request.js:816:19)
at Object.onceWrapper (events.js:427:28)
at ClientRequest.emit (events.js:321:20)
at TLSSocket.emitRequestTimeout (_http_client.js:721:9)
at Object.onceWrapper (events.js:427:28)
at TLSSocket.emit (events.js:321:20)
at TLSSocket.Socket._onTimeout (net.js:478:8)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {
code: 'ESOCKETTIMEDOUT',
connect: false
}

Connection reset error:

Failed to login as , please attempt manually.
Error: net::ERR_CONNECTION_RESET at https://epicgames.com/id
at navigate \epicgames-freebies-claimer\node_modules\puppeteer\lib\FrameManager.js:120:37)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async FrameManager.navigateFrame \epicgames-freebies-claimer\node_modules\puppeteer\lib\FrameManager.js:94:17)
at async Frame.goto \epicgames-freebies-claimer\node_modules\puppeteer\lib\FrameManager.js:406:12)
at async Page.goto (
\epicgames-freebies-claimer\node_modules\puppeteer\lib\Page.js:672:12)
at async Function.init (
\epicgames-freebies-claimer\node_modules\epicgames-client-login-adapter\index.js:53:5)
at async \epicgames-freebies-claimer\gimme_free_epic_shit.js:21:20
-- ASYNC --
at Frame. (
\epicgames-freebies-claimer\node_modules\puppeteer\lib\helper.js:111:15)
at Page.goto (
\epicgames-freebies-claimer\node_modules\puppeteer\lib\Page.js:672:49)
at Page. (\epicgames-freebies-claimer\node_modules\puppeteer\lib\helper.js:112:23)
at Function.init (
***\epicgames-freebies-claimer\node_modules\epicgames-client-login-adapter\index.js:53:16)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async *****\epicgames-freebies-claimer\gimme_free_epic_shit.js:21:20

Unknown quick purchase:

Failed to login as , please attempt manually.
Logged in as ********
Close to the Sun was already claimed for this account
Sherlock Holmes Crimes and Punishments was already claimed for this account
Error: Unknown quick purchase status: false
at Launcher.purchase (
\epicgames-freebies-claimer\node_modules\epicgames-client\src\Client\index.js:645:15)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async *******\epicgames-freebies-claimer\gimme_free_epic_shit.js:52:29

ECONNRESET:

Failed to login as *****, please attempt manually.
Logged in as *********
Close to the Sun was already claimed for this account
Sherlock Holmes Crimes and Punishments was already claimed for this account
Error: read ECONNRESET
at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) {
errno: -4077,
code: 'ECONNRESET',
syscall: 'read'
}

Categories of undefined:

Failed to login as , please attempt manually.
Logged in as undefined (
)
TypeError: Cannot read property 'categories' of undefined
at *****\epicgames-freebies-claimer\gimme_free_epic_shit.js:43:30
at Array.filter ()
at ****\epicgames-freebies-claimer\gimme_free_epic_shit.js:43:10
at processTicksAndRejections (internal/process/task_queues.js:97:5)

currentPrice of undefined:

Logged in as *******
Close to the Sun was already claimed for this account
TypeError: Cannot read property 'currentPrice' of undefined
at ****\epicgames-freebies-claimer\gimme_free_epic_shit.js:49:53
at Array.filter ()
at ****\epicgames-freebies-claimer\gimme_free_epic_shit.js:49:33
at processTicksAndRejections (internal/process/task_queues.js:97:5)

Note these last 2 are very wierd, probably getting the offers per namespace fails?

Btw this still pops up even after the recent login fix by epicgames-client module and epicgames-client-login-adapter:

Error: Error while initialize process.
at *****\epicgames-freebies-claimer\gimme_free_epic_shit.js:12:15
at processTicksAndRejections (internal/process/task_queues.js:97:5)

it might be best to post some of these issues on node-epicgames-client repo? probably.

Help needed: Afterlogin wtd?

Hello,
Autologin didn't work for me neither (as I saw it's not an unique problem), so I tried to login manually, but after login idk what do do, chrome browser stay opened and claimer timeout after some time. (had to change tiemout from 30 sec to 60 sec as I always timed out due to slow vps)

What should happen after (manual) login?


0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start',
1 verbose cli   'xxx',
1 verbose cli   'xxxx',
1 verbose cli   '1',
1 verbose cli   'xxxx'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Troll\Desktop\epicgames-freebies-claimer-master\node_modules\.bin;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\nodejs\;C:\Users\Troll\AppData\Roaming\npm
9 verbose lifecycle [email protected]~start: CWD: C:\Users\Troll\Desktop\epicgames-freebies-claimer-master
10 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'node claimer.js "xxx" "xxx" "1" "xxx4"' ]
11 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `node claimer.js "xxxx" "xxxx" "1" "5xxxx"`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:315:20)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:315:20)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\Troll\Desktop\epicgames-freebies-claimer-master
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" "xxx" "xxx" "1" "xxx34"
18 verbose node v12.18.0
19 verbose npm  v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `node claimer.js "xxxx" "xxxx" "1" "xxxxx"`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Everthing's price is 0

{ id: 'b79c0521c5d147598b20f78b8f4918a1',
title: 'Trials Rising',
description: 'Trials Rising',
keyImages: [ [Object], [Object], [Object] ],
categories: [ [Object] ],
namespace: 'epic',
status: 'ACTIVE',
creationDate: '2019-09-06T18:52:23.553Z',
lastModifiedDate: '2020-02-19T02:04:22.933Z',
customAttributes:
{ 'com.epicgames.app.weight': [Object],
'com.epicgames.app.offerNs': [Object],
'com.epicgames.app.blacklist': [Object],
'com.epicgames.app.productSlug': [Object],
'com.epicgames.app.offerId': [Object] },
internalName: 'Trials Rising',
recurrence: 'ONCE',
items: [ [Object] ],
currencyCode: 'USD',
currentPrice: 0,
price: 0,
basePrice: 0,
basePriceCurrencyCode: 'USD',
recurringPrice: 0,
freeDays: 0,
maxBillingCycles: 0,
seller:
{ id: 'o-3efjudxdtgsqnulml4bkeq3v9nec38',
name: 'Ubisoft Entertainment' },
effectiveDate: '2050-01-01T00:00:00.000Z',
vatIncluded: false,
isCodeRedemptionOnly: true,
isFeatured: false,
taxSkuId: 'DS_Diesel',
merchantGroup: 'EGS_MKT',
priceTier: 'prod-epic_USD_0_freetier',
urlSlug: 'trials-rising',
roleNamesToGrant: [],
tags: [ 1216, 1370, 9547, 1212 ],
purchaseLimit: 1,
ignoreOrder: false,
fulfillToGroup: false,
fraudItemType: 'MP_Game',
shareRevenue: false,
offerType: 'OTHERS',
unsearchable: false,
releaseDate: '2020-02-18T21:04:00.000Z',
releaseOffer: '',
title4Sort: 'Trials Rising',
countriesBlacklist: [ 'CN' ] }

Everything in "all" variable's price is 0, everytime I use this script it try to redeem Lego batman, and not redeem weekly free game, like "For The King".
Weekly free game's path is { path: 'games' }
"For The King"'s full info:
{ id: '55e88d9d4c864d53ba3a03f58222ed24',
title: 'For The King',
description: 'For The King',
keyImages: [ [Object], [Object] ],
categories: [ [Object] ],
namespace: 'epic',
status: 'ACTIVE',
creationDate: '2019-12-10T22:07:00.494Z',
lastModifiedDate: '2020-04-22T20:09:19.115Z',
customAttributes:
{ 'com.epicgames.app.weight': [Object],
'com.epicgames.app.offerNs': [Object],
'com.epicgames.app.blacklist': [Object],
'com.epicgames.app.productSlug': [Object],
'com.epicgames.app.offerId': [Object] },
internalName: 'For The King',
recurrence: 'ONCE',
items: [ [Object] ],
currencyCode: 'USD',
currentPrice: 0,
price: 0,
basePrice: 0,
basePriceCurrencyCode: 'USD',
recurringPrice: 0,
freeDays: 0,
maxBillingCycles: 0,
seller:
{ id: 'o-ws89bsbfb8trgdl3zmerugg4rsuvvt',
name: 'Curve Digital' },
viewableDate: '2020-04-16T15:00:00.000Z',
effectiveDate: '2020-04-23T15:00:00.000Z',
vatIncluded: false,
isCodeRedemptionOnly: true,
isFeatured: false,
taxSkuId: 'DS_Diesel',
merchantGroup: 'EGS_MKT',
priceTier: 'prod-epic_USD_0_freetier',
urlSlug: 'for-the-king',
roleNamesToGrant: [],
tags: [ 1264, 1386, 9547, 1117, 10719 ],
purchaseLimit: 1,
ignoreOrder: false,
fulfillToGroup: false,
fraudItemType: 'SP_Game',
shareRevenue: false,
offerType: 'OTHERS',
unsearchable: false,
releaseDate: '2020-04-23T15:00:00.000Z',
releaseOffer: '',
title4Sort: 'For The King' }

Anyone has the same problem as me?

Timeout error / Invalid login selector

Here's the error:

PS C:\Users\folfy\Desktop\gamefarm\epicgames-freebies-claimer-1.4.1> npm start

> [email protected] start C:\Users\folfy\Desktop\gamefarm\epicgames-freebies-claimer-1.4.1
> node claimer.js

 2020-11-06 | 13:03:53.059 | WARN  | Failed to login as [email protected], please attempt manually.
 2020-11-06 | 13:04:32.302 | ERROR | TimeoutError: waiting for selector "#login:not(:disabled)" failed: timeout 30000ms exceeded
    at new WaitTask (C:\Users\folfy\Desktop\gamefarm\epicgames-freebies-claimer-1.4.1\node_modules\puppeteer\lib\DOMWorld.js:549:28)
    at DOMWorld._waitForSelectorOrXPath (C:\Users\folfy\Desktop\gamefarm\epicgames-freebies-claimer-1.4.1\node_modules\puppeteer\lib\DOMWorld.js:478:22)
    at DOMWorld.waitForSelector (C:\Users\folfy\Desktop\gamefarm\epicgames-freebies-claimer-1.4.1\node_modules\puppeteer\lib\DOMWorld.js:432:17)
    at Frame.waitForSelector (C:\Users\folfy\Desktop\gamefarm\epicgames-freebies-claimer-1.4.1\node_modules\puppeteer\lib\FrameManager.js:627:47)
    at Frame.<anonymous> (C:\Users\folfy\Desktop\gamefarm\epicgames-freebies-claimer-1.4.1\node_modules\puppeteer\lib\helper.js:112:23)
    at Page.waitForSelector (C:\Users\folfy\Desktop\gamefarm\epicgames-freebies-claimer-1.4.1\node_modules\puppeteer\lib\Page.js:1122:29)
    at Function.init (C:\Users\folfy\Desktop\gamefarm\epicgames-freebies-claimer-1.4.1\node_modules\epicgames-client-login-adapter\index.js:107:38)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async C:\Users\folfy\Desktop\gamefarm\epicgames-freebies-claimer-1.4.1\claimer.js:79:28
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node claimer.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\folfy\AppData\Roaming\npm-cache\_logs\2020-11-06T12_04_32_502Z-debug.log

Error: Unknown quick purchase status: false

6:42:07 PM web.1 | body:
6:42:07 PM web.1 | { errorCode:
6:42:07 PM web.1 | 'errors.com.epicgames.ecommerce.orderprocessor.invalid_offer_from_catalog_service',
6:42:07 PM web.1 | errorMessage:
6:42:07 PM web.1 | 'Sorry, the effective date 2099-01-01T00:00:00.000Z is in the future, purchase of offer 3e3aedb497074b6e878343bac1011d60 is rejected for epic account ebcc6f88cb314aa7914069e0bb81e542.',
6:42:07 PM web.1 | messageVars: [Array],
6:42:07 PM web.1 | numericErrorCode: 2007,
6:42:07 PM web.1 | originatingService: 'com.epicgames.orderprocessor.public',
6:42:07 PM web.1 | intent: 'prod' } } }

Permission denied (publickey)

Hey there,

for some reason I'm not able to download the dependency: node-epicgames-client
Cloning into bare repository '/root/.npm/_git-remotes/git-github-com-github-revadike-node-epicgames-client-a179948a'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Tested on v1.4.1.
Any suggestions?

Never used node.js before. I want to use your script.

I download node.js from google and your script. I'm unsure how to run it. I opened node.js and tried to type "nmp install". Nothing. I tried it in cmd. Also nothing. I really have no idea how to work with node.js but I'd really like to use your script if someone can break it down for me. <3

ENOENT: no such file or directory, mkdir

Am I doing something wrong?

image

workflow file:

name: Claim Epic Freebies
on:
  push:
    paths:
      - '.github/workflows/epic.yml'
  watch:
    types: [started]
  schedule: 
    - cron: "0 10 * * *"

jobs:
    claim:
        runs-on: ubuntu-latest

        timeout-minutes: 5

        steps:
            - name: Setup repo
              uses: actions/checkout@v2
              with:
                  repository: "Revadike/epicgames-freebies-claimer"

            - name: Setup Node.js
              uses: actions/setup-node@v1

            - name: Install dependencies
              run: yarn

            - name: Get Epic Freebies
              id: epic
              run: yarn start ${{ secrets.EPICUSERNAME }} ${{ secrets.EPICPASSWORD }} 0

A couple of questions/issues...

Hi,

I haven't updated my version for a while and thought I'd come here to see whether there has been any updates. I'm currently 3 versions behind. Looking at the changelog, it looks like it now supports looping (run forever). How does this work exactly? If I restart my PC, how will it continue to run in the background?

My current configuration is to have a scheduled task to run the script at a specific time everyday. As scheduled task is a built-in feature for Windows, it'll just work. However, I'm unsure how this looping works for your script. Surely if the machine is restarted, the script has to be triggered by something to run again? It's not running as a Windows service and doesn't run at machine startup or as a task....

More importantly, I have an issue running the script against multiple accounts. I've always just been using 1 account, but now I would like to run this against 3 accounts. My config looks like this:


{
	"accounts": [
		{
			"email": "[email protected]",
			"password": "asfdsfdsfsdfsd",
			"secret": "YOUR_2FA_SECRET1_HERE_OR_EMPTY",
			"rememberLastSession": true
		},
		{
			"email": "[email protected]",
			"password": "asfdsfdsfsdfsd",
			"secret": "YOUR_2FA_SECRET2_HERE_OR_EMPTY",
			"rememberLastSession": true
		},
		{
			"email": "[email protected]",
			"password": "asfdsfdsfsdfsd",
			"secret": "YOUR_2FA_SECRET2_HERE_OR_EMPTY",
			"rememberLastSession": true
		}				
	],
	"delay": 1440,
	"loop": false
}

The problem is, only the first account is used to claim the games. I'm not sure what I'm doing wrong here. I think someone mentioned the same thing in one of the logged issues.

Last issue I'm experiencing is that I'm getting this message for all my accounts:

Failed to login as [email protected], please attempt manually.

It will then open a Chrome window and log me in automatically. So that would suggest my config is correct. The script doesn't seem to login automatically or remember the last session anymore, it will always show that Chrome window...

Doesn't claim the games.

Says it is already claimed, when it isn't. Tried replacing it with quickPurchase, but it ends on checkout. Also tried purchaseOrderConfirmed but I get an error. Gonna try to solve but would appriciate some help.

spawn git ENOENT

I have installed node.js,download your repo, but it's don't work. I tried "mkdir .egstore", but it doesn't help :( How can I fix it? Thank you ❤
image

Fails to automatically login due to captcha

I systematically get Failed to login as [username], please attempt manually.

(Logging in through the browser that opens afterwards works, though it only types in the username + password, and fails to auto-type the 2FA code despite it being generated correctly in the code, which I debugged.)

I've logged the error that comes from the node-epicgames-client, and it says the following:
Error: Unknown auth error: errors.com.epicgames.accountportal.captcha_invalid
I suspect that the Epic website is somehow detecting that we're not a real browser, either through the lack of cookies, just the user agent string or some advanced javascript magic, and adding an extra challenge. The captcha doesn't show up in the subsequent pupetteer browser that opens.

This is the change I did to log the error btw. No time at the moment for a proper pull request, sorry:

diff --git a/claimer.js b/claimer.js
index 8da7716..7db0e30 100644
--- a/claimer.js
+++ b/claimer.js
@@ -73,8 +73,12 @@ async function freeGamesPromotions(client, country = "US", allowCountries = "US"
                 throw new Error("Error while initialize process.");
             }

-            if (!await client.login(account).catch(() => false)) {
-                Logger.warn(`Failed to login as ${client.config.email}, please attempt manually.`);
+            if (!await client.login(account).catch(error =>
+                {
+                    Logger.warn(`Failed to login as ${client.config.email} with error ${error}, please attempt manually.`);
+                    return false;
+                }))
+                {

                 let auth = await ClientLoginAdapter.init(account);
                 let exchangeCode = await auth.getExchangeCode();

Resulting output:
Failed to login as [username] with error Error: Unknown auth error: errors.com.epicgames.accountportal.captcha_invalid, please attempt manually.

Unexpected token # in JSON at position 151

Ubuntu 20.04.1 (headless), nodejs version 15.5.0, npm version 7.3.0

> [email protected] start
> node claimer.js

node:internal/modules/cjs/loader:1154
    throw err;
    ^

SyntaxError: /home/ryan/epicgames-freebies-claimer/config.json: Unexpected token # in JSON at position 151
    at parse (<anonymous>)
    at Object.Module._extensions..json (node:internal/modules/cjs/loader:1151:22)
    at Module.load (node:internal/modules/cjs/loader:973:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:997:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/home/ryan/epicgames-freebies-claimer/claimer.js:5:16)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32)
npm ERR! code 1
npm ERR! path /home/ryan/epicgames-freebies-claimer
npm ERR! command failed
npm ERR! command sh -c node claimer.js

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ryan/.npm/_logs/2020-12-24T10_38_48_049Z-debug.log

I'm using Glitch to run this app. I don't know what's happening

I imported this rep on Glitch and configured the config.json .When I try npm start there is an error. I don't know what happened so I'll just put the console log here

Welcome to the Glitch console

If you’re following someone else’s instructions make sure you trust them.
If in doubt post a question in our forum https://support.glitch.com

For now, the console and the editor don't automatically sync. You can
manually run the `refresh` command and it will force a refresh,
updating the editor with any console-created files.

For more information about this and other technical restrictions,
please see the Help Center: https://glitch.com/help

Could not find Node null, using Node 10

app@free-epicgames-claimer:~ 08:17 
$ npm start

> [email protected] start /app
> node claimer.js

 2020-11-15 | 08:18:53.251 | ERROR | { Error: ENOENT: no such file or directory, mkdir '/app/.egstore/2bad408ffcc3317ec1a30f112e11c6a309be489504114222fc202af5392ca43f'
    at Object.mkdirSync (fs.js:752:3)
    at new Launcher (/rbd/pnpm-volume/b5f8135b-88d0-4fe9-865a-7987c777361e/node_modules/.github.com/Revadike/node-epicgames-client/73274228e55b109de8a414cc8a6551ce4879f3dc/node_modules/epicgames-client/src/Client/index.js:109:10)
    at /app/claimer.js:79:26
    at process._tickCallback (internal/process/next_tick.js:68:7)
  errno: -2,
  syscall: 'mkdir',
  code: 'ENOENT',
  path:
   '/app/.egstore/2bad408ffcc3317ec1a30f112e11c6a309be489504114222fc202af5392ca43f' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node claimer.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/npm-cache/10.15.3/_logs/2020-11-15T08_18_53_532Z-debug.log

Says x is already claimed, yet it isn't?

Hi, ran the script today because Epic has released "Close to the sun" and "Sherlock Holmes Crimes and Punishments" and the output says:
Logged in as x (x)
Close to the Sun was already claimed for this account
Sherlock Holmes Crimes and Punishments was already claimed for this account
Lego Batman Trilogy was already claimed for this account
Logged out of Epic Games

ignore x, that's just my info.
It says these games are already claimed, yet they're not in my library. I've not run the script before today. I believe it could be something to do with regions or something? I'm in the UK and my Epic Games account is based in the UK; there is no "Lego Batman Trilogy" on the free games tab on my epic either.

edit: I think it could also be something to do with this?
image
Maybe this is canceling the script out making it believe it's already claimed?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.