Chromedriver syncronization error

Hi,

I am having an error when using the chromedriver. Actually, it works perfectly when I run it on my machine, but when I run it on an external machine through Gitlab CI runner I have an error: “Error: EACCES: permission denied. rename ‘/var/folders/5r/hwz3n74j6rscv6qh5r3ffz8c0000gr/T/202136-71216-1yi7y0i.cs14g/chromedriver’ -> ‘/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver_mac64_v2.43’”

This causes the absence of the “chromedriver_mac64_v2.43” file on my /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/ directory. How can I give the permission to allow this action?

Here you can find the log:

2021-04-06 09:36:35:476 [ChromedriverStorageClient] Selecting chromedrivers whose platform matches to mac64
2021-04-06 09:36:35:476 [ChromedriverStorageClient] Got 2 items
2021-04-06 09:36:35:476 [ChromedriverStorageClient] Got 2 drivers to sync: [
2021-04-06 09:36:35:476 [ChromedriverStorageClient] “2.43/chromedriver_mac64.zip”,
2021-04-06 09:36:35:476 [ChromedriverStorageClient] “2.44/chromedriver_mac64.zip”
2021-04-06 09:36:35:476 [ChromedriverStorageClient] ]
2021-04-06 09:36:35:476 [ChromedriverStorageClient] Retrieving ‘https://chromedriver.storage.googleapis.com/2.43/chromedriver_mac64.zip’ to ‘/var/folders/5r/hwz3n74j6rscv6qh5r3ffz8c0000gr/T/202136-71216-4bkmi6.vrwsw/0.zip’
2021-04-06 09:36:35:476 [ChromedriverStorageClient] Retrieving ‘https://chromedriver.storage.googleapis.com/2.44/chromedriver_mac64.zip’ to ‘/var/folders/5r/hwz3n74j6rscv6qh5r3ffz8c0000gr/T/202136-71216-4bkmi6.vrwsw/1.zip’
2021-04-06 09:36:38:384 [Support] Traversed 1 directory and 1 file in 3ms
2021-04-06 09:36:38:385 [ChromedriverStorageClient] Moving the extracted ‘chromedriver’ to ‘/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver_mac64_v2.43’
2021-04-06 09:36:38:475 [Chromedriver] Cannot synchronize local chromedrivers with the remote storage at https://chromedriver.storage.googleapis.com: EACCES: permission denied, rename ‘/var/folders/5r/hwz3n74j6rscv6qh5r3ffz8c0000gr/T/202136-71216-1yi7y0i.cs14g/chromedriver’ -> ‘/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver_mac64_v2.43’
2021-04-06 09:36:38:476 [Chromedriver] Error: EACCES: permission denied, rename ‘/var/folders/5r/hwz3n74j6rscv6qh5r3ffz8c0000gr/T/202136-71216-1yi7y0i.cs14g/chromedriver’ -> ‘/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver_mac64_v2.43’
2021-04-06 09:36:38:505 [Chromedriver] Error: No Chromedriver found that can automate Chrome ‘69.0.3497’. See https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md for more details
2021-04-06 09:36:38:505 [Chromedriver] at Chromedriver.getCompatibleChromedriver (/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:366:15)
2021-04-06 09:36:38:505 [Chromedriver] at Chromedriver.initChromedriverPath (/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:390:11)
2021-04-06 09:36:38:505 [Chromedriver] at Chromedriver.start (/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:455:7)
2021-04-06 09:36:38:505 [Chromedriver] at AndroidUiautomator2Driver.setupNewChromedriver (/usr/local/lib/node_modules/appium/node_modules/appium-android-driver/lib/commands/context.js:440:3)
2021-04-06 09:36:38:505 [Chromedriver] at AndroidUiautomator2Driver.startChromedriverProxy (/usr/local/lib/node_modules/appium/node_modules/appium-android-driver/lib/commands/context.js:189:10)
2021-04-06 09:36:38:505 [Chromedriver] at AndroidUiautomator2Driver.switchContext (/usr/local/lib/node_modules/appium/node_modules/appium-android-driver/lib/commands/context.js:125:5)
2021-04-06 09:36:38:505 [Chromedriver] at AndroidUiautomator2Driver.setContext (/usr/local/lib/node_modules/appium/node_modules/appium-android-driver/lib/commands/context.js:60:3)
2021-04-06 09:36:38:506 [Chromedriver] No Chromedriver found that can automate Chrome ‘69.0.3497’. See https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md for more details
2021-04-06 09:36:38:530 [W3C (76702991)] Encountered internal error running command: Error: No Chromedriver found that can automate Chrome ‘69.0.3497’. See https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md for more details
2021-04-06 09:36:38:530 [W3C (76702991)] at Object.errorAndThrow (/usr/local/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:94:35)
2021-04-06 09:36:38:530 [W3C (76702991)] at Chromedriver.start (/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:540:11)
2021-04-06 09:36:38:531 [W3C (76702991)] at AndroidUiautomator2Driver.setupNewChromedriver (/usr/local/lib/node_modules/appium/node_modules/appium-android-driver/lib/commands/context.js:440:3)
2021-04-06 09:36:38:531 [W3C (76702991)] at AndroidUiautomator2Driver.startChromedriverProxy (/usr/local/lib/node_modules/appium/node_modules/appium-android-driver/lib/commands/context.js:189:10)
2021-04-06 09:36:38:531 [W3C (76702991)] at AndroidUiautomator2Driver.switchContext (/usr/local/lib/node_modules/appium/node_modules/appium-android-driver/lib/commands/context.js:125:5)
2021-04-06 09:36:38:531 [W3C (76702991)] at AndroidUiautomator2Driver.setContext (/usr/local/lib/node_modules/appium/node_modules/appium-android-driver/lib/commands/context.js:60:3)

I would be very grateful in someone could give me some feedback :slight_smile:

How you installed appium on remote machine?

npm install -g appium

?

PS there are also some workarounds suggested: -> google “macOS EACCES: permission denied”

I installed it by the npm install -g appium command. I perform the installation in the same way on both machines.

I have solved this issue. Highly likely the problem was that the appium was installed through sudo. This have to be avoided. I just reinstall appium as described in the following lines.

By running the following command, the global ownership of the global node modules folder is given to your user:
sudo chown $USER: $(npm -g root)

After running this, appium can be installed without using sudo:
npm install -g appium