google-chromegoogle-chrome-devtoolschromium

What does "Content unavailable. Resource was not cached" mean in the Chrome DevTools?


I was trying to fix an error on my website in Google Chrome. To view the source of the bug, I clicked on the reference in the Chrome DevTools console. However, the "Source" tab in the developer tools showed the message "Content unavailable. Resource not cached".

Step by step:

I clicked on the reference to the error location in the DevTools console Error message in Chrome DevTools ... then I saw this in the Source tab: Chrome DevTools, Source tab, showing "Content unavailable. Resource was not cached"

Questions

  1. What does this error mean? When does it occur?
  2. How can I still see the source to see the location of the error?

Solution

  • When does this error occur?

    You get this error when you

    1. Open a website with the DevTools closed
    2. The website redirects you to another place (!)
    3. The website you were redirected to throws a JS error from JS code that is inlined in the HTML of the page
    4. Then, you open the DevTools and view the source

    You can reproduce it using this issue report in the Chromium bug tracker.

    Video: https://issues.chromium.org/action/issues/365405774/attachments/59254646?download=true

    What does it mean?

    How to still see the source?

    There seems to be no satisfying way. Workarounds include:


    I really hope that there will be a more satisfying solution than the slightly better error message introduced in this commit to Chromium. The issue is really rare, but when it happens it is quite annoying that you cannot see the source of your JS errors.