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

find by username not working #114

Open
math-milan opened this issue Mar 10, 2023 · 5 comments
Open

find by username not working #114

math-milan opened this issue Mar 10, 2023 · 5 comments

Comments

@math-milan
Copy link

math-milan commented Mar 10, 2023

When i try to get a chat by username i get a traceback and dont select any chats.
2023-03-10 01:20:22,042 - root -- [ERROR] >> Exception raised while getting first chat: Message: invalid element state (Session info: chrome=111.0.5563.64) Stacktrace: Backtrace: (No symbol) [0x00E2DCE3] (No symbol) [0x00DC39D1] (No symbol) [0x00CD4C70] (No symbol) [0x00CFA1DF] (No symbol) [0x00D1AECC] (No symbol) [0x00CF8726] (No symbol) [0x00D1B224] (No symbol) [0x00D2D57C] (No symbol) [0x00D1ACC6] (No symbol) [0x00CF6F68] (No symbol) [0x00CF80CD] GetHandleVerifier [0x010A3832+2506274] GetHandleVerifier [0x010D9794+2727300] GetHandleVerifier [0x010DE36C+2746716] GetHandleVerifier [0x00ED6690+617600] (No symbol) [0x00DCC712] (No symbol) [0x00DD1FF8] (No symbol) [0x00DD20DB] (No symbol) [0x00DDC63B] BaseThreadInitThunk [0x75FA00F9+25] RtlGetAppContainerNamedObjectPath [0x777A7BBE+286] RtlGetAppContainerNamedObjectPath [0x777A7B8E+238] Traceback (most recent call last): File "C:\Users\gustje04\Nextcloud\Projekte\Whatsapp Automation\alright\__init__.py", line 775, in get_last_message_received if self.find_by_username(query): File "C:\Users\gustje04\Nextcloud\Projekte\Whatsapp Automation\alright\__init__.py", line 164, in find_by_username search_box.clear() File "C:\Users\gustje04\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py", line 116, in clear self._execute(Command.CLEAR_ELEMENT) File "C:\Users\gustje04\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py", line 403, in _execute return self._parent.execute(command, params) File "C:\Users\gustje04\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 440, in execute self.error_handler.check_response(response) File "C:\Users\gustje04\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.InvalidElementStateException: Message: invalid element state (Session info: chrome=111.0.5563.64) Stacktrace: Backtrace: (No symbol) [0x00E2DCE3] (No symbol) [0x00DC39D1] (No symbol) [0x00CD4C70] (No symbol) [0x00CFA1DF] (No symbol) [0x00D1AECC] (No symbol) [0x00CF8726] (No symbol) [0x00D1B224] (No symbol) [0x00D2D57C] (No symbol) [0x00D1ACC6] (No symbol) [0x00CF6F68] (No symbol) [0x00CF80CD] GetHandleVerifier [0x010A3832+2506274] GetHandleVerifier [0x010D9794+2727300] GetHandleVerifier [0x010DE36C+2746716] GetHandleVerifier [0x00ED6690+617600] (No symbol) [0x00DCC712] (No symbol) [0x00DD1FF8] (No symbol) [0x00DD20DB] (No symbol) [0x00DDC63B] BaseThreadInitThunk [0x75FA00F9+25] RtlGetAppContainerNamedObjectPath [0x777A7BBE+286] RtlGetAppContainerNamedObjectPath [0x777A7B8E+238]
sorry im not quite sure what information is needet feel free to ask me. :)

@leggewie
Copy link
Contributor

leggewie commented Mar 13, 2023

I can confirm this. I am seeing this after the latest update to Chrome. I wonder if this is a regression.

OTOH, the error indicates that somehow the website or the rendering of it is responsible.

@Kalebu
Copy link
Owner

Kalebu commented Mar 13, 2023

@leggewie @math-milan Looking into this

@allesman
Copy link

allesman commented Apr 1, 2023

@Kalebu Did you find anything yet?

@allesman
Copy link

allesman commented May 1, 2023

I think I solved it! The xpath for the search bar in __init__.py seems to be outdated, instead of this:
'//*[@id="app"]/div[1]/div[1]/div[3]/div[1]/div[1]/div[1]/div[1]/div[2]/div[1]/div[2]',
it should instead be this:
'//*[@id="side"]/div[1]/div/div/div[2]/div/div',
I'm too dumb to do a merge or something but for now you can replace it yourselves.

@math-milan @leggewie @Kalebu

Edit: Also, this only seems to work on my Windows PC, not Raspberry Pi...

@leggewie
Copy link
Contributor

leggewie commented May 8, 2023

Thank you, @allesman. That worked for me. But isn't that already part of the latest code (changed in 8ea3456)? Are you using the latest code from git? I am not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants