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] Bot does not continue after confirming 2fa code #66

Closed
tristanzwart opened this issue Jan 25, 2024 · 12 comments
Closed

[BUG] Bot does not continue after confirming 2fa code #66

tristanzwart opened this issue Jan 25, 2024 · 12 comments
Labels
bug Something isn't working stale

Comments

@tristanzwart
Copy link

Description

I start the bot. Then it first starts chrome etc. Then When it askes for the 2fa code confirmation and I press enter. It does log me in and go to the rewards dashbord (I used -v to observe its behavour). Then after de dashbord is loaded it just stops doing anything. I have waited for over 4 hours and still nothing happend.
I have tried this multiple times and also removed the session with eatch atempt.

Expected Behavior

After confirming the 2fa code it schould continue to the dashbord and start doing the punsh cards.

Actual Behavior

After confirming 2fa it does log me in and then continue to the dashbord. But stops doing anything afer that. And also shows no errors.

Possible Fix

I don't ecactly understand how the code works but it at least lies in the part where afer logging in/ confirming the 2fa code. It returns to the dashbord and then something goes wrong during the step after that.

Steps to Reproduce

  1. Start the main.py with the -d argument and the -v argument
  2. Use an account with 2fa
  3. Get the 2fa code required prompt
  4. Fill in the correct 2fa code
  5. Press enter after aproving 2fa
  6. Wait between 2-4 hours
  7. See that the bot has not continued but did succesfully log in.

log:
2024-01-25 11:59:51,627 [INFO] Using default request storage
2024-01-25 11:59:51,656 [INFO] Created proxy listening on 127.0.0.1:53416
2024-01-25 11:59:51,656 [INFO] Using undetected_chromedriver
2024-01-25 11:59:52,572 [INFO] patching driver executable C:\Users\trist\appdata\roaming\undetected_chromedriver\undetected_chromedriver.exe
2024-01-25 11:59:53,418 [INFO] Screen size: 2142x1445
2024-01-25 11:59:53,419 [INFO] Device size: 2087x1294
2024-01-25 11:59:53,513 [INFO] [LOGIN] Logging-in...
2024-01-25 12:00:01,051 [INFO] [LOGIN] Entering email...
2024-01-25 12:00:11,311 [ERROR] [LOGIN] 2FA Code required !
2024-01-25 12:00:11,328 [ERROR] [LOGIN] 2FA code: 44
2024-01-25 12:00:11,328 [INFO] [LOGIN] Press enter when confirmed on your device...

---> After here it does not continue there is no more log even after hours of wating.

Context

Because the bot did not continue after logging in / confirming 2fa, it makes the bot unusable for me.

Your Environment

  • Version used: latest version of this repro by downloading the zip.
  • Environment name and version (e.g. Chrome ver): Chrome version: Version 121.0.6167.86 (Official build) (64-bits)
  • Operating System and version: Windows 10 version 22H2
  • Latest version of python as of now and latest version of all the required packages
@tristanzwart tristanzwart added the bug Something isn't working label Jan 25, 2024
@klept0
Copy link
Owner

klept0 commented Jan 26, 2024

Run it in verbose mode and click ok - it should continue from there. They may have changed the code again and the button is not defined the same.

@tristanzwart
Copy link
Author

tristanzwart commented Jan 27, 2024

If by running it verbose mode you ment python -v main.py .... Then here is the log I excluded the start since the log would otherwise be way to long. If you still need it tell me where I can post it. Also I discoverd that when you re run it without removing the sessions it seems to just work so it does specificly lie in the part where 2fa is needed and you are not already logged in.

The log:

import 'src.notifier' # <_frozen_importlib_external.SourceFileLoader object at 0x0000029A4AF9F260>
test 7.702
2024-01-27 14:42:02,528 [INFO] ********************tristanzwart2006@gmail.com********************
# C:\Program Files\Python312\Lib\__pycache__\netrc.cpython-312.pyc matches C:\Program Files\Python312\Lib\netrc.py
# code object from 'C:\\Program Files\\Python312\\Lib\\__pycache__\\netrc.cpython-312.pyc'
import 'netrc' # <_frozen_importlib_external.SourceFileLoader object at 0x0000029A4AFC41A0>
2024-01-27 14:42:05,217 [INFO] Using default request storage
2024-01-27 14:42:05,230 [INFO] Created proxy listening on 127.0.0.1:62971
2024-01-27 14:42:05,230 [INFO] Using undetected_chromedriver
# C:\Program Files\Python312\Lib\encodings\__pycache__\cp437.cpython-312.pyc matches C:\Program Files\Python312\Lib\encodings\cp437.py
# code object from 'C:\\Program Files\\Python312\\Lib\\encodings\\__pycache__\\cp437.cpython-312.pyc'
import 'encodings.cp437' # <_frozen_importlib_external.SourceFileLoader object at 0x0000029A4AFC6B70>
2024-01-27 14:42:06,142 [INFO] patching driver executable C:\Users\trist\appdata\roaming\undetected_chromedriver\undetected_chromedriver.exe
2024-01-27 14:42:07,073 [INFO] Screen size: 2218x1242
2024-01-27 14:42:07,073 [INFO] Device size: 2163x1091
2024-01-27 14:42:07,236 [INFO] [LOGIN] Logging-in...
# C:\Program Files\Python312\Lib\encodings\__pycache__\charmap.cpython-312.pyc matches C:\Program Files\Python312\Lib\encodings\charmap.py
# code object from 'C:\\Program Files\\Python312\\Lib\\encodings\\__pycache__\\charmap.cpython-312.pyc'
import 'encodings.charmap' # <_frozen_importlib_external.SourceFileLoader object at 0x0000029A4B043B90>
# C:\Program Files\Python312\Lib\encodings\__pycache__\hex_codec.cpython-312.pyc matches C:\Program Files\Python312\Lib\encodings\hex_codec.py
# code object from 'C:\\Program Files\\Python312\\Lib\\encodings\\__pycache__\\hex_codec.cpython-312.pyc'
import 'encodings.hex_codec' # <_frozen_importlib_external.SourceFileLoader object at 0x0000029A4B064710>
2024-01-27 14:42:15,422 [INFO] [LOGIN] Entering email...
2024-01-27 14:42:25,716 [ERROR] [LOGIN] 2FA Code required !
2024-01-27 14:42:25,730 [ERROR] [LOGIN] 2FA code: 76
2024-01-27 14:42:25,731 [INFO] [LOGIN] Press enter when confirmed on your device...

@klept0
Copy link
Owner

klept0 commented Jan 27, 2024

Did you press enter after putting in your 2FA and wait for it to proceed? It may require interaction on your part as I cannot troubleshoot what you see in verbose mode....

@tristanzwart
Copy link
Author

Yes I did as follows: I waited for the 2FA promt to come up then aproved it on my phone. When I saw the screen where it askes you to stay logged in I swichted to the termial and pressed enter. Then what I see happen afer that (in verbose mode) is as follows: The prompt asking wether to stay logged in or not disapairs and then get to the rewards dashbord where you can see your current points tasks etc. But after that the bot stops doing anything.

So when pressing enter it goes from this page (yes it is in dutch if you where wondering):
Schermafbeelding 2024-01-27 171255

And after that it goes to the https://rewards.bing.com/ site but then does not proceed after that:
Schermafbeelding 2024-01-27 171630

So this is the moment the bot stops working/proceding with what it is supposed to do.
I hope you understand what is going wrong now. And also thanks for the fairly quick responses so far!

@klept0
Copy link
Owner

klept0 commented Jan 29, 2024

So after you have confirmed the 2FA and run it again - the instance does nothing at all?

@tristanzwart
Copy link
Author

tristanzwart commented Jan 29, 2024

Yes exactly. After returning to the dashboard. It just does nothing no error's no trying to load a new page just nothing. The program is still active meanwhile but it just does not do anything. So it is probably stuck in some sort of infinite loop.

Update: I misread your answer it does run normaly after re running and not clearing the session. But did encounter a different bug with the versus game and then also crashed. I wil create a seperate issue for it cince it is not related to this one. I wil link it here once it has been made: X

@Emrys-Lee-XD
Copy link

Temporary solution: I have the same problem. I just terminated the instance then ran it again. The login cookie should be saved after the first time you run it.

@klept0
Copy link
Owner

klept0 commented Feb 1, 2024

Try the update that was just pushed to the repo - let me know if you have any issue and we can check it out.

@tristanzwart
Copy link
Author

I got the new code from the repro and when running the following things happend (I used -v): It asked for the 2fa code I comfirmed it on my phone but nothing happend. And a few seconds later it showed the 2fa timout screen. After a few tries I manualy logged in by using my security key. Then it got to the window where it asked to stay logged in. So then I pressed enter and it worked. So it seems the new code did fix it. But now it does not continue to the do you want to stay logged in screen. This could be related or could just be me. Finaly I also noticed that for some reason images where disabled. I don't know why but this could be the reason of confirming 2fa did not work this time.

A few screenshot to show what I mean by after confirming 2fa it not continuing:
Schermafbeelding 2024-02-01 160807
So I confirm the code on my phone but it stays on this screen. And pressing enter in the console does not help/does nothing.

As a final note it does seem to work properly now after logging in once using my security key so the bot is still usable and I have not had the issue with the versus game.

@klept0
Copy link
Owner

klept0 commented Feb 3, 2024

Yeah I threw that in when I was testing and forgot to remove it - if you want to remove the image clearing you can edit it in browser.py then look for the option about blink - then comment that line out

Copy link

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Feb 18, 2024
Copy link

This issue was closed because it has been inactive for 7 days since being marked as stale.

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

No branches or pull requests

3 participants