ruimarinho / gsts

Obtain and store AWS STS credentials to interact with Amazon services by authenticating via G Suite SAML.
MIT License
222 stars 38 forks source link

Failed to launch chromium because executable doesn't exist #44

Closed tristanpemble closed 3 years ago

tristanpemble commented 3 years ago
browserType.launchPersistentContext: Failed to launch chromium because executable doesn't exist at /Users/XXXX/Library/Caches/ms-playwright/chromium-844399/chrome-mac/Chromium.app/Contents/MacOS/Chromium
Try re-installing playwright with "npm install playwright"
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.
    at Connection.sendMessageToServer (/usr/local/lib/node_modules/gsts/node_modules/playwright/lib/client/connection.js:69:15)
    at Proxy.<anonymous> (/usr/local/lib/node_modules/gsts/node_modules/playwright/lib/client/channelOwner.js:44:61)
    at /usr/local/lib/node_modules/gsts/node_modules/playwright/lib/client/browserType.js:82:48
    at async BrowserType._wrapApiCall (/usr/local/lib/node_modules/gsts/node_modules/playwright/lib/client/channelOwner.js:72:28)

related: https://github.com/microsoft/playwright/issues/4033

tristanpemble commented 3 years ago

Workaround is to use your own locally installed browser, for example:

gsts --engine=firefox --engine-executable-path=/Applications/Firefox.app/Contents/MacOS/firefox
ruimarinho commented 3 years ago

@tristanpemble it seems like this issue is related to the one you've just linked above. There is another workaround which is calling node node_modules/playwright/install.js under /usr/local/Cellar/gsts/3.0.2/libexec/lib/node_modules/gsts.

Seems to be related to the node version playwright is installed with..

ruimarinho commented 3 years ago

@tristanpemble I believe I've found an elegant solution for this. Could you please try updating to gsts@3.0.4 using the new formula update?

ruimarinho commented 3 years ago

Closing because I believe the current workaround is acceptable at the cost of some additional traffic. The user content data (i.e. cookies, session) remains in the same place, so really only the executables move around.

tristanpemble commented 3 years ago

@ruimarinho I think that fixed it! thanks!