Unable to run Firefox in Gitpod workspace or Unable to install Firefox with snap
Bug description
When trying to run Firefox in a Gitpod workspace through VNC, it fails with an error that Firefox needs to be installed via Snap. However, installing Snap and running Snap packages in Gitpod workspaces is problematic.
Steps to reproduce
- Open https://gitpod.io/#https://github.com/gitpod-samples/template-x11-vnc
Workspace affected
No response
Expected behavior
Firefox should open and run in the Gitpod workspace when launched through the VNC server.
Actual behavior
When trying to run Firefox from command line firefox, I am getting this error -
Command '/usr/bin/firefox' requires the firefox snap to be installed.
Please install it with:
snap install firefox
When running snap install firefox, I am getting this error -
error: cannot communicate with server: Post "http://localhost/v2/snaps/firefox": dial unix /run/snapd.socket: connect: no such file or directory
Example repository
https://github.com/gitpod-samples/template-x11-vnc
Anything else?
It seems there are challenges getting Snap working properly in Gitpod. An alternative solution would be finding a way to install Firefox without using Snap.
@shaal Try running the following command (you can also add it in your ~Gitpod Dockerfile~ or Gitpod yml file):
sudo apt-get update && sudo apt-get install firefox
It should work:
@Siddhant-K-code thank you!
When I add Firefox in dockerfile - it does NOT work, but if I add it in .gitpod.yml - it works as expected.
I see the same issue in the PR you opened, where Firefox is installed in dockerfile, but doesn't appear in vnc - https://github.com/gitpod-samples/template-x11-vnc/pull/1
Yeah, I tested it yesterday on that PR, it was not working as intended. But, When I manually run the command (via .gitpod.yml) it worked somehow 🤷🏼♂️
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.