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] Program crash in headless #432

Open
2 tasks done
Beusts opened this issue Jan 25, 2024 · 2 comments
Open
2 tasks done

[BUG] Program crash in headless #432

Beusts opened this issue Jan 25, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Beusts
Copy link

Beusts commented Jan 25, 2024

Before submitting a bug report...

  • This bug wasn't already reported.
    (I have checked every bug report on GitHub)

Title

  • The title is no longer "[BUG] Title" and I edited it with the right error name.

Describe the bug

the program crash in headless

Python 3.11.4
selenium 4.11.2
requests 2.31.0
ipapi 1.0.4
undetected-chromedriver 3.5.4
selenium-wire 5.1.0

OS : 10.0.22631 N/A build 22631 Microsoft Windows 11 Famille

Copy and paste your error

D:\Downloads\Microsoft-Rewards-Farmer-master>python autoupdate_main.py
Starting...
2024-01-26 00:01:57,524 [INFO] Fabbrichard@outlook.fr
2024-01-26 00:01:57,989 [INFO] Using default request storage
2024-01-26 00:01:58,018 [INFO] Created proxy listening on 127.0.0.1:55610
2024-01-26 00:01:58,019 [INFO] Using undetected_chromedriver
2024-01-26 00:01:58,488 [INFO] patching driver executable C:\Users\sonic\appdata\roaming\undetected_chromedriver\undetected_chromedriver.exe
2024-01-26 00:01:59,191 [INFO] Screen size: 1279x1104
2024-01-26 00:01:59,191 [INFO] Device size: 1224x953
2024-01-26 00:01:59,325 [INFO] [LOGIN] Logging-in...
2024-01-26 00:02:11,856 [INFO] [LOGIN] Logged-in !
2024-01-26 00:02:18,924 [INFO] [LOGIN] Ensuring login on Bing...
2024-01-26 00:02:24,139 [INFO] [LOGIN] Logged-in successfully !
2024-01-26 00:02:24,141 [INFO] [POINTS] You have 420,00 points on your account !
2024-01-26 00:02:24,142 [INFO] [DAILY SET] Trying to complete the Daily Set...
2024-01-26 00:02:34,923 [INFO] [DAILY SET] Completing search of card 1
2024-01-26 00:02:42,385 [ERROR] NoSuchWindowException: Message: no such window: target window already closed
from unknown error: web view not found
(Session info: chrome=121.0.6167.85)
Stacktrace:
GetHandleVerifier [0x00BF1673+52979]
(No symbol) [0x00B77961]
(No symbol) [0x00A5DD3D]
(No symbol) [0x00A4239A]
(No symbol) [0x00ABA71B]
(No symbol) [0x00ACACB6]
(No symbol) [0x00AB4286]
(No symbol) [0x00A8C063]
(No symbol) [0x00A8CECD]
GetHandleVerifier [0x00F08D83+3294723]
GetHandleVerifier [0x00F46CC2+3548482]
GetHandleVerifier [0x00F41C9C+3527964]
GetHandleVerifier [0x00C8870E+671630]
(No symbol) [0x00B81EB4]
(No symbol) [0x00B7D808]
(No symbol) [0x00B7D92D]
(No symbol) [0x00B6F7E0]
BaseThreadInitThunk [0x75747BA9+25]
RtlInitializeExceptionChain [0x7726BD2B+107]
RtlClearBits [0x7726BCAF+191]

Traceback (most recent call last):
File "D:\Downloads\Microsoft-Rewards-Farmer-master\src\dailySet.py", line 25, in completeDailySet
self.activities.openDailySetActivity(cardId)
File "D:\Downloads\Microsoft-Rewards-Farmer-master\src\activities.py", line 15, in openDailySetActivity
self.webdriver.find_element(
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 739, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 345, in execute
self.error_handler.check_response(response)
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="daily-sets"]/mee-card-group[1]/div/mee-card[2]/div/card-content/mee-rewards-daily-set-item-content/div/a"}
(Session info: chrome=121.0.6167.85); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Stacktrace:
GetHandleVerifier [0x00BF1673+52979]
(No symbol) [0x00B77961]
(No symbol) [0x00A5DD3D]
(No symbol) [0x00A95FBB]
(No symbol) [0x00A960FB]
(No symbol) [0x00ACCF92]
(No symbol) [0x00AB4534]
(No symbol) [0x00ACB3FE]
(No symbol) [0x00AB4286]
(No symbol) [0x00A8C063]
(No symbol) [0x00A8CECD]
GetHandleVerifier [0x00F08D83+3294723]
GetHandleVerifier [0x00F46CC2+3548482]
GetHandleVerifier [0x00F41C9C+3527964]
GetHandleVerifier [0x00C8870E+671630]
(No symbol) [0x00B81EB4]
(No symbol) [0x00B7D808]
(No symbol) [0x00B7D92D]
(No symbol) [0x00B6F7E0]
BaseThreadInitThunk [0x75747BA9+25]
RtlInitializeExceptionChain [0x7726BD2B+107]
RtlClearBits [0x7726BCAF+191]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\switch_to.py", line 141, in _w3c_window
send_handle(window_name)
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\switch_to.py", line 137, in send_handle
self._driver.execute(Command.SWITCH_TO_WINDOW, {"handle": h})
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 345, in execute
self.error_handler.check_response(response)
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchWindowException: Message: no such window
(Session info: chrome=121.0.6167.85)
Stacktrace:
GetHandleVerifier [0x00BF1673+52979]
(No symbol) [0x00B77961]
(No symbol) [0x00A5DC00]
(No symbol) [0x00AC062A]
(No symbol) [0x00AB44B3]
(No symbol) [0x00A8C063]
(No symbol) [0x00A8CECD]
GetHandleVerifier [0x00F08D83+3294723]
GetHandleVerifier [0x00F46CC2+3548482]
GetHandleVerifier [0x00F41C9C+3527964]
GetHandleVerifier [0x00C8870E+671630]
(No symbol) [0x00B81EB4]
(No symbol) [0x00B7D808]
(No symbol) [0x00B7D92D]
(No symbol) [0x00B6F7E0]
BaseThreadInitThunk [0x75747BA9+25]
RtlInitializeExceptionChain [0x7726BD2B+107]
RtlClearBits [0x7726BCAF+191]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Downloads\Microsoft-Rewards-Farmer-master\src\utils.py", line 76, in resetTabs
self.webdriver.switch_to.window(curr)
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\switch_to.py", line 133, in window
self._w3c_window(window_name)
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\switch_to.py", line 144, in _w3c_window
original_handle = self.driver.current_window_handle
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\undetected_chromedriver_init
.py", line 806, in getattribute
return super().getattribute(item)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 481, in current_window_handle
return self.execute(Command.W3C_GET_CURRENT_WINDOW_HANDLE)["value"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 345, in execute
self.error_handler.check_response(response)
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchWindowException: Message: no such window: target window already closed
from unknown error: web view not found
(Session info: chrome=121.0.6167.85)
Stacktrace:
GetHandleVerifier [0x00BF1673+52979]
(No symbol) [0x00B77961]
(No symbol) [0x00A5DD3D]
(No symbol) [0x00A4239A]
(No symbol) [0x00ABA71B]
(No symbol) [0x00ABF61B]
(No symbol) [0x00AB44B3]
(No symbol) [0x00A8C063]
(No symbol) [0x00A8CECD]
GetHandleVerifier [0x00F08D83+3294723]
GetHandleVerifier [0x00F46CC2+3548482]
GetHandleVerifier [0x00F41C9C+3527964]
GetHandleVerifier [0x00C8870E+671630]
(No symbol) [0x00B81EB4]
(No symbol) [0x00B7D808]
(No symbol) [0x00B7D92D]
(No symbol) [0x00B6F7E0]
BaseThreadInitThunk [0x75747BA9+25]
RtlInitializeExceptionChain [0x7726BD2B+107]
RtlClearBits [0x7726BCAF+191]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Downloads\Microsoft-Rewards-Farmer-master\main.py", line 24, in main
executeBot(currentAccount, notifier, args)
File "D:\Downloads\Microsoft-Rewards-Farmer-master\main.py", line 133, in executeBot
DailySet(desktopBrowser).completeDailySet()
File "D:\Downloads\Microsoft-Rewards-Farmer-master\src\dailySet.py", line 81, in completeDailySet
self.browser.utils.resetTabs()
File "D:\Downloads\Microsoft-Rewards-Farmer-master\src\utils.py", line 80, in resetTabs
self.goHome()
File "D:\Downloads\Microsoft-Rewards-Farmer-master\src\utils.py", line 86, in goHome
self.webdriver.get(BASE_URL)
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\undetected_chromedriver_init_.py", line 496, in get_wrapped
if self.execute_script("return navigator.webdriver"):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 405, in execute_script
return self.execute(command, {"script": script, "args": converted_args})["value"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 345, in execute
self.error_handler.check_response(response)
File "C:\Users\sonic\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchWindowException: Message: no such window: target window already closed
from unknown error: web view not found
(Session info: chrome=121.0.6167.85)
Stacktrace:
GetHandleVerifier [0x00BF1673+52979]
(No symbol) [0x00B77961]
(No symbol) [0x00A5DD3D]
(No symbol) [0x00A4239A]
(No symbol) [0x00ABA71B]
(No symbol) [0x00ACACB6]
(No symbol) [0x00AB4286]
(No symbol) [0x00A8C063]
(No symbol) [0x00A8CECD]
GetHandleVerifier [0x00F08D83+3294723]
GetHandleVerifier [0x00F46CC2+3548482]
GetHandleVerifier [0x00F41C9C+3527964]
GetHandleVerifier [0x00C8870E+671630]
(No symbol) [0x00B81EB4]
(No symbol) [0x00B7D808]
(No symbol) [0x00B7D92D]
(No symbol) [0x00B6F7E0]
BaseThreadInitThunk [0x75747BA9+25]
RtlInitializeExceptionChain [0x7726BD2B+107]
RtlClearBits [0x7726BCAF+191]

Screenshots

in headless the program works

Value of dashboard variable

https://gist.github.com/Beusts/9555ee18fe0f4d8f688432b869e4da47#file-gistfile1-txt

@Beusts Beusts added the bug Something isn't working label Jan 25, 2024
@iDarkSnow
Copy link

I have the same issues but it only happens on one account of the two i am using

@Natriumpikant
Copy link

I have the same issues but it only happens on one account of the two i am using

Exact the same for me.

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

3 participants