kaliiiiiiiiii / Selenium-Driverless

undetected Selenium without usage of chromedriver
https://kaliiiiiiiiii.github.io/Selenium-Driverless/
Other
616 stars 70 forks source link

result["windowId"] TypeError: 'NoneType' object is not subscriptable #267

Closed Youssefbenhammouda closed 1 month ago

Youssefbenhammouda commented 2 months ago

Hi, I am developing a script on my laptop and everything is good. When I tried to move the script to my client's laptop, it didn't work, and I noticed something odd with Chrome. (Even when I go to the URL, the bar still says about:blank) I checked we have the same Chrome version and the same Python packages (I used pip freeze).

Here's the full error:

  File "C:\Users\user\OneDrive\Bureau\Python Projetcs\trustpilot\venv\Lib\site-packages\selenium_driverless\webdriver.py", line 972, in maximize_window
    await self.set_window_state("maximized")
  File "C:\Users\user\OneDrive\Bureau\Python Projetcs\trustpilot\venv\Lib\site-packages\selenium_driverless\webdriver.py", line 961, in set_window_state
    window_id = await self.current_window_id
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\OneDrive\Bureau\Python Projetcs\trustpilot\venv\Lib\site-packages\selenium_driverless\webdriver.py", line 924, in current_window_id
    return result["windowId"]
           ~~~~~~^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

I commented the "maximize" lines and still the behaviour of the script is strange. The script now has a lot of timeout errors. I tried reinstalling chrome and still the same problem How can I troubleshoot this error? Thanks in advance.

kaliiiiiiiiii commented 2 months ago

There's no way to debug//resolve this issue if you don't provide a minimum reproducible script.

kaliiiiiiiiii commented 1 month ago

closing due to inactivity and missing minumum reproducible script