Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Developer Tools triggers console error in Firefox for protected URLs #20144

Closed
SimonSiefke opened this issue Nov 2, 2020 · 5 comments
Closed
Labels
Component: Developer Tools Resolution: Stale Automatically closed due to inactivity

Comments

@SimonSiefke
Copy link

Screenshot from 2020-11-02 08-34-31

Steps To Reproduce

  1. Install React Devtools extension for Firefox
  2. Go to "about:neterror?e=connectionFailure"

The current behavior

Firefox shows this error in the console: "The extension "React Developer Tools" is not allowed to access about:neterror?e=connectionFailure"

The expected behavior

Firefox shows no error in the console

@SimonSiefke SimonSiefke added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Nov 2, 2020
@bvaughn
Copy link
Contributor

bvaughn commented Nov 2, 2020

Related to PR #20023

I'm not aware of a reliable way to detect special/protected URLs like "about:neterror" in Firefox and prevent React DevTools from treating it like any other page. If you know of a way, please shoot us a PR!

@bvaughn bvaughn added Component: Developer Tools and removed Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Nov 2, 2020
@bvaughn bvaughn changed the title Bug: The extension "React Developer Tools" is not allowed to access about:neterror?e=connectionFailure React Developer Tools triggers console error in Firefox for protected URLs Nov 2, 2020
@sktguha
Copy link
Contributor

sktguha commented Nov 12, 2020

Hi, author of the above PR here.
To add to Brian's comment, so I think in the code here:

if (tab.active && changeInfo.status === 'loading') {

When we try to access tab.active in firefox, if it is a protected page, firefox will throw an error
If that is the case, I don't think we can really do anything at all. If we try to access the tab.url or some other property on the tab object to see if its a protected page, before that check only firefox will throw the same error

Maybe wrapping the code in a try catch could work ? But I doubt it
@SimonSiefke maybe you could possibly step through in a debugger in firefox and check that the above thing happens and/or verify the try catch theory ?

In chrome and edge however this issue doesn't happen. Infact it is possible to read the tab.url of a protected page like chrome://extensions etc from any extension.

@arshbuilds
Copy link

Apparently, I only get this error when I go to localhost:3000 without turning on the dev server yarn dev

Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Automatically closed due to inactivity label Jun 22, 2024
Copy link

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Developer Tools Resolution: Stale Automatically closed due to inactivity
Projects
None yet
Development

No branches or pull requests

4 participants