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

Incomplete Firefly III update process #362597

Open
adrillon opened this issue Dec 6, 2024 · 1 comment
Open

Incomplete Firefly III update process #362597

adrillon opened this issue Dec 6, 2024 · 1 comment
Labels
0.kind: bug Something is broken

Comments

@adrillon
Copy link

adrillon commented Dec 6, 2024

Describe the bug

I recently updated Firefly III from v6.1.21 to v6.1.24. I'm using nixpkgs unstable. After the update, Firefly III returned this error:

$ journalctl -u firefly-iii-setup
Dec 06 23:06:12 REDACTED systemd[1]: Starting firefly-iii-setup.service...
Dec 06 23:06:12 REDACTED 6nxd8l2fjgni70vpn1i0hm1ap7pyk4zv-firefly-iii-maintenance.sh[357151]: In AuthManager.php line 99:
Dec 06 23:06:12 REDACTED 6nxd8l2fjgni70vpn1i0hm1ap7pyk4zv-firefly-iii-maintenance.sh[357151]:                                                                                
Dec 06 23:06:12 REDACTED 6nxd8l2fjgni70vpn1i0hm1ap7pyk4zv-firefly-iii-maintenance.sh[357151]:   Auth driver [remote_user_guard] for guard [remote_user_guard] is not define
Dec 06 23:06:12 REDACTED 6nxd8l2fjgni70vpn1i0hm1ap7pyk4zv-firefly-iii-maintenance.sh[357151]:   d.
Dec 06 23:06:12 REDACTED 6nxd8l2fjgni70vpn1i0hm1ap7pyk4zv-firefly-iii-maintenance.sh[357151]:                                                                                                                                                   
Dec 06 23:06:14 REDACTED systemd[1]: firefly-iii-setup.service: Main process exited, code=exited, status=1/FAILURE
Dec 06 23:06:14 REDACTED systemd[1]: firefly-iii-setup.service: Failed with result 'exit-code'.
Dec 06 23:06:14 REDACTED systemd[1]: Failed to start firefly-iii-setup.service.
Dec 06 23:06:14 REDACTED systemd[1]: firefly-iii-setup.service: Consumed 1.594s CPU time, 22.5M memory peak.

Steps To Reproduce

Steps to reproduce the behavior:

services.firefly-iii = {
    enable = true;
    enableNginx = true;
    group = "nginx";
    virtualHost = "ff3.example.com";
    settings = {
      APP_URL = "https://ff3.example.com";
      APP_KEY_FILE = pkgs.writeText "app.key" "base64:MTIzNDU2Nzg5MTAxMTEyMTMxNDE1MTYxNzE4MTkyCg=="; # This is not my real key.
      DB_CONNECTION = "pgsql";
      AUTHENTICATION_GUARD = "remote_user_guard"; # This is the important part which triggers the bug.
      AUTHENTICATION_GUARD_HEADER = "HTTP_X_USER";
      AUTHENTICATION_GUARD_EMAIL = "HTTP_X_EMAIL";
    };
  };
  1. nixos-rebuild using nixpkgs commit 36747427fcb4985f0f3b9227a2a05e923d99bc34 (last change on the Firefly III package before the update to v6.1.24)
  2. Verify that Firefly III starts properly (it will most likely show an error if HTTP header auth isn't set up properly, but the important part is that it displays something).
  3. Update nixpkgs and rebuild
  4. You will get a 502 from nginx, because phpfpm-firefly-iii failed to start, due to dependency firefly-iii-setup crashing with the error I pasted above.

Expected behavior

Firefly III doesn't crash on initialization after an update.

Additional context

I managed to make the error go away by running /nix/store/sgd0j13g5ln60dvnj373yijrwsvzs6ny-firefly-iii-6.1.24/artisan clear-compiled.

It may be necessary to set the APP_KEY or APP_KEY_FILE environment variables before running artisan.

Metadata

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.62, NixOS, 25.05 (Warbler), 25.05.20241205.d0797a0`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.17.0`
 - channels(root): `"nixos-23.11"`
 - nixpkgs: `/nix/store/nr5nl3zwzl02x3rnikjbry3s5xy7bm1d-source`

Notify maintainers

@savyajha


Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

@adrillon adrillon added the 0.kind: bug Something is broken label Dec 6, 2024
@savyajha
Copy link
Contributor

savyajha commented Dec 7, 2024

I feel like Laravel's cache clearing should be very well-documented somewhere. I used the artisan cache:clear command but that didn't work, now it seems manually clearing it is also a pain. Can you try and see whether the command php artisan optimize:clear works for this case or not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants