appium-desktop icon indicating copy to clipboard operation
appium-desktop copied to clipboard

Unable to download Chromedriver on Linux (AppImage)

Open pandasauce opened this issue 4 years ago • 1 comments
trafficstars

Appium or Appium Desktop?

You are reporting an issue at the Appium Desktop repository. Appium Desktop is a wrapper around Appium. If you are having trouble running tests, it is much more likely that the problem you are encountering is not a problem with Appium Desktop but with Appium. For that reason we require you to have tried your testcase with Appium CLI before reporting issues. Check the checkbox below to confirm that you have proven your issue does not reproduce on Appium itself:

  • [ ] I have verified that my issue does not occur with Appium and should be investigated as an Appium Desktop issue

The problem

On Linux, the AppImage gets fuse-mounted as a read-only file system:

$ mount | grep Appium
Appium.AppImage on /tmp/.mount_Appium7f54kj type fuse.Appium.AppImage (ro,nosuid,nodev,relatime,user_id=1000,group_id=1000)
Appium.AppImage on /tmp/.mount_AppiumJt9MlY type fuse.Appium.AppImage (ro,nosuid,nodev,relatime,user_id=1000,group_id=1000)
Appium.AppImage on /tmp/.mount_AppiumIV5AS7 type fuse.Appium.AppImage (ro,nosuid,nodev,relatime,user_id=1000,group_id=1000)

This causes a problem when it tries to download a Chromedriver and extract it into its own directory, e.g. when switching context into a WebView on Android:

[ChromedriverStorageClient] Selecting chromedrivers whose minimum supported browser version matches to 71
[ChromedriverStorageClient] Got 3 items
[ChromedriverStorageClient] Will select candidate drivers versioned as '2.46'
[ChromedriverStorageClient] Selecting chromedrivers whose platform matches to linux64
[ChromedriverStorageClient] Got 1 item
[ChromedriverStorageClient] Got 1 driver to sync: [
[ChromedriverStorageClient]   "2.46/chromedriver_linux64.zip"
[ChromedriverStorageClient] ]
[ChromedriverStorageClient] Retrieving 'https://chromedriver.storage.googleapis.com/2.46/chromedriver_linux64.zip' to '/tmp/2021822-15895-1ieynsh.clri/0.zip'
[Support] Traversed 1 directory and 1 file in 2ms
[ChromedriverStorageClient] Moving the extracted 'chromedriver' to '/tmp/.mount_AppiumIV5AS7/resources/app/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_linux64_v2.46'
[Chromedriver] Cannot synchronize local chromedrivers with the remote storage at https://chromedriver.storage.googleapis.com: EROFS: read-only file system, open '/tmp/.mount_AppiumIV5AS7/resources/app/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_linux64_v2.46'
[Chromedriver] Error: EROFS: read-only file system, open '/tmp/.mount_AppiumIV5AS7/resources/app/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_linux64_v2.46'
[Chromedriver] Error: No Chromedriver found that can automate Chrome '71.0.3578'. See https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md for more details
[Chromedriver]     at Chromedriver.getCompatibleChromedriver (/tmp/.mount_AppiumIV5AS7/resources/app/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:367:15)
[Chromedriver] No Chromedriver found that can automate Chrome '71.0.3578'. See https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md for more details
[W3C (d7b5a01e)] Encountered internal error running command: Error: No Chromedriver found that can automate Chrome '71.0.3578'. See https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md for more details
[W3C (d7b5a01e)]     at Object.errorAndThrow (/tmp/.mount_AppiumIV5AS7/resources/app/node_modules/appium/node_modules/appium-support/lib/logging.js:94:35)
[W3C (d7b5a01e)]     at Chromedriver.start (/tmp/.mount_AppiumIV5AS7/resources/app/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:541:11)
[HTTP] <-- POST /wd/hub/session/d7b5a01e-139e-42f8-9464-2f40956f9383/context 500 2092 ms - 897

It seems similar to the Mac OS problem in the readme.

I imagine the solution to this might be outside of the desktop app, possibly by Appium calling mktemp and storing the Chromedriver there or something along those lines, but given the response for Mac OS this may not be an option? Anyway, just an idea.

Environment

  • I am running Appium Desktop version 1.21.0
  • I am on (pick one):
    • [ ] Mac
    • [ ] Windows
    • [x] Linux

pandasauce avatar Sep 22 '21 10:09 pandasauce

@pandasauce please show the logs where this scenario is successful in command line Appium so that we can figure out what the difference is between Appium and Appium Desktop here.

jlipps avatar Sep 22 '21 16:09 jlipps