console.log(err) of DOMException prints the empty string
Reported by
jonathan...@gmail.com,
Jan 5
|
||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3661.0 Safari/537.36 Steps to reproduce the problem: 1. Disable cookies on your browser. 2. Write a web-page that tries to register a service worker with a catch that logs the error message. 3. The log will be empty. With no catch and error just appears that says: Uncaught (in promise) Glitch example that reproduces the error: https://glitch.com/edit/#!/walnut-emu?path=public/client.js:4:22 What is the expected behavior? Firefox logs: DOMException: "The operation is insecure." And then logs: Request to access cookie or storage on “https://walnut-emu.glitch.me/” was blocked because we are blocking all storage access requests. Failed to register/update a ServiceWorker for scope ‘https://walnut-emu.glitch.me/’: Storage access is restricted in this context due to user settings or private browsing mode. What went wrong? I think it would be useful for an error message to be returned. It'll make it easier to troubleshoot and notify the user. Did this work before? N/A Chrome version: 73.0.3661.0 Channel: canary OS Version: 10.0 Flash Version: Let me know if you need any other information or if you have trouble reproducing it. Not sure how important it is, but it felt important at 4:00 AM.
,
Jan 8
,
Jan 9
I made a new glitch since that walnut-emu one gave a 404 error in register(). https://crbug919292-register-error.glitch.me This is weird, on Canary it's: console.log(err); // prints '' console.log('error: ' + err); // prints 'error: NotSupportedError: Failed to register a ServiceWorker: The user denied permission to use Service Worker.' In Chrome 71 Stable it's: console.log(err); // prints 'DOMException' console.log('error: ' + err); // prints 'error: NotSupportedError: Failed to register a ServiceWorker: The user denied permission to use Service Worker.' I'll run a bisect.
,
Jan 9
Firefox prints: DOMException: "The operation is insecure. error: SecurityError: The operation is insecure. Note that Firefox's "Storage access is restricted" message comes directly from browser, not the console.log(). I bisecting and found: $ python tools/bisect-builds.py -a linux64 -g 599034 -b 620241 --use-local-cache -- --no-first-run --user-data-dir=/tmp/xssssss https://crbug919292-register-error.glitch.me You are probably looking for a change made after 604627 (known good), but no later than 604629 (first known bad). CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/d4551e74b3bc17fd56a1d83f40e547fe56984f84..d2f9d2b68e72bed57b4a46f34cfa5b5eca4d35fe I'm suspecting the V8 roll at https://chromium-review.googlesource.com/c/1312932 (which is in 72.0.3599.0), and within that roll this CL: inspector: move injected script source to native https://chromium.googlesource.com/v8/v8/+/7e079c660b686d916ed5cd88bfa4ecf597300193 I'm guessing this is WAI though confusing. dgozman@ can you confirm (as kozyatinskiy seems away)? In summary where |err| is a DOMException: } catch(err) { console.log(err); console.log('error: ' + err); } Previously the first line was 'DOMException' and the second line was 'error: NotSupportedError: Failed to register a ServiceWorker: The user denied permission...'. Now the first line is just '' but the second line is the same.
,
Jan 9
alph, please take a look. We might need a merge here.
,
Jan 16
(6 days ago)
Removing SW as this is a not restricted to service workers. You can repro in devtools with:
console.log(new DOMException('hi'));
console.log('' + new DOMException('hi'));
,
Jan 16
(6 days ago)
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/defbef78d23186c04fb0f6c741f5907d5a894766 commit defbef78d23186c04fb0f6c741f5907d5a894766 Author: Alexei Filippov <alph@chromium.org> Date: Wed Jan 16 23:59:04 2019 [inspector] An Error with no stack description should not be empty Make the description return the class name as it used to be. BUG= chromium:919292 Change-Id: Idbc07643f15014a39a08a545a5003be891d95bd3 Reviewed-on: https://chromium-review.googlesource.com/c/1416318 Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Commit-Queue: Alexei Filippov <alph@chromium.org> Cr-Commit-Position: refs/heads/master@{#58867} [modify] https://crrev.com/defbef78d23186c04fb0f6c741f5907d5a894766/src/inspector/value-mirror.cc [modify] https://crrev.com/defbef78d23186c04fb0f6c741f5907d5a894766/test/inspector/runtime/remote-object-expected.txt [modify] https://crrev.com/defbef78d23186c04fb0f6c741f5907d5a894766/test/inspector/runtime/remote-object.js
,
Jan 17
(6 days ago)
,
Jan 17
(6 days ago)
,
Today
(12 hours ago)
,
Today
(12 hours ago)
,
Today
(10 hours ago)
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/2d9ed0dec76cd2266f7828a8abf401be3991e9c6 commit 2d9ed0dec76cd2266f7828a8abf401be3991e9c6 Author: Alexei Filippov <alph@chromium.org> Date: Tue Jan 22 20:35:08 2019 Merged: [inspector] An Error with no stack description should not be empty Revision: defbef78d23186c04fb0f6c741f5907d5a894766 BUG= chromium:919292 LOG=N NOTRY=true NOPRESUBMIT=true NOTREECHECKS=true R=dgozman@chromium.org Change-Id: Idd2b1d02726f099446e2f83629c255c434113e62 Reviewed-on: https://chromium-review.googlesource.com/c/1427161 Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/branch-heads/7.2@{#43} Cr-Branched-From: 6acd03c9b8a8232aee95f25fbf6ae822aaedae75-refs/heads/7.2.502@{#1} Cr-Branched-From: b03041de094610ef24e0e4fb6bf4c700fa1553ed-refs/heads/master@{#57910} [modify] https://crrev.com/2d9ed0dec76cd2266f7828a8abf401be3991e9c6/src/inspector/value-mirror.cc [modify] https://crrev.com/2d9ed0dec76cd2266f7828a8abf401be3991e9c6/test/inspector/runtime/remote-object-expected.txt [modify] https://crrev.com/2d9ed0dec76cd2266f7828a8abf401be3991e9c6/test/inspector/runtime/remote-object.js
,
Today
(10 hours ago)
|
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by phanindra.mandapaka@chromium.org
, Jan 5