YunoHost-Apps / 2FAuth_ynh

2FAuth package for YunoHost
https://docs.2fauth.app/
GNU General Public License v3.0
3 stars 5 forks source link

After upgrading to version 5.0.4~ynh1 from version 5.0.3~ynh1 the 2FAuth page is blank with a bunch of errors in dev console #60

Closed CodeShakingSheep closed 7 months ago

CodeShakingSheep commented 8 months ago

Describe the bug

After upgrading to version 5.0.4~ynh1 from version 5.0.3~ynh1 the 2FAuth page is blank (see screenshot). Also, there are a bunch of errors in the dev console.

image

Context

Steps to reproduce

I just hit the updgrade button in webadmin.

Expected behavior

2FAuth version 5.0.4~ynh1 should display the page correctly.

Logs

Access to manifest at 'https://<YNH_DOMAIN>.com/yunohost/sso/?r=aHR0cHM6Ly9hdXRoLnVuc2Vlbi1ob3Jpem9ucy5jb20vbWFuaWZlc3QuanNvbg==' (redirected from 'https://<2FAUTH_DOMAIN>.com/manifest.json') from origin 'https://<2FAUTH_DOMAIN>.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
<YNH_DOMAIN>.com/yunohost/sso/ 

       Failed to load resource: net::ERR_FAILED
2app-06176200.js:5 TypeError: Cannot read properties of null (reading 'nextSibling')
    at nextSibling (app-06176200.js:1:53657)
    at Ct (app-06176200.js:1:45292)
    at Bt (app-06176200.js:1:45052)
    at Re (app-06176200.js:1:44890)
    at Gr (app-06176200.js:1:45406)
    at Re (app-06176200.js:1:44680)
    at v (app-06176200.js:1:37336)
    at j (app-06176200.js:1:45811)
    at mount (app-06176200.js:1:32548)
    at Ym.t.mount (app-06176200.js:1:64591)
ue @ app-06176200.js:5
<2FAUTH_DOMAIN>.com/:1 Access to internal resource at 'https://<YNH_DOMAIN>.com/yunohost/sso/' (redirected from 'https://<2FAUTH_DOMAIN>.com/manifest.json') from origin 'https://<2FAUTH_DOMAIN>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
mat-mo commented 8 months ago

Same here.

CodeShakingSheep commented 8 months ago

I just investigated it a bit further and I think the root problem is that the API returns a 401 response {"message":"Unauthenticated."}

image

DeMiro5001 commented 7 months ago

I am having the same problem but with a new install while setting the app only available for admins (since it's a one user app and I'm the only admin).

Thovi98 commented 7 months ago

Could someone please try to upgrade by sudo yunohost app upgrade 2fauth -u https://github.com/Thovi98/2FAuth_ynh/tree/testing --debug and see if the issue persists?

DeMiro5001 commented 7 months ago

Could someone please try to upgrade by sudo yunohost app upgrade 2fauth -u https://github.com/Thovi98/2FAuth_ynh/tree/testing --debug and see if the issue persists?

It's working 👍

CodeShakingSheep commented 7 months ago

Thanks a lot for the PR @Thovi98. Apparently package version 5.1.0 has been pushed to master branch, but your fix hasn't been pushed to master yet. So, as I updated this app normally on my server I was still running into this issue. I will wait for your PR to be merged and will report back then.

CodeShakingSheep commented 7 months ago

With the merged PR the upgrade to version 5.1.1 worked. So, I'm closing this.