YunoHost-Apps / invoiceninja5_ynh

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

CORS request blocked causes blank page #184

Open lightnin opened 10 months ago

lightnin commented 10 months ago

Uninstalled previous ninja install because I lost the secret. Reinstalled Ninja5: Set to allow access only to admins. Login to main yunohost page (with tiles). Click ninja5 tile. Blank page. (see console screenshot below) Expected: Show InvoiceNinja5 login

Tried:

Note: The app is hosted at time.[base url].

Screenshot 2023-11-13 at 13 55 51

Thanks for making great free software available to everyone! :)

rndmh3ro commented 10 months ago

I'm not sure that's specifically a problem with invoiceninja_ynh.

I just installed a new instance at invoiceninjatest.example.com. Yunohost is hosted on example.com

When accessing IN there's no error in the console and these are the response-headers from IN:

access-control-allow-headers
    X-React,X-API-PASSWORD-BASE64,X-API-COMPANY-KEY,X-API-SECRET,X-API-TOKEN,X-API-PASSWORD,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Disposition,Range,X-CSRF-TOKEN,X-XSRF-TOKEN,X-LIVEWIRE
access-control-allow-methods
    GET, POST, PUT, DELETE, OPTIONS
access-control-allow-origin
    *
access-control-expose-headers
    X-APP-VERSION,X-MINIMUM-CLIENT-VERSION,Content-Disposition

These seetings are defined here: https://github.com/invoiceninja/invoiceninja/blob/v5-stable/config/cors.php

So - I don't know what the problem is.

rndmh3ro commented 10 months ago

Can you check in another browser tab if you're still logged in into yunohost when this happens?

rndmh3ro commented 10 months ago

Okay, now I got the error, too. Still no idea why, though.

lightnin commented 10 months ago

Can you check in another browser tab if you're still logged in into yunohost when this happens?

As I recall I was still logged in to yunohost, as confirmed by exiting and relaunching my browser.

Okay, now I got the error, too. Still no idea why, though.

Glad its reproduced. It's a weird error - CORS seems tricky. I'll monitor in case additional testing would be helpful at some point.

romain563 commented 10 months ago

J'ai exactement le même problème sur une toute nouvelle installation. Exactly the same issue for me on a fresh install

romain563 commented 10 months ago

You can access it in firefox when you disable the protection : image

lightnin commented 9 months ago

Just upgraded to 5.7.62~ynh1, and everything seems to be working now for me. I'd like to close this - but I'll leave it open until others who had the issue confirm.

lightnin commented 8 months ago

Ended up deleting that installation, and later on installing invoiceninja again. Now the problem is back again, in both LibreWolf and Chrome. (5.8.10~ynh1). I am able to access it once I disable enhanced tracking protection, as suggested https://github.com/YunoHost-Apps/invoiceninja5_ynh/issues/184#issuecomment-1821363721

cvlc12 commented 6 months ago

I am able to access it once I disable enhanced tracking protection, as suggested #184 (comment)

Same here.

Maybe point to this solution in post-install notes until a real fix is found ?

rndmh3ro commented 6 months ago

Maybe point to this solution in post-install notes until a real fix is found ?

Sure! Would you like to create a pull request to do this?