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

chromedriver for M1 mac? #75

Closed
yihuanlin opened this issue Apr 6, 2023 · 7 comments · Fixed by #76
Closed

chromedriver for M1 mac? #75

yihuanlin opened this issue Apr 6, 2023 · 7 comments · Fixed by #76

Comments

@yihuanlin
Copy link

Hello. I had an error that I think is due to Chrome binary that cannot be downloaded. I am using arm64 mac and I found that chromedriver.py and downloader.py only include mac64. The latest version of Chrome (self._version = "112.0.5615.49") should support M1 mac.

self._os_darwin_32 = "mac64"
self._os_darwin_64 = "mac64"

Below is the error message I got:

> Echo360 Cloud platform detected
> This implies setup_credential, and using web_driver
>> Please login with your SSO details and type continue when logged in.
-----------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/Home/echo360/echo360.py", line 7, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/Home/echo360/echo360/main.py", line 337, in main
    downloader = EchoDownloader(
                 ^^^^^^^^^^^^^^^
  File "/Users/Home/echo360/echo360/downloader.py", line 99, in __init__
    self._driver = webdriver.Chrome(**kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/Home/echo360/_echo360venv/lib/python3.11/site-packages/selenium/webdriver/chrome/webdriver.py", line 70, in __init__
    super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
  File "/Users/Home/echo360/_echo360venv/lib/python3.11/site-packages/selenium/webdriver/chromium/webdriver.py", line 93, in __init__
    RemoteWebDriver.__init__(
  File "/Users/Home/echo360/_echo360venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 269, in __init__
    self.start_session(capabilities, browser_profile)
  File "/Users/Home/echo360/_echo360venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 360, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/Home/echo360/_echo360venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 425, in execute
    self.error_handler.check_response(response)
  File "/Users/Home/echo360/_echo360venv/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
  (Driver info: chromedriver=2.38.552518 (183d19265345f54ce39cbb94cf81ba5f15905011),platform=Mac OS X 10.16.0 x86_64)
@soraxas
Copy link
Owner

soraxas commented Apr 7, 2023

The latest version of Chrome (self._version = "112.0.5615.49") should support M1 mac.

When you say it "should support", did you mean that you've tried and it works for your case?

Or did you meant you've tried and still got the error you've posted?

@soraxas
Copy link
Owner

soraxas commented Apr 7, 2023

related #72

@yihuanlin
Copy link
Author

The latest version of Chrome (self._version = "112.0.5615.49") should support M1 mac.

When you say it "should support", did you mean that you've tried and it works for your case?

Or did you meant you've tried and still got the error you've posted?

Thank you for your reply.

I mean the latest version of chromedriver has an arm64 version for mac. I edited the line "self._version = " but I am still getting the old version. I don't know about python but I guess it was to do with checking.

Even if I have the version change I think your code "self._os_darwin" will select the version for intel (mac64) rather than m1 (mac_arm)

@soraxas
Copy link
Owner

soraxas commented Apr 7, 2023

You need to delete the previously downloaded one to trigger the download. Probably in the bin folder.

@paulpall
Copy link
Contributor

paulpall commented Dec 3, 2023

I looked into it and managed to get it working. PR #76 contains my changes.

@yihuanlin
Copy link
Author

I looked into it and managed to get it working. PR #76 contains my changes.

Thank you very much for the update. Unfortunately, my uni dropped support for echo360 and switched to an internal platform this year so I cannot test if it works on my Macbook.

@soraxas soraxas reopened this Dec 4, 2023
@soraxas soraxas linked a pull request Dec 4, 2023 that will close this issue
@soraxas
Copy link
Owner

soraxas commented Dec 4, 2023

closes by #76

@soraxas soraxas closed this as completed Dec 4, 2023
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

Successfully merging a pull request may close this issue.

3 participants