jhen0409 / react-chrome-extension-boilerplate

Boilerplate for Chrome Extension React.js project
MIT License
2.14k stars 388 forks source link

ERR_FILE_NOT_FOUND for inject #49

Closed refresco12 closed 7 years ago

refresco12 commented 7 years ago

I am trying to work on the inject script, but I keep getting the error:

chrome-extension://pheloakanjmafejdhjgcgfbcdlladodf/js/inject.bundle.js net::ERR_FILE_NOT_FOUND

I haven't changed the inject.js at all other than changing the id for the extension, so am unsure of what the issue may be. Any ideas?

Thanks

skyiea commented 7 years ago

The issue is that inject.bundle.js doesn't exist within .crx file (that's where your path is linking). Assuming that you are using dev-build, this file should be available via localhost:3000/js/.

jhen0409 commented 7 years ago

The js/inject.bundle.js should be inject by background, and it's disallow access for production, if you want allow access for other pages, you should add js/inject.bundle.js to web_accessible_resources.