Clarification: ServiceWorker support/contract for ICoreWebView2CustomSchemeRegistration custom schemes
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia dalla documentazione di ICoreWebView2CustomSchemeRegistration e dal comportamento di ServiceWorker descritto nell’issue, quindi riproduci l’InvalidStateError con le versioni indicate di Wails, SDK e Runtime. Il lavoro è completato quando un maintainer documenta se gli schemi personalizzati supportano ServiceWorker, se il comportamento è supportato e stabile e se esiste un controllo delle funzionalità supportato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi Microsoft WebView2 team,
I’m looking for clarification on ServiceWorker behavior for WebView2 custom schemes registered through ICoreWebView2CustomSchemeRegistration.
We have a desktop application using a private custom scheme:
computemesh-ui://app
with a pinned stack approximately as follows:
- Wails 2.15.0
- go-webview2 1.0.22
- WebView2 SDK/interface surface 1.0.3537.50
- WebView2 Runtime 152.0.4191.66
Our custom scheme uses the documented custom-scheme registration capabilities, including authority handling and secure-context treatment where applicable.
What we are observing is that ServiceWorker registration from the custom-scheme document fails with:
InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state.
We understand that Chromium has a separate ServiceWorker-capable scheme registry from secure-context, CORS, and CSP handling, and that schemes normally need explicit ServiceWorker enablement at the embedder level.
What we have not been able to find is an explicit Microsoft contract or documentation statement clarifying whether a WebView2 custom scheme registered through ICoreWebView2CustomSchemeRegistration is ever registered as ServiceWorker-capable internally.
Could you please clarify the following:
-
Does
ICoreWebView2CustomSchemeRegistrationcause the custom scheme to be registered with Chromium as a ServiceWorker-capable scheme? -
If not, is ServiceWorker registration expected to remain unsupported for documents loaded from WebView2 custom schemes, even when the scheme is treated as secure?
-
Is the observed error:
InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state.an expected result for ServiceWorker registration from such a custom-scheme document?
-
Does a document using a non-ServiceWorker-capable custom scheme receive an underlying ServiceWorker client/provider context at all, even if no JavaScript-visible controller or registration capability is available?
-
Is there any supported WebView2 API that allows us to determine whether the current custom-scheme document has a ServiceWorker client/provider context, independent of whether a controller is attached?
-
Is this behavior considered a supported contract that applications may rely on, or is it currently only an implementation detail that could change in future WebView2 Runtime releases?
Our application does not require ServiceWorkers. In fact, we intentionally want the private renderer to have no ServiceWorker authority, so we are trying to determine whether the current behavior is something we can rely on as part of our security model, or whether we should treat it as version-specific behavior and requalify it on Runtime upgrades.
We are not asking for a workaround to enable ServiceWorkers. We are specifically trying to understand the supported behavior and security contract for custom-scheme documents.
If useful, I can also provide a minimal reproduction and the exact custom-scheme registration configuration.
Thanks,
Cory
- Lingua principale
- PowerShell
- Stelle
- 526
- Fork
- 70
- Merge medio
- 15g 5h
- PR unite (30g)
- 1
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MicrosoftEdge/WebView2Feedback
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
MicrosoftEdge/WebView2Feedback#5749 · 1 commento ·
-
bug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 8/100
MicrosoftEdge/WebView2Feedback#5792 · 2 commenti ·
-
[Problem/Bug]: EX1528992 — New Outlook still cannot open attachments directly in desktop OfficeForse già presa @ambikakunnath l’ha presa oggi. Apertabug regression
MicrosoftEdge/WebView2Feedback#5791 · 1 assegnatario ·
-
[Problem/Bug]: SearchHost WebView2 child processes hang forever in crashpad SendToCrashHandlerServer (WaitNamedPipe NMPWAIT_WAIT_FOREVER) on Windows Server 2025 multi-sessionForse già presa @ambikakunnath l’ha presa oggi. Apertabug regression
MicrosoftEdge/WebView2Feedback#5790 · 2 commenti · 1 assegnatario ·
-
[Problem/Bug]: CSS animations/transitions freeze intermittently on runtime 156 when --force-high-performance-gpu is passedForse già presa @ambikakunnath l’ha presa 5 giorni fa. Apertaregression
MicrosoftEdge/WebView2Feedback#5788 · 4 commenti · 1 assegnatario ·
Tutte le issue di MicrosoftEdge/WebView2Feedback
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Backend issue lists report in-patch warnings and out-of-patch errors as not publishableForse già presa @RaphaelFakhri l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mozilla/code-review#3794 ·
I maintainer di solito rispondono entro 1 giorno
-
Upgrade listener stays on a custom server after close when `preClose` is setForse già presa @RaphaelFakhri l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
fastify/fastify-websocket#388 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DietrichGebert/ponytail#1343 ·
I maintainer di solito rispondono entro 1 giorno