# Web-ext run doesn't work on Ubuntu 22

**URL:** <https://discourse.mozilla.org/t/web-ext-run-doesnt-work-on-ubuntu-22/102766>\
**Category:** Development\
**Created:** [August 13, 2022, 1:29pm UTC](https://discourse.mozilla.org/t/web-ext-run-doesnt-work-on-ubuntu-22/102766 "2022-08-13T13:29:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![beh](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/beh/32/44266_2.png) [@beh](https://discourse.mozilla.org/u/beh)\
**Post date:** [August 13, 2022, 1:29pm UTC](https://discourse.mozilla.org/t/web-ext-run-doesnt-work-on-ubuntu-22/102766/1 "2022-08-13T13:29:50Z")

</div>

![Screenshot from 2022-08-13 15-16-10](https://us1.discourse-cdn.com/flex001/uploads/mozilla/original/3X/d/a/da536ed9abf4e9ba602b94f0a55c6869c10cb448.png)

Has anyone have found a solution to this problem ?  
`web-ext run` doesn’t want to launch Firefox on Ubuntu 22 that forces Firefox to be installed via snap. I know this is a known issue, but will that be solved ? is it on the roadmap ?

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![beh](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/beh/32/44266_2.png) [@beh](https://discourse.mozilla.org/u/beh)\
**Post date:** [August 15, 2022, 9:08pm UTC](https://discourse.mozilla.org/t/web-ext-run-doesnt-work-on-ubuntu-22/102766/2 "2022-08-15T21:08:33Z")

</div>

For anyone who reads this, I found 2 alternatives solutions :

- What I did for now : I installed a Debian 11 VM, but that not ideal (lags, resources of my, etc.)
- It’s also possible to unistall Firefox snap and disable (snap disable firefox && snap remove --purge firefox) then install firefox via [apt](https://www.addictivetips.com/ubuntu-linux-tips/how-to-disable-firefox-snap-package-in-ubuntu-22-04-lts/)

Has anyone another solution using web-ext with Firefox snap 🙄 ?  
Thanks

---

<div class="post-metadata">

**Author:** ![juraj.masiar](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/juraj.masiar/32/30587_2.png) [@juraj.masiar](https://discourse.mozilla.org/u/juraj.masiar)\
**Post date:** [August 16, 2022, 6:45am UTC](https://discourse.mozilla.org/t/web-ext-run-doesnt-work-on-ubuntu-22/102766/3 "2022-08-16T06:45:15Z")

</div>

Maybe related to this:

> <https://github.com/mozilla/web-ext/issues/1696>
>
> \### Is this a feature request or a bug?
> Bug
> 
> The error is identical to #1607 …however the cause is quite likely due to the app being installed via snap.
> 
> \### What is the current behavior?
> 
> Running \`web-ext run\` fails due to missing/inaccessible Firefox profile error.
> 
> \`\`\`
> web-ext run -p ~/snap/firefox/common/.mozilla/firefox/lis9gi8g.addons/ -v
> \[program.js\]\[info\] Version: 3.1.1
> \[program.js\]\[debug\] Discovering config files. Set --no-config-discovery to disable
> \[config.js\]\[debug\] Discovered config "/home/grayedfox/.web-ext-config.js" does not exist or is not readable
> \[config.js\]\[debug\] Discovered config "/home/grayedfox/github/multi-dict/web-ext-config.js" does not exist or is not readable
> \[program.js\]\[info\] Applying config file: ./package.json
> \[config.js\]\[debug\] Loading JS config file: "/home/grayedfox/github/multi-dict/package.json" (resolved to "/home/grayedfox/github/multi-dict/package.json")
> \[config.js\]\[debug\] Looking for webExt key inside package.json file
> \[config.js\]\[debug\] Config file /home/grayedfox/github/multi-dict/package.json did not define any options. Did you set module.exports = {...}?
> \[cmd/run.js\]\[info\] Running web extension from /home/grayedfox/github/multi-dict
> \[util/manifest.js\]\[debug\] Validating manifest at /home/grayedfox/github/multi-dict/manifest.json
> \[extension-runners/firefox-desktop.js\]\[debug\] Copying Firefox profile from /home/grayedfox/snap/firefox/common/.mozilla/firefox/lis9gi8g.addons/
> \[firefox/index.js\]\[debug\] Copying profile directory from "/home/grayedfox/snap/firefox/common/.mozilla/firefox/lis9gi8g.addons/"
> \[firefox/index.js\]\[debug\] Running Firefox with profile at /tmp/890adb6d-e660-4dbe-a2d2-d23a5a2237a5
> \[firefox/index.js\]\[debug\] Checking if remote Firefox port 6005 is available
> \[firefox/remote.js\]\[debug\] Connecting to Firefox on port 6005
> \[firefox/index.js\]\[debug\] Executing Firefox binary: /snap/bin/firefox
> \[firefox/index.js\]\[debug\] Firefox args: -start-debugger-server 6005 -foreground -no-remote -profile /tmp/890adb6d-e660-4dbe-a2d2-d23a5a2237a5
> \[firefox/index.js\]\[info\] Use --verbose or open Tools \> Web Developer \> Browser Console to see logging
> \[firefox/remote.js\]\[debug\] Connecting to the remote Firefox debugger
> \[firefox/remote.js\]\[debug\] Connecting to Firefox on port 6005
> \[firefox/index.js\]\[debug\] Firefox stderr: /snap/firefox/253/bin/desktop-launch: line 174: /home/grayedfox/snap/firefox/common/.config/user-dirs.dirs: No such file or directory
> \[firefox/index.js\]\[debug\] Firefox stderr: cp: cannot create regular file '/home/grayedfox/snap/firefox/common/.config/': Not a directory
> \[firefox/index.js\]\[debug\] Firefox stderr: /snap/firefox/253/bin/desktop-launch: line 177: /home/grayedfox/snap/firefox/common/.config/user-dirs.dirs.md5sum: No such file or directory
> \[firefox/index.js\]\[debug\] Firefox stderr: /snap/firefox/253/bin/desktop-launch: line 177: /home/grayedfox/snap/firefox/common/.config/user-dirs.locale.md5sum: No such file or directory
> \[firefox/index.js\]\[debug\] Firefox stderr: Gtk-Message: Failed to load module "canberra-gtk-module"
> ...
> \[firefox/remote.js\]\[debug\] Retrying Firefox (250); connection error: Error: connect ECONNREFUSED 127.0.0.1:6005
> \[firefox/remote.js\]\[debug\] Connect to Firefox debugger: too many retries
> \[program.js\]\[error\] 
> Error: connect ECONNREFUSED 127.0.0.1:6005
> at TCPConnectWrap.afterConnect \[as oncomplete\] (net.js:1106:14)
> 
> \[program.js\]\[error\] Error code: ECONNREFUSED
> 
> \[program.js\]\[debug\] Command executed: run
> \`\`\`
> 
> \### What is the expected or desired behavior?
> Firefox should open with copy of desired or default profile.
> 
> \### Version information (for bug reports)
> 
> \* \*\*Firefox version\*\*: 
> \- 68.0.2 (64-bit)
> \- Mozilla Firefox Snap for Ubuntu
> \- canonical-002 - 1.0
> 
> \`\`\`\`
> node --version && npm --version && web-ext --version
> v10.16.3
> 6.11.2
> 3.1.1
> \`\`\`\`

Ask there for a workaround, they may know.

---

<div class="post-metadata">

**Author:** ![beh](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/beh/32/44266_2.png) [@beh](https://discourse.mozilla.org/u/beh)\
**Post date:** [August 18, 2022, 9:51pm UTC](https://discourse.mozilla.org/t/web-ext-run-doesnt-work-on-ubuntu-22/102766/4 "2022-08-18T21:51:25Z")

</div>

Hi @juraj.masiar, I read this article before posting here but I though my error message was different so I didn’t give it a try 😅 but I should definitely do !  
I’ll give it a try asap and tell here the results. Thx again 👍

---

<div class="post-metadata">

**Author:** ![beh](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/beh/32/44266_2.png) [@beh](https://discourse.mozilla.org/u/beh)\
**Post date:** [September 8, 2022, 11:57pm UTC](https://discourse.mozilla.org/t/web-ext-run-doesnt-work-on-ubuntu-22/102766/5 "2022-09-08T23:57:16Z")

</div>

Hi @juraj.masiar, I just tried this solution (setting $TEMP to a home directory) and it doesn’t work 🤕

---

<div class="post-metadata">

**Author:** ![juraj.masiar](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/juraj.masiar/32/30587_2.png) [@juraj.masiar](https://discourse.mozilla.org/u/juraj.masiar)\
**Post date:** [September 9, 2022, 7:28am UTC](https://discourse.mozilla.org/t/web-ext-run-doesnt-work-on-ubuntu-22/102766/6 "2022-09-09T07:28:50Z")

</div>

Well, I don’t use linux that much so this is not my area of expertise…

It’s best to ask directly in the web-ext issue tracker, they are better suited to help with workarounds (like installing a second Firefox [without using snap](https://github.com/mozilla/web-ext/issues/1696#issuecomment-1230823961)).

---

<div class="post-metadata">

**Author:** ![beh](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/beh/32/44266_2.png) [@beh](https://discourse.mozilla.org/u/beh)\
**Post date:** [September 10, 2022, 9:31pm UTC](https://discourse.mozilla.org/t/web-ext-run-doesnt-work-on-ubuntu-22/102766/7 "2022-09-10T21:31:02Z")

</div>

Don’ts worry, that’s what I did when I was listing the alternatives above (first I installed a VM, then [installed Firefox via apt](https://www.addictivetips.com/ubuntu-linux-tips/how-to-disable-firefox-snap-package-in-ubuntu-22-04-lts/) and it’s more convenient):

> It’s also possible to unistall Firefox snap and disable (snap disable firefox && snap remove --purge firefox) then install firefox via apt

Thanks
