YunoHost-Apps / invoiceninja5_ynh

InvoiceNinja5 package for YunoHost
https://www.invoiceninja.org/
GNU General Public License v3.0
12 stars 7 forks source link

React app redirects to /login which 404s #74

Closed ndarilek closed 1 year ago

ndarilek commented 1 year ago

Describe the bug

If I enable the React app, logging in doesn't work. Entering my credentials redirects to /login which 404s.

Context

Steps to reproduce

  1. Install IN5.
  2. Access the IN5 database and run UPDATE accounts SET set_react_as_default_ap = 1;.
  3. Visit the app in the browser. Note that the React UI now loads.
  4. Log in with any credentials.
  5. You will be redirected to /login, which 404s.

Expected behavior

I'd like to use the React UI and redirect correctly.

rndmh3ro commented 1 year ago

You're probably the same nolan here and in the forums, right? :)

I posted a reply there: https://forum.invoiceninja.com/t/how-can-i-run-the-react-ui/11915/20?u=rndmh3ro

For me the following happened:

When trying to login I briefly got a error message invalid secret, then the 404 error appeared.

What helped for me is removing the ÀPI_SECRETfrom the.env`-file. Then the login did work.

Now what I wonder: is the API_SECRET still necessary if one uses 2FA?

ndarilek commented 1 year ago

Oh wow, totally missed that reply. Sorry.

Anyhow, I commented out API_SECRET in the .env file and restarted nginx, no change. Do I need to restart any php-fcgi processes somehow as well?

ndarilek commented 1 year ago

Update: restarted both php8.0-fpm.service and php-8.1-fpm.service, no change. :(

rndmh3ro commented 1 year ago

Oh wow, totally missed that reply. Sorry.

I replied like zwo minutes ago, so no worries.

You have to clear the ninja artisan cache. In the docroot, run php8.1 artisan config:clear and then php8.1 artisan config:cache.

ndarilek commented 1 year ago

Oh, that worked! Thanks. Leaving this open because I'm also a bit unclear as to why the API secret is needed.

One quick question: do you happen to know how to remove the "undefined" from the app title?

rndmh3ro commented 1 year ago

I track the status here: #84