posit-dev / posit-dev/shinylive

Failure to load service worker in Workbench (and possibly in Connect)

Open
#66 1 comment 1 reaction 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.