-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Crash on new tab using fetch #8233
Comments
Reproduced on:
|
Reproduced on release version - crash report uploaded with ID |
I did some digging on this, but not sure if I’ll make any more progress. I’ll drop what I found here. I saw that error code "185" is returned in the command line when running a local build of Brave. In the chromium code here, 185 is labeled as: WEBUI_BAD_SCHEME_ACCESS. That label is found in some unit testing code here with a useful comment: "Verifies that WebUI pages with WebUI bindings can't make network requests.” WebUI pages with WebUI bindings are basically any page with address chrome:// (or brave://). So this crash will happen on any of those types of pages, like brave://settings. Not just on new tab. I confirmed if you run fetch(‘https://www.brave.com') from Brave settings you’ll also get a crash. |
This is chrome's security policy. |
Good find @bigfoxtail 😄 I didn't consider that was why it was happening You are correct - WebUI does not have access to fetch external resources and that is 100% expected. The usual flow when external content is needed would be that JavaScript on the page will communicate with native handlers registered for the Web UI page. That native C++ code then has access to fetch whatever it needs Given that this is a limitation of Web UI and we won't want to change it (due to security considerations), I'm going to close this issue as |
Description
The new tab (brave://newtab) crashes when using fetch in the browser console.
Steps to Reproduce
fetch('https://brave.com')
Actual result:
The browser window crashes.
Expected result:
The window should continue to function normally.
Reproduces how often:
Every time.
Brave version (brave://version info)
Version/Channel Information:
Yes.
Haven't tried.
Haven't tried.
Haven't tried.
Other Additional Information:
No.
No.
No.
Miscellaneous Information:
The text was updated successfully, but these errors were encountered: