Skip to content

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

Not planned
@SimonSiefke

Description

@SimonSiefke

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

Activity

bvaughn

bvaughn commented on Nov 2, 2020

@bvaughn
Contributor

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!

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[/+] on Nov 2, 2020
sktguha

sktguha commented on Nov 12, 2020

@sktguha
Contributor

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

arshbuilds commented on Mar 24, 2024

@arshbuilds

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

github-actions

github-actions commented on Jun 22, 2024

@github-actions

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 commented on Jun 29, 2024

@github-actions

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bvaughn@sktguha@SimonSiefke@arshbuilds

        Issue actions

          React Developer Tools triggers console error in Firefox for protected URLs · Issue #20144 · facebook/react