net::ERR_FAILED

913 views
Skip to first unread message

Ahmad Sameer

unread,
Mar 20, 2022, 6:06:50 PM3/20/22
to chromium-...@chromium.org
Hi 
How can i fix this error net::ERR_FAILED
It happend when i append script child in background page and the src of script :
src= "chrome.runtime.getURL('path of file')"

Stefan vd

unread,
Mar 20, 2022, 6:30:27 PM3/20/22
to Chromium Extensions, lolah...@gmail.com
Hi there,

Can you provide more information, for example, are you creating a Chrome extension manifest v2? or Chrome extension manifest v3?
Currently, the Chrome web store only supports now manifest v3 when you publish your new Chrome extension, and that requires a service worker as the background.

If you want to use manifest v2, which has an HTML background page (=with background.js file). Please check in your background.js script that the JavaScript code is this:
var s = document.createElement("script");
s.src = chrome.extension.getURL("js/injected.js");
(document.head || document.documentElement).appendChild(s);

Thanks,
Stefan vd

Ahmad Sameer

unread,
Mar 21, 2022, 10:35:34 AM3/21/22
to Stefan vd, Chromium Extensions
Thx bro 
It fixed 
Just i put in content scrip in manifest v3 the js file of jQuery and it 

Stefan vd

unread,
Mar 21, 2022, 11:23:12 AM3/21/22
to Chromium Extensions, lolah...@gmail.com, Chromium Extensions, Stefan vd
Hi there,

I am glad you solved your content script issue.

Thanks,
Stefan vd

Reply all
Reply to author
Forward
0 new messages