Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Bug: React Dev Tools injects its own js code (installHook.js) and then tries to download the source map if its own code | GoodFirstPicks

Bug: React Dev Tools injects its own js code (installHook.js) and then tries to download the source map if its own code

facebook/react 14 comments 1mo ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeReactJavaScriptTypeScript

Why this is a good first issue

The issue involves browser-specific behavior and source map handling.

AI Summary

The issue involves React DevTools injecting its own code and attempting to download its source map, which triggers warnings in Firefox. The problem appears to be related to Firefox's handling of relative source map URLs. The solution may require changes to how source maps are handled or injected, but the scope and impact on other browsers are unclear.

Issue Description

React Dev Tools injects its own js code (installHook.js) and then tries to download the source map of its own code. Since my app does not know about installHook.js it can not generate the source map. So far, no harm done. But then, I get that huge warning in my console. And I google... And I chatGPT, dive into the deep realms of generating source maps, ...and after wasting an hour... find out by digging into the source code of the dev tools, that someone was too lazy to filter out your own files. The internet is full of this problem. It is time to fix it.

React version: 19.0.0

Steps To Reproduce

  1. Create a react app
  2. install react developer tools
  3. execute npm run dev
  4. open the console of the browser
  5. be annoyed by a warning, that the sourceMap of installHook.js cannot be found or is invalid

Link to code example: I tried using CodeSandbox, CodeSandbox itself is filling my console with warnings... Just execute a good old google query: https://www.google.com/search?q=installhook.js.map

Workaround

Serve your own installHook.js.map file. I put one in the public directory of my react app. Contents:

{
  "version": 3,
  "file": "installHook.js",
  "sources": ["installHook.js"],
  "sourcesContent": [""],
  "mappings": ""
}

The current behavior

Image

The expected behavior

I don't see a warning.

GitHub Labels

Status: Unconfirmed

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!

Risk Flags

  • Firefox-specific behavior
  • potential browser compatibility issues
  • source map handling
Loading labels...

Details

Points10 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno
Assigneehoxyq