Open Bug 1375297 Opened 8 years ago Updated 3 years ago

window.crypto errors are harder to debug than in Google Chrome

Categories

(DevTools :: Console, defect, P3)

defect

Tracking

(firefox57 wontfix)

Tracking Status
firefox57 --- wontfix

People

(Reporter: jlast, Unassigned)

Details

I'm refiling this initial bug: https://github.com/devtools-html/debugger.html/issues/3075 Example with this code: > return window.crypto.subtle.decrypt( > { > name: "AES-GCM", > iv: 3, //The initialization vector you used to encrypt > tagLength: 128 > }, > APP_DERIVE_KEY_DATA, // from generateKey or importKey above > ENCRYPTED_ARRAY_BUFFER //ArrayBuffer of the data > ) The `iv` value should be a `Uint8Array`. ## Firefox output > DOMException [SyntaxError: "An invalid or illegal string was specified" code: 12 nsresult: 0x8053000c https://cloud.githubusercontent.com/assets/128755/26747289/c028c680-47c2-11e7-84af-05eabd041467.png ## Google Chrome output https://cloud.githubusercontent.com/assets/128755/26747294/cae83376-47c2-11e7-9439-5578260f3e2f.png ## Expected Firefox should say that `iv` should be a BufferSource. There are other cases where Firefox just says `DOMException` with no explanation and the only way to find the problem is to fire up Chrome and get a better error report.
Priority: -- → P3
Product: Firefox → DevTools

Another irritating case of inferior error messaging:

FireFox:

ERROR Error: Uncaught (in promise): SyntaxError: An invalid or illegal string was specified
Angular 20
AppComponent app.component.ts:83
RxJS 11
Angular 15
core.js:4442
Angular 4
RxJS 5
Angular 22
AppComponent app.component.ts:83
RxJS 11
Angular 15

Chrome:

core.js:4442 ERROR Error: Uncaught (in promise): NotSupportedError: Unsupported import key format for algorithm
at resolvePromise (zone-evergreen.js:798)
at resolvePromise (zone-evergreen.js:750)
at zone-evergreen.js:860
at ZoneDelegate.invokeTask (zone-evergreen.js:399)
at Object.onInvokeTask (core.js:27483)
at ZoneDelegate.invokeTask (zone-evergreen.js:398)
at Zone.runTask (zone-evergreen.js:167)
at drainMicroTaskQueue (zone-evergreen.js:569)

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.