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

selenium.common.exceptions.InvalidCookieDomainException: Message: invalid cookie domain: Cookie 'domain' mismatch #6

Open
antonywpaul opened this issue Aug 15, 2021 · 1 comment

Comments

@antonywpaul
Copy link

Executing for https://app.itpro.tv/course/mta-security-fundamentals-98367-2018/overview-mta98367-2018

  • Trying to log in ... *
    Cookies baked!
    Traceback (most recent call last):
    File "driver.py", line 93, in
    raise e
    File "driver.py", line 89, in
    browser.add_cookie(cookie)
    File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\webdriver.py", line 894, in add_cookie
    self.execute(Command.ADD_COOKIE, {'cookie': cookie_dict})
    File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
    File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.InvalidCookieDomainException: Message: invalid cookie domain: Cookie 'domain' mismatch
    (Session info: headless chrome=92.0.4515.131)
@VidathD
Copy link

VidathD commented Aug 16, 2021

Same here. I managed to fix it by removing/commenting out all lines in cookies.txt that don't start with .itpro.tv or app.itpro.tv

@VidathD VidathD mentioned this issue Aug 17, 2021
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

2 participants