posit-dev / posit-dev/shinylive
Failure to load service worker in Workbench (and possibly in Connect)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 251
- Forks
- 25
- Avg merge
- 19m
- Merged PRs (30d)
- 2
Description
I used Workbench to generate a shinylive exported site, and viewed index.html using the Files pane. The request for shinylive-sw.js was redirected to the login page, because no cookies were attached to that request. I found this SO question asking about this behavior, with a clue that it only happens if the registration happens within <script type="module"> (???).
I'm wondering whether this might also be a problem with Connect--I know we've published these to Connect somehow but have we tried it with content permissions set to private?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Workbench flow that opens index.html from the Files pane and requests shinylive-sw.js, then compare the behavior with a private Connect deployment. Determine why the service-worker request is redirected to login without cookies and verify that service-worker loading works for authenticated content in both contexts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100