A copy the browser refuses shows "Unknown error" and is logged as critical

Aperta
#15,049 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp, wasm
Ambito
frontend

Direzione di ricerca

Start with ClientExceptionHandlerBase, which turns a clipboard refusal from Butil's Clipboard.WriteText into the generic unknown-error dialog and a Critical log entry. The copy call sites are the two-factor key and recovery codes on Settings, the diagnostic modal and report, Operations, and the landing page share button. Done when a refused copy shows a message asking the user to select the text manually and is not logged as critical, and the behaviour is unchanged in Development.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The template's copy buttons call Butil's Clipboard.WriteText and let a failure reach WrapHandled: the two-factor key and the recovery codes on the Settings page, the diagnostic modal and report, the Operations page, and the landing page's share button and copied texts. A browser may refuse a clipboard write, for example in an embedded web view, on a page that isn't a secure context, or in a frame without the clipboard-write permission. ClientExceptionHandlerBase then treats the refusal as an unexpected error: outside Development the user gets a dialog saying an unknown error happened, and the log gets a Critical entry for what is the browser's choice rather than a defect.

A refused copy should tell the user the text couldn't be copied, so they can select it themselves, and shouldn't be logged as critical.

Lingua principale
C#
Stelle
1.4k
Fork
264
Merge medio
7h 38m
PR unite (30g)
544

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bitfoundation/bitplatform

Tutte le issue di bitfoundation/bitplatform

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.