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

Unable to run Firefox in Gitpod workspace or Unable to install Firefox with snap #19342

Open
shaal opened this issue Jan 20, 2024 · 3 comments
Open
Labels
type: bug Something isn't working

Comments

@shaal
Copy link
Contributor

shaal commented Jan 20, 2024

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

  1. 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 shaal added the type: bug Something isn't working label Jan 20, 2024
@Siddhant-K-code
Copy link
Member

Siddhant-K-code commented Jan 21, 2024

@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:

image

@shaal
Copy link
Contributor Author

shaal commented Jan 22, 2024

@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 -
gitpod-samples/template-x11-vnc#1

@Siddhant-K-code
Copy link
Member

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 🤷🏼‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants