<h3 dir="auto">Bug report</h3>
<p dir="auto">When using React version 16.6.0, my app suddenly crashed with the error "Cannot read property replace of null". The exception happens when React tries to remove the string "topsecret-" from fiber.name. I tried to revert back to 16.5.2 to confirm the version where it happens, and it does indeed not happen in 16.5.2.</p>
<p dir="auto">I'm not sure about steps to reproduce it, I've been using React 16.6.0 for a few days in this project without issues until now. Here's a screenshot of the exception and the file it happens in, along with the stack. Seems like a straightforward fix, so I hope a reproduction example isn't needed in this case.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/4bdc42e24bd0b50ec0193a39cc20a6901ba00fa6ca5c32cf50192f0437fd2db8/68747470733a2f2f692e696d6775722e636f6d2f573364376c6d4d2e706e67"><img src="https://camo.githubusercontent.com/4bdc42e24bd0b50ec0193a39cc20a6901ba00fa6ca5c32cf50192f0437fd2db8/68747470733a2f2f692e696d6775722e636f6d2f573364376c6d4d2e706e67" alt="Screenshot" data-canonical-src="https://i.imgur.com/W3d7lmM.png" style="max-width: 100%;"></a></p>
<p dir="auto">Ran <code class="notranslate">create-react-app react-test</code> then <code class="notranslate">npm start</code> on the fresh project with no changes and I get the following error when using react@16.6.0 and react-dom@16.6.0:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Uncaught TypeError: Cannot read property 'displayName' of null
    at getDisplayName (backend.js:9159)
    at getDataFiber (backend.js:9888)
    at enqueueMount (backend.js:10158)
    at mountFiber (backend.js:10246)
    at backend.js:10306
    at Set.forEach (&lt;anonymous&gt;)
    at Object.walkTree (backend.js:10304)
    at backend.js:8534
    at &lt;anonymous&gt;:52:32
    at Array.map (&lt;anonymous&gt;)
    at Object.emit (&lt;anonymous&gt;:51:66)
    at setupBackend (backend.js:8621)
    at module.exports (backend.js:8567)
    at Agent.&lt;anonymous&gt; (backend.js:116)
    at Agent.g (backend.js:981)
    at Agent.EventEmitter.emit (backend.js:894)
    at backend.js:302
    at backend.js:7619
    at Array.forEach (&lt;anonymous&gt;)
    at backend.js:7618
    at Array.forEach (&lt;anonymous&gt;)
    at Bridge._handleMessage (backend.js:7611)
    at listener (backend.js:92)"><pre class="notranslate"><code class="notranslate">Uncaught TypeError: Cannot read property 'displayName' of null
    at getDisplayName (backend.js:9159)
    at getDataFiber (backend.js:9888)
    at enqueueMount (backend.js:10158)
    at mountFiber (backend.js:10246)
    at backend.js:10306
    at Set.forEach (&lt;anonymous&gt;)
    at Object.walkTree (backend.js:10304)
    at backend.js:8534
    at &lt;anonymous&gt;:52:32
    at Array.map (&lt;anonymous&gt;)
    at Object.emit (&lt;anonymous&gt;:51:66)
    at setupBackend (backend.js:8621)
    at module.exports (backend.js:8567)
    at Agent.&lt;anonymous&gt; (backend.js:116)
    at Agent.g (backend.js:981)
    at Agent.EventEmitter.emit (backend.js:894)
    at backend.js:302
    at backend.js:7619
    at Array.forEach (&lt;anonymous&gt;)
    at backend.js:7618
    at Array.forEach (&lt;anonymous&gt;)
    at Bridge._handleMessage (backend.js:7611)
    at listener (backend.js:92)
</code></pre></div>
<p dir="auto">If I rollback the version to react@16.5.2 and react-dom@16.5.2 then I get no errors. I believe I've tracked down the issue to </p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/facebook/react-devtools/blob/faa4b630a8c055d5ab4ff51536f1e92604d5c09c/backend/getDisplayName.js#L27">react-devtools/backend/getDisplayName.js</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 27
      in
      <a data-pjax="true" class="commit-tease-sha" href="/facebook/react-devtools/commit/faa4b630a8c055d5ab4ff51536f1e92604d5c09c">faa4b63</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L27" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="27"></td>
          <td id="LC27" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-k">typeof</span> <span class="pl-s1">type</span><span class="pl-kos">.</span><span class="pl-c1">displayName</span> <span class="pl-c1">===</span> <span class="pl-s">'string'</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
 but not sure where to go from here.<p></p>
<p dir="auto">I've also tried this on an existing project with the same results. Any help would be appreciated. Thanks in advance!</p>