Firefox - profile not found

HI there, I am trying to setup firefox-devedition.

{ inputs, pkgs, ... }: {

  programs.firefox = {
    enable = true;
    package = pkgs.firefox-devedition;
    # enableGnomeExtensions = true;
    # languagePacks = [ "en-CA" ];
    profiles = {
      default = {
        id = 0;
        name = "Default";
        isDefault = true;
        extensions = with pkgs.nur.repos.rycee.firefox-addons; [
          # see: https://github.com/nix-community/nur-combined/blob/2691dd44ce8664be1d33f61ed808aca7de38a82f/repos/rycee/pkgs/firefox-addons/generated-firefox-addons.nix
          onepassword-password-manager
          darkreader
          ublock-origin
          privacy-badger
          sidebery

        ];
    
      };

    };
  };

  home.sessionVariables = {
    MOZ_ENABLE_WAYLAND = 1;
    MOZ_USE_XINPUT2 = "1";
  };
}

Now, for some reason, after I rebuild and open the browser, I get: Your Firefox profile cannot be loaded. It may be missing or inaccessible.

☸ default in ~/.mozilla on ☁️  (us-west-2) at 22:49:42 
Ξ» ls 
0700 drwx------ - dustin 24 Jun 11:32 ο„• extensions
0700 drwx------ - dustin 10 Sep 22:49  firefox
0700 drwx------ - dustin 24 Jun 11:30  native-messaging-hosts

folder permissions look ok here.

Ξ» ls firefox/default/
0777 lrwxrwxrwx    0 dustin 10 Sep 22:49 ο…› .keep -> /nix/store/g5q65hpidlqwnnzii4nm8wdsvsqcyq6c-home-manager-files/.mozilla/firefox/default/.keep
0644 .rw-r--r--    0 dustin  4 Aug 11:31 ο…› .parentlock
0644 .rw-r--r--  40k dustin  4 Aug 11:31 ξ˜‹ addons.json
0644 .rw-r--r--  10k dustin  4 Aug 11:12  addonStartup.json.lz4
0644 .rw-r--r-- 7.9k dustin  4 Aug 12:18 ο…œ AlternateServices.txt
0755 drwxr-xr-x    - dustin  4 Aug 11:37  bookmarkbackups
0644 .rw-r--r--  221 dustin  4 Aug 11:32 ξ˜‹ broadcast-listeners.json
0600 .rw------- 229k dustin 31 Jul 10:47  cert9.db
0600 .rw-------  273 dustin  4 Aug 11:11 ο…Ί compatibility.ini
0644 .rw-r--r--  875 dustin 27 Jul 08:09 ξ˜‹ containers.json
0644 .rw-r--r-- 262k dustin  4 Aug 11:31 ο…› content-prefs.sqlite
0644 .rw-r--r-- 524k dustin  4 Aug 12:18 ο…› cookies.sqlite
0700 drwx------    - dustin  4 Aug 11:32  crashes
0755 drwxr-xr-x    - dustin 27 Jul 08:09  datareporting
0644 .rw-r--r-- 2.0k dustin  4 Aug 11:12 ξ˜‹ extension-preferences.json
0644 .rw-r--r--  717 dustin  4 Aug 11:31 ξ˜‹ extension-settings.json
0755 drwxr-xr-x    - dustin 28 Jul 14:31 ο„• extension-store
0755 drwxr-xr-x    - dustin 10 Sep 22:49  extensions
0644 .rw-r--r-- 150k dustin  4 Aug 11:12 ξ˜‹ extensions.json
0644 .rw-r--r-- 5.2M dustin  4 Aug 12:18 ο…› favicons.sqlite
0644 .rw-r--r-- 262k dustin 31 Jul 10:49 ο…› formhistory.sqlite
0755 drwxr-xr-x    - dustin 27 Jul 11:39  gmp-gmpopenh264
0755 drwxr-xr-x    - dustin 27 Jul 11:39  gmp-widevinecdm
0644 .rw-r--r--  410 dustin 27 Jul 08:09 ξ˜‹ handlers.json
0600 .rw------- 295k dustin 27 Jul 08:09  key4.db
0777 lrwxrwxrwx   17 dustin  4 Aug 11:31 ο€– lock -> 127.0.0.2:+463315
0700 drwx------    - dustin 27 Jul 08:09 ο„• minidumps
0644 .rw-r--r--  98k dustin  4 Aug 12:16 ο…› permissions.sqlite
0600 .rw-------  461 dustin 27 Jul 08:09 ο…œ pkcs11.txt
0644 .rw-r--r-- 5.2M dustin  4 Aug 12:18 ο…› places.sqlite
0600 .rw-------  20k dustin  4 Aug 12:18  prefs.js
0644 .rw-r--r--  66k dustin  4 Aug 11:31 ο…› protections.sqlite
0755 drwxr-xr-x    - dustin 27 Jul 11:54  security_state
0644 .rw-r--r--  288 dustin  4 Aug 12:18 ξ˜‹ sessionCheckpoints.json
0755 drwxr-xr-x    - dustin  4 Aug 12:18  sessionstore-backups
0644 .rw-r--r-- 7.2k dustin  4 Aug 12:18 ο…› sessionstore.jsonlz4
0755 drwxr-xr-x    - dustin  4 Aug 11:12  settings
0644 .rw-r--r--   18 dustin 27 Jul 08:09 ξ˜‹ shield-preference-experiments.json
0644 .rw-r--r-- 2.5k dustin  4 Aug 11:15 ο…œ SiteSecurityServiceState.txt
0755 drwxr-xr-x    - dustin 27 Jul 11:35  storage
0644 .rw-r--r--  33k dustin 27 Jul 11:35 ο…› storage-sync-v2.sqlite
0644 .rw-r--r--  33k dustin  4 Aug 12:18 ο…› storage-sync-v2.sqlite-shm
0644 .rw-r--r-- 984k dustin  4 Aug 11:31 ο…› storage-sync-v2.sqlite-wal
0644 .rw-r--r-- 9.2k dustin  4 Aug 12:18 ο…› storage.sqlite
0644 .rw-r--r--   41 dustin 27 Jul 08:09 ξ˜‹ times.json
0644 .rw-r--r--  98k dustin 27 Jul 08:09 ο…› webappsstore.sqlite
0644 .rw-r--r--  678 dustin  4 Aug 12:18 ξ˜‹ xulstore.json

permissions look ok here too.

Ξ» ls firefox/default/extensions
0777 lrwxrwxrwx  40M dustin 10 Sep 22:49 ο…› 87677a2c52b84ad3a151a4a72f5bd3c4@jetpack.xpi -> /nix/store/g5q65hpidlqwnnzii4nm8wdsvsqcyq6c-home-manager-files/.mozilla/firefox/default/extensions/87677a2c52b84ad3a151a4a72f5bd3c4@jetpack.xpi
0777 lrwxrwxrwx 669k dustin 10 Sep 22:49 ο…› addon@darkreader.org.xpi -> /nix/store/g5q65hpidlqwnnzii4nm8wdsvsqcyq6c-home-manager-files/.mozilla/firefox/default/extensions/addon@darkreader.org.xpi
0644 .rw-r--r-- 213k dustin 27 Jul 11:38 ο…› en-CA@dictionaries.addons.mozilla.org.xpi
0777 lrwxrwxrwx 2.0M dustin 10 Sep 22:49 ο…› jid1-MnnxcxisBPnSXQ@jetpack.xpi -> /nix/store/g5q65hpidlqwnnzii4nm8wdsvsqcyq6c-home-manager-files/.mozilla/firefox/default/extensions/jid1-MnnxcxisBPnSXQ@jetpack.xpi
0644 .rw-r--r-- 552k dustin 27 Jul 11:38 ο…› langpack-en-CA@firefox.mozilla.org.xpi
0777 lrwxrwxrwx 3.5M dustin 10 Sep 22:49 ο…› uBlock0@raymondhill.net.xpi -> /nix/store/g5q65hpidlqwnnzii4nm8wdsvsqcyq6c-home-manager-files/.mozilla/firefox/default/extensions/uBlock0@raymondhill.net.xpi
0777 lrwxrwxrwx 374k dustin 10 Sep 22:49 ο…› {3c078156-979c-498b-8990-85f7987dd929}.xpi -> /nix/store/g5q65hpidlqwnnzii4nm8wdsvsqcyq6c-home-manager-files/.mozilla/firefox/default/extensions/{3c078156-979c-498b-8990-85f7987dd929}.xpi
0777 lrwxrwxrwx 6.0k dustin 10 Sep 22:49 ο…› {6d85dea2-0fb4-4de3-9f8c-264bce9a2296}.xpi -> /nix/store/g5q65hpidlqwnnzii4nm8wdsvsqcyq6c-home-manager-files/.mozilla/firefox/default/extensions/{6d85dea2-0fb4-4de3-9f8c-264bce9a2296}.xpi
0777 lrwxrwxrwx  21M dustin 10 Sep 22:49 ο…› {d634138d-c276-4fc8-924b-40a0ea21d284}.xpi -> /nix/store/g5q65hpidlqwnnzii4nm8wdsvsqcyq6c-home-manager-files/.mozilla/firefox/default/extensions/{d634138d-c276-4fc8-924b-40a0ea21d284}.xpi

I can see my extensions are installed.

Ξ» bat firefox/profiles.ini 
───────┬────────────────────────────────────────────────────────────────────────────────────────────
       β”‚ File: firefox/profiles.ini
───────┼────────────────────────────────────────────────────────────────────────────────────────────
   1   β”‚ [General]
   2   β”‚ StartWithLastProfile=1
   3   β”‚ 
   4   β”‚ [Profile0]
   5   β”‚ Default=1
   6   β”‚ IsRelative=1
   7   β”‚ Name=Default
   8   β”‚ Path=default

seems to have my default profile an ID correct.

Any suggestions?

Thank you.

ah ok. It is the devedition. If I revert to the regular package, the exact same config works.

Still looking for suggestions, but this is a start.

Cheers

No clue,

But you can start it from terminal e check logs?

I had the same. There’s a couple of problems, first the different versions seem to share the same profiles.

pkgs.firefox-devedition uses the firefox executable, which is naughty. Use pkgs.firefox-devedition-bin which uses the correct firefox-developer-edition executable.

Next, to solve the profile issue simply delete ~/.mozilla and try rebuilding/launching again.

Edit: it seems this breaks future rebuilds… back to the drawing board.

On another note, running firefox-developer-edition --profile ~/.mozilla/firefox works just fine, as does firefox-developer-edition -P $username

I also experienced this issue. Switched from firefox-devedition to just firefox to fix it for now, but if someone finds a real fix I would like to use firefox-devedition again.

This is the problem of the profile naming convention:
in pkgs.firefox you would write:

profiles.default

HOWEVER,
in pkgs.firefox-devedition* you should use:

profiles.dev-edition-default

1 Like