[Resolved] yarn start unable to launch Firefox Developer Edition without sudo

$ expo diagnostics

  Expo CLI 3.21.13 environment info:
      OS: Linux 5.4 Manjaro Linux
      Shell: 5.8 - /usr/bin/zsh
      Node: 14.5.0 - ~/.nvm/versions/node/v14.5.0/bin/node
      Yarn: 1.22.4 - ~/.yarn/bin/yarn
      npm: 6.14.5 - ~/.nvm/versions/node/v14.5.0/bin/npm
      Watchman: 4.9.0 - /usr/bin/watchman
      Android Studio: 4.0 AI-193.6911.18.40.6514223
      expo: ^38.0.8 => 38.0.8 
      react: ~16.11.0 => 16.11.0 
      react-dom: ~16.11.0 => 16.11.0 
      react-native: https://github.com/expo/react-native/archive/sdk-38.0.1.tar.gz => 0.62.2 
      react-native-web: ~0.11.7 => 0.11.7 
      expo-cli: 3.21.13

Hi, I’m getting the following error on a brand new install of expo:

$ yarn start
yarn run v1.22.4
$ expo start
Starting project at /home/username/Code/expo
Expo DevTools is running at http://localhost:19002
Opening DevTools in the browser... (press shift-d to disable)
Error: spawn firefox-develop-editon ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I can bypass this error using sudo but, that seems a bit odd to have to do every time. I tried uninstalling and reinstalling yarn and expo again but, get the same thing.

I tried this, though it didn’t seem to help: expo start is running my project - #10 by wodin

Anyone have any thoughts on how to address this issue by chance?

Thank you!


Using the fix from the link above did bypass the issue, actually (I put "openDevToolsAtStartup": false, at the bottom instead of above the PATH; my mistake) but, now I’m getting the following:

Failed to construct transformer:  Error: EACCES: permission denied, open '/tmp/haste-map-metro-4-304e1c31a24c1a2dd32fe31960e8b0ab-05d9595d1f7d32f85d732f06fd3b25e9'
    at Object.openSync (fs.js:465:3)
    at Object.writeFileSync (fs.js:1416:35)
    at Object.writeFileSync (/home/username/Code/expo/node_modules/jest-serializer/build/index.js:196:21)
    at HasteMap._persist (/home/username/Code/expo/node_modules/jest-haste-map/build/index.js:944:31)
    at /home/username/Code/expo/node_modules/jest-haste-map/build/index.js:497:17
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/home/username/Code/expo/node_modules/jest-haste-map/build/index.js:193:24)
    at _next (/home/username/Code/expo/node_modules/jest-haste-map/build/index.js:213:9)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  errno: -13,
  syscall: 'open',
  code: 'EACCES',
  path: '/tmp/haste-map-metro-4-304e1c31a24c1a2dd32fe31960e8b0ab-05d9595d1f7d32f85d732f06fd3b25e9'

Which seems to be yet another permissions error (I’m sure sudo will address this one as well but, why does this exist in the first place?)

Update 2:
This is where I’m currently at: Can't install expo-cli · Discussion #590 · expo/expo-cli · GitHub

I’ll let you know how it goes…

Update 3:
Using sudo npm install --unsafe-perm -g expo-cli from the following comment seems to have addressed the second issue/error I ran into: https://github.com/expo/expo-cli/issues/590#issuecomment-492397062

(I hit the new user 2 link limit)

Using --unsafe-perm didn’t seem ideal so, I also tried the following but, it didn’t address the issue (I was already using nvm, so not sure): https://github.com/expo/expo-cli/issues/590#issuecomment-555454324

In regards to the firefox-developer-edition issue, well, I’m setting export BROWSER=firefox-develop-editon in my .zshrc file to get URLs in Yakuake (terminal) to open in the dev version instead of Firefox proper, and this even though I have Firefox Developer Edition set as the default application for the various settings and mime types. Once I remove that, yarn start and or hitting the d key (or removing the setting from ~/.expo/state.json) works fine. Something about firefox-developer-editon having different permissions, although when I ls -a both editions, they have the same permission; it’s a mystery.

Final Update [please close]

Error: spawn firefox-develop-editon ENOENT

When corrected in my .zshrc file: export BROWSER=firefox-developer-edition

Yeah, apparently I don’t know how to spell. It’s been like this for who knows how long and has never been an issue, as the default browser was set correctly and always made use of the kdeglobals like it should. I guess every once in awhile an application needs to have it set explicitly and this was one of those occasions but, I had the name misspelled so, it couldn’t find the browser. Still very odd because it would work when using sudo. Sigh… who knows. I think it’s all working now so, feel free to close.


ETA for other’s sake:

xdg-settings get default-web-browser will tell you what your current default browser is and you can set it using xdg-settings set default-web-browser firefox-developer-edition.desktop (adjust accordingly.) Also, I ended up removing expo-cli (both globally and not; apparently I had two versions; sigh) and then installed again but, this time without ‘–unsafe-perm’ and now it works lol.

1 Like

Thanks for sharing the solution with such a detailed follow-up, @natetronn. It means a lot to us when people in the Expo community spend some of their time to help inform others. :clap:

A bit more detail on how I addressed the issue with the default browser:


This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.