PWA install option missing

Unlike in the demo site, the option to install the PWA is not appearing on the page. Does this require any special configurations, either on Vikunja or the reverse-proxy?

My vikunja instance is used as a subdomain (ie. vikunja.domain.net), using the latest official docker images.

It should work without any special configuration. Are there any messages in the browser console?

I checked the browser console and indeed there seems to be an error, which i’ll paste below (after removing sensitive info):

There seems to be a CORS issue due to my use of Authentik.

Any idea how to resolve this ?

How are you using authentik? This looks like authentik is preventing the download of the service worker assets?

Vikunja is behind a domain level proxy from Authentik. It is weird that it is stopping the download, as the PWA from Tandoor works as expected and is behind authentik as well.

I use SWAG-docker as my reverse proxy and as far as I know, I haven’t set up any CORS (but i’ll check, maybe something escaped me)

Edit: I also use authentik as a OIDC provider for Vikunja, if that helps

Is Authentik using a cookie or a Bearer Token?

What surprises me more is how you seem to be able to see the home page and the rest of the Vikunja frontend but not the manifest file.

I’m pretty sure it is using a cookie.

Vikunja does work great.

Can you check with the network tab if the request to the webmanifest file is done with that cookie?

Uhh, I’m not quite sure what you mean with that, but maybe I found what you want:

Edit: If it is easier for you to debug (and you want to, of course) I can set you up with a temporary account on my system

That looks like it has the correct cookie. It seems like this is a problem with your Authentik or SWAG setup. Is there anything in Authentik’s logs? I don’t know anything about Authentik (or SWAG), you may want to ask on their forum or Discord about this.

Maybe the proxy does the authentication by a list of known file endings and .webmanifest isn’t one of them?

Authentik logs don’t seem to be showing anything out of the ordinary (though i’m not accustomed to parsing them). The weird thing is that it doesn’t have an issue with the Tandoor PWA.

Thanks for helping me diagnose this! I’ll try asking around the Authentik discord for the next steps.

1 Like

Were you eventually able to add Vikunja as PWA?
UPD: ah nevermind, seems like Vikunja’s manifest is bad when it comes to sub-directory deployment - had to un-check the “Use app’s Manifest” checkbox in Firefox PWA extension.

Timely because I just tried to do this today, and haven’t gotten it working yet. To clarify, you’ve got vikunja deployed at a subdirectory path of your domain? Mine’s on a subdomain and having a similar issue.

Sub-directory, right. The subdomain should not cause any problems at all. If you don’t see the Install option - try to directly install through a plugin called “Progressive Web Apps for Firefox”.

1 Like

Thanks for confirmation. I was using Safari on my phone, which has its limits. I’ll try on a computer later, when I have time to throw at this, and that should let me pull browser console logs etc.,

Safari on IOS is very easy:

  1. Go to Vikunja website;
  2. Click “Share”;
  3. Click "Add to home screen
1 Like

If you’re installing Vikunja in a subdir, the pwa won’t work. The pwa requires a service worker and there can be only one per domain, and it must be installed on the root directory. That’s a browser limitation, nothing we can change.

1 Like

@kolaente I’ve installed PWA in subdir on both Windows Firefox & IOS Safari, are there any issues I haven’t encountered yet?

Sorry, yes, I know the workflow, but it’s adding as a bookmark rather than the PWA, and opens in a new tab in the Safari app every time I launch from there. I am expecting I just need to look at it from a browser that actually has debugging tools, see if the behavior is consistent, and investigate from there.

That’s weird, both base domain & sub-directory deployments work fine for me.
If you run the dev version by any chance - some logic in regards to base path handling is different in dev mode, I would suggest PROD.
That’s even though dev deployment worked well for me in the sub-dir.