vic1707 / AutoPlay-PokeMeow-Discord

A bot that plays PokeMeow for you
15 stars 19 forks source link

Script cannot run with new discord update #17

Closed ghost closed 3 years ago

ghost commented 3 years ago

When you run script it opens a browser logs in and immediately turns off the browser.

It's 19:00:23, working time ! Traceback (most recent call last): File "D:\Programs\AutoPlay-PokeMeow-Discord-main\1Nedralis\Classes\CustomDriver.py", line 111, in SendMessage self.SEND_MSG_BAR.send_keys(keys) File "C:\Users\mamat\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\selenium\webdriver\remote\webelement.py", line 479, in send_keys 'value': keys_to_typing(value)}) File "C:\Users\mamat\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute return self._parent.execute(command, params) File "C:\Users\mamat\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Users\mamat\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementNotInteractableException: Message: Element

is not reachable by keyboard

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "bot.py", line 41, in CHECKLIST = Checklists(DRIVER) File "D:\Programs\AutoPlay-PokeMeow-Discord-main\1Nedralis\Classes\Checklists.py", line 15, in init if self.checklist(): File "D:\Programs\AutoPlay-PokeMeow-Discord-main\1Nedralis\Classes\Checklists.py", line 20, in checklist message = self.DRIVER.WaitNew(';checklist', f"{ self.DRIVER.USERNAME }'s Checklist") File "D:\Programs\AutoPlay-PokeMeow-Discord-main\1Nedralis\Classes\CustomDriver.py", line 136, in WaitNew self.SendMessage(to_send) File "D:\Programs\AutoPlay-PokeMeow-Discord-main\1Nedralis\Classes\CustomDriver.py", line 114, in SendMessage self.SEND_MSG_BAR.send_keys(keys) File "C:\Users\mamat\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\selenium\webdriver\remote\webelement.py", line 479, in send_keys 'value': keys_to_typing(value)}) File "C:\Users\mamat\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute return self._parent.execute(command, params) File "C:\Users\mamat\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Users\mamat\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementNotInteractableException: Message: Element

is not reachable by keyboard

vic1707 commented 3 years ago

Just got the issue with another user via discord, can you load the bot without the -H flag and tell me if a pop-up from discord appears?

ghost commented 3 years ago

Yeah still getting that I somehow does not have that on my main account but my alt account still has that pop out and turns off the browser. I have no idea how my main account is not affected now, it was affected at the beginning but I played some manually for 1hr and it works now.

vic1707 commented 3 years ago

Don't know why too. Only fix I found was adding sleep(5) In customDriver.py around line 73 just after self.DiscordLogin() and before self.SEND_MESSAGE_BAR=...... That way, if you load the bot without the headless mode you should have 5 seconds to manually close the pop-up.

Can't do better atm since I don't have the pop-up on any of my accounts...

ghost commented 3 years ago

Okay I will do that and tell you how it is. I think the pop-up just disappears after some time and it never shows up on the account but idk thats my guess.

vic1707 commented 3 years ago

Hope it'll go as well as the other user, I first thought he was almost the only one to encounter the pop-up... In a certain way I hope to get it in order to find a fix or workaround...

ghost commented 3 years ago

Yep it fixed it but the new update with the swap fix broke everything for me now it repeats every command like ;daily ;quest ;swap etc. its not a big deal so yeah but now it works great thank you!

vic1707 commented 3 years ago

I pushed an update around 4hours ago about the Swap issue, it should be fixed but I'll only be able to verify it Tomorrow 😅

vic1707 commented 3 years ago

no news