Your file couldn’t be accessed. It may have been moved, edited or deleted. ERR_FILE_NOT_FOUND

4,658 views
Skip to first unread message

Uday prasad

unread,
Sep 16, 2022, 2:49:16 AM9/16/22
to Chromium Extensions
I am trying to create chrome extension v3 with existing reactjs and typescript project.

manifest.json :

{
"name": "Sample project",
"description": "Sample Chrome extension",
"version": "1.0",
"manifest_version": 3,
"action": {
"default_popup": "popup/index.html",
"default_title": "Open the popup"
}
}

'build/index.html':

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<link rel="icon" href="/logo.svg"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="theme-color" content="#000000"/>
<meta name="description" content="Sample"/>
<link rel="apple-touch-icon" href="/logo.svg"/>
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet"/>
<link rel="manifest" href="/manifest.json"/>
<title>%REACT_APP_TITLE%</title>
<link href="/static/css/main.cbea6d6a.chunk.css" rel="stylesheet">
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script src="/static/js/runtime-main.4c57f821.js"></script>
<script src="/static/js/20.8cf1cbff.chunk.js"></script>
<script src="/static/js/main.8cf78120.chunk.js"></script>
</body>
</html>

'build' folder structure and files:
  • build
    • static
      • css
        • main.cbea6d6a.chunk.css
      • js
        • 20.8cf1cbff.chunk.js
        • main.8cf78120.chunk.js
        • runtime-main.4c57f821.js
        • some other chunk files
      • media
    • asset-manifest.json
    • logo.svg
    • index.html
    • manifest.json
    • robots.txt

When I click the extension in developer mode the following error is generated:

  • Your file couldn’t be accessed. It may have been moved, edited or deleted. ERR_FILE_NOT_FOUND

What might be the cause and necessary changes need to be done?

If possible, ready to connect through google meet.

wOxxOm

unread,
Sep 16, 2022, 10:54:34 AM9/16/22
to Chromium Extensions, Uday prasad
Your manifest.json specifies "popup/index.html" but it's incorrect according to your folder structure. It should be simply "index.html".

Uday prasad

unread,
Sep 16, 2022, 11:49:20 AM9/16/22
to Chromium Extensions, wOxxOm
Typo, it's 'public' not 'popup'.

"action": {
"default_popup": "public/index.html",
"default_title": "Open the popup"
}

If I provide only 'index.html' it generates the mentioned error. 
  • Uncaught NotFoundError: URL not found: /index.html

wOxxOm

unread,
Sep 16, 2022, 1:47:42 PM9/16/22
to Chromium Extensions, Uday prasad, wOxxOm
The new error message is different, not the one mentioned originally, and it must be caused by your bundler e.g. webpack, which means its configuration is incorrect. Usually, public assets are simply copied so "public/" in the source means "/" (root) in the final output, and "public/index.html" should be "index.html" in the final manifest.json. If your manifest.json is simply copied from source then it should have "index.html". If it's auto-generated somehow, then you need to fix the relevant code.
Reply all
Reply to author
Forward
0 new messages