Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] no login possible #267

Open
BulldozerPete opened this issue Dec 9, 2022 · 18 comments
Open

[Bug] no login possible #267

BulldozerPete opened this issue Dec 9, 2022 · 18 comments
Assignees
Labels
bug Something isn't working

Comments

@BulldozerPete
Copy link

Describe the bug
Can' login into docker container

Screenshots
If applicable, add screenshots to help explain your problem.

Logs
[2022-12-09 15:53:16] [info] Loading config file: config.json
[2022-12-09 15:53:16] [warn] Overriding browser option because we are inside a docker container!
[2022-12-09 15:53:16] [warn] Adding browser option: --no-sandbox because we are inside a docker container!
[2022-12-09 15:53:16] [info] Logging in...
[2022-12-09 15:53:24] [info] Checking for email verification...
[2022-12-09 15:53:54] [error] TimeoutError: Waiting for selector .//*[contains(text(), "please enter the 6-digit code we sent")] failed: Waiting failed: 30000ms exceeded
at Timeout. (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js:64:32)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7)
[2022-12-09 15:53:54] [info] Checking for 2FA verification...
[2022-12-09 15:54:24] [error] TimeoutError: Waiting for selector .//*[contains(text(), "Enter the code found in your authenticator app")] failed: Waiting failed: 30000ms exceeded
at Timeout. (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js:64:32)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7)
[2022-12-09 15:54:24] [info] No extra verification found!
[2022-12-09 15:54:24] [info] Waiting for cookies to be created...
[2022-12-09 15:54:27] [info] Waiting for cookies to be created...
[2022-12-09 15:54:30] [info] Waiting for cookies to be created...
[2022-12-09 15:54:33] [info] Waiting for cookies to be created...
[2022-12-09 15:54:36] [info] Waiting for cookies to be created...
[2022-12-09 15:54:39] [info] Waiting for cookies to be created...
[2022-12-09 15:54:42] [info] Waiting for cookies to be created...
[2022-12-09 15:54:45] [info] Waiting for cookies to be created...
[2022-12-09 15:54:48] [info] Waiting for cookies to be created...
[2022-12-09 15:54:51] [info] Waiting for cookies to be created...
[2022-12-09 15:54:54] [error] Error: Timed out while waiting for cookies to be created!
at LoginPage. (file:///app/dist/pages/login.js:62:31)
at Generator.next ()
at fulfilled (file:///app/dist/pages/login.js:4:58)

@BulldozerPete BulldozerPete added the bug Something isn't working label Dec 9, 2022
@acewins727
Copy link

same issue, I just installed docker for the first time, maybe a bug in the last version, I'll have to try using an older version of docker

@whyphyrl
Copy link

same here older version doenst work for me to :/

@BlackNL16
Copy link

@BulldozerPete @whyphyrl @acewins727 use the copy cookies method, grab ur cookies with editthiscookie extension or export and place it in a file named "cookies-.json". this solved the problem for me. I was also unabel to logon with the interactive method.

these 2 cookies are the required ones.
image

@BlackNL16
Copy link

[
{
"domain": ".twitch.tv",
"expirationDate": 1705685244,
"hostOnly": false,
"httpOnly": false,
"name": "auth-token",
"path": "/",
"sameSite": "no_restriction",
"secure": true,
"session": false,
"storeId": "0",
"value": "",
"id": 2
},
{
"domain": ".twitch.tv",
"expirationDate": 1705685246.654696,
"hostOnly": false,
"httpOnly": false,
"name": "unique_id",
"path": "/",
"sameSite": "no_restriction",
"secure": true,
"session": false,
"storeId": "0",
"value": "",
"id": 13
}
]

@BulldozerPete
Copy link
Author

BulldozerPete commented Dec 20, 2022

@BlackNL16 what is the name of the cookie?
screenshot

@BlackNL16
Copy link

@BulldozerPete you need auth-token and unique_id

@BulldozerPete
Copy link
Author

BulldozerPete commented Dec 21, 2022

@BlackNL16 Done. Still same error.

my commands, after login via ssh:
cd Twitch-Drops-Bot
sudo nano cookies-.json
copy and paste of your text from above,
added my auth-token and unique_id,
saved file,
started container via
docker run --rm -v /home/sam/Twitch-Drops-Bot:/app/data -i -t --name twitchbot --sig-proxy=false ghcr.io/tychothetaco/twitch-drops-bot:latest

@BulldozerPete
Copy link
Author

docker run --rm -v /home/sam/Twitch-Drops-Bot:/app/data -i -t --name twitchbot --sig-proxy=false ghcr.io/tychothetaco/twitch-drops-bot:latest
[2022-12-21 18:06:53] [info] Loading config file: config.json
[2022-12-21 18:06:53] [warn] Overriding browser option because we are inside a docker container!
[2022-12-21 18:06:53] [warn] Adding browser option: --no-sandbox because we are inside a docker container!
[2022-12-21 18:06:55] [info] Logging in...
[2022-12-21 18:07:02] [info] Checking for email verification...
[2022-12-21 18:07:32] [error] TimeoutError: Waiting for selector .//*[contains(text(), "please enter the 6-digit code we sent")] failed: Waiting failed: 30000ms exceeded
at Timeout. (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js:64:32)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7)
[2022-12-21 18:07:32] [info] Checking for 2FA verification...
[2022-12-21 18:08:02] [error] TimeoutError: Waiting for selector .//*[contains(text(), "Enter the code found in your authenticator app")] failed: Waiting failed: 30000ms exceeded
at Timeout. (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js:64:32)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7)
[2022-12-21 18:08:02] [info] No extra verification found!
[2022-12-21 18:08:02] [info] Waiting for cookies to be created...
[2022-12-21 18:08:05] [info] Waiting for cookies to be created...
[2022-12-21 18:08:08] [info] Waiting for cookies to be created...
[2022-12-21 18:08:11] [info] Waiting for cookies to be created...
[2022-12-21 18:08:14] [info] Waiting for cookies to be created...
[2022-12-21 18:08:17] [info] Waiting for cookies to be created...
[2022-12-21 18:08:20] [info] Waiting for cookies to be created...
[2022-12-21 18:08:23] [info] Waiting for cookies to be created...
[2022-12-21 18:08:26] [info] Waiting for cookies to be created...
[2022-12-21 18:08:29] [info] Waiting for cookies to be created...
[2022-12-21 18:08:32] [error] Error: Timed out while waiting for cookies to be created!
at LoginPage. (file:///app/dist/pages/login.js:62:31)
at Generator.next ()
at fulfilled (file:///app/dist/pages/login.js:4:58)

@BlackNL16
Copy link

@BulldozerPete
please remove username / password from config.

this is my config.json file.

{
"auth_token": "",
"browser": "google-chrome",
"games": [
"Sea of Thieves",
"Rocket League",
"fishing planet",
"theHunter: Call of the Wild",
"World of Tanks",
"World of Warships"
],
"headless": true,
"headless_login": true,
"interval": 5,
"load_timeout_secs": 30,
"failed_stream_retry": 3,
"failed_stream_timeout": 30,
"browser_args": [],
"watch_unlisted_games": false,
"hide_video": false,
"show_account_not_linked_warning": true,
"ignored_games": [],
"attempt_impossible_campaigns": true,
"watch_streams_when_no_drop_campaigns_active": false,
"broadcasters": [],
"do_version_check": true,
"tui": {
"enabled": false
},
"updates": {
"type": "release",
"enabled": true
},
"logging": {
"enabled": true,
"level": "info"
},
"auto_claim_drops": true,
"auto_claim_community_points": true,
"notifications": {
"discord": [],
"telegram": []
}
}

@BulldozerPete
Copy link
Author

@BlackNL16 done.

Next error:
docker run --rm -v /home/sam/Twitch-Drops-Bot:/app/data -i -t --name twitchbot --sig-proxy=false ghcr.io/tychothetaco/twitch-drops-bot:latest
[2022-12-22 06:59:09] [info] Loading config file: config.json
[2022-12-22 06:59:10] [warn] Overriding browser option because we are inside a docker container!
[2022-12-22 06:59:10] [warn] Adding browser option: --no-sandbox because we are inside a docker container!
[2022-12-22 06:59:10] [info] Using auth_token to log in
[2022-12-22 06:59:10] [error] Error: Missing device ID!
at Client. (file:///app/dist/twitch.js:80:23)
at Generator.next ()
at file:///app/dist/twitch.js:8:71
at new Promise ()
at __awaiter (file:///app/dist/twitch.js:4:12)
at Client.fromCookies (file:///app/dist/twitch.js:58:16)
at file:///app/dist/index.js:539:37
at Generator.next ()
at fulfilled (file:///app/dist/index.js:4:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

@BlackNL16
Copy link

@BulldozerPete

make sure you named the cookiefile as following

"cookies-bulldozerpete.json"

@BulldozerPete
Copy link
Author

I renamed the file to "cookies-USERNAME_TWITCH.json"

Worked for me.
Thank you very much @BlackNL16 !

@BlackNL16
Copy link

BlackNL16 commented Dec 22, 2022 via email

@kumitom
Copy link

kumitom commented Jan 22, 2023

@BulldozerPete you need auth-token and unique_id

My old cookies just expired and I just forgot how to deal with it. Thank you for your hint!
Now my bot is working again :)

@BulldozerPete
Copy link
Author

@BlackNL16 Do you know if there is an option to auto-claim drops?

@BlackNL16
Copy link

BlackNL16 commented Jan 24, 2023 via email

@BulldozerPete
Copy link
Author

BulldozerPete commented Feb 23, 2023

@BlackNL16 Now I have got a new error:
[2023-02-23 16:23:57] [error] Failed to get drop campaign details

Do I need to update my auth-token?

@delta-whiplash
Copy link

hello I have the sames errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants