I am trying to make a new extension using manifest V3, this is my first time and I'm getting an error when defining the background.js
here is the error:
image
I created the background js using Vue 3, and the manifest wasn't able to read it and apply it, that's why it failed
hello I am trying to use the ffmpegwasm/ffmpeg.wasm library inside chrome extension
the library is loaded inside react component that is located inside an iframe
the problem is when I try to load I got an error that I cannot download the core files
I tried to use the example library for chrome extension but also got an error "Uncaught (in promise) ReferenceError: SharedArrayBuffer is not defined error. "
the files are web_accessible_resources inside the manifest
I am using manifest version 3
Describe the bug
migrating a chrome extension from manifest v2 to v3, content script static not working, dynamic also not working,
"chrome.scripting.registerContentScripts( " telling is not a function
To Reproduce
scenario1
Steps to reproduce the behavior:
1. create an extension with V3
2. mention in manifest one service worker and content script
3. then upload or refresh the extension
4. service worker working but not the content script ( static )
scenario2
Steps to reproduce the behavior:
1. create an extension with V3
2. mention in manifest one service worker
3. in service worker, the below event either execute or register the script is not working
chrome.tabs.onUpdated.addListener(async function (tabId, changeInfo, tab) {
chrome.scripting.executeScript({ target: {tabId: tabId},
or
chrome.scripting.registerContentScripts(options,function(et){});
4. then upload or refresh the extension
5. service worker working but not the content script ( dynamic )
Expected behavior
in v2 I am able to either static or programmatically injecting the content script in a page where as in v3 is not, so expecting the steps for same in V3 to work
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: Windows 10
Browser: Chrome
Version 89.0.4389.90 (Official Build) (64-bit)
Additional context
please help me to resolve or any alternative work around to proceed further for migration
I want to develop an ethereum wallet chrome extension.
While developing a simple prototype, I noticed that the node.js module cannot be run directly from the chrome extension.
But I must use web3.js or ethers.js.
Is there any way to develop Chrome extensions using web3.js or ethers.js?
Of course, when we check the packages of the MetaMask we will see both web3 & ethjs libraries which is also an extension:
// ...
"web3": "^..."
// ...
"ethjs": "^...",
"ethjs-contract": "^...",
"ethjs-ens": "^...",
"ethjs-query": "^...",
// ...
What we might do either we can compile it via a tool like browserify or import the minified browser version like this(I tested it is working with metamask-extension-provider package*):
import Web3 from 'web3/dist/web3.min.js';
// or
const Web3 = require('web3/dist/web3.min.js');
*A specific version of provider for extensions, check its docs.
Googles docs indicate they support the latest LTS of Nodejs, and that they support the latest version of the specified version.
https://cloud.google.com/appengine/docs/standard/nodejs/runtime
it uses the latest stable release of the version you choose.
Currently, NodeJS is on 14 for LTS, and 12.18.4 for version 12. However, App Engine Standard appears to be stuck on 12.16.3 as it's latest version.
Is there any indication of their release cadence? When can we expect an upgrade?
Motivation: I'm trying to setup a typescript monorepo with published packages & App engine. This relies package.json specifying "exports" field, but 12.16 seems not to support it, even behind the --experimental-exports tag.
I have deployed a quickstart with node12 in AppEngine Standard and had the sames results than yours, the current latest TLS for Node seems to be: v12.16.3.
I printed the version with this code:
app.get('/', (req, res) => {
res.status(200).send('Hello, world!>>'+process.version).end();
});
The result was:
This is happening also in the Flexible environment, I faced a similar issue in which is supposed to pick the latest major version, instead always pick a lower, but it is consistent on picking always the same. This seems to be a expected behavior, but it is well worth to know the reason.
I tried setting the specific version 12.18.4 but with no success.
**ERROR**: (gcloud.app.deploy) INVALID_ARGUMENT: The 'package.json' configuration file must specify a supported nodejs12 version that is compatible with the runtime specified in the deployment. Please pin your application to a compatible major version of the runtime via the 'engines.node' property. Supported 'engines.node' values for the runtime 'nodejs12' are: [12.x.x, 12.X.X, 12.x, 12.X, 12.*.*, 12.*, ~12, ~12.0, ~12.0.0, 12, ^12, ^12.0, ^12.0.0, >=12, >=12.0, >=12.0.0, >12.0, >12.0.0, >=1, >=1.0, >=1.0.0, >1, >1.0, >1.0.0, >=2, >=2.0, >=2.0.0, >2, >2.0, >2.0.0, >=3, >=3.0, >=3.0.0, >3, >3.0, >3.0.0, >=4, >=4.0, >=4.0.0, >4, >4.0, >4.0.0, >=5, >=5.0, >=5.0.0, >5, >5.0, >5.0.0, >=6, >=6.0, >=6.0.0, >6, >6.0, >6.0.0, >=7, >=7.0, >=7.0.0, >7, >7.0, >7.0.0, >=8, >=8.0, >=8.0.0, >8, >8.0, >8.0.0, >=9, >=9.0, >=9.0.0, >9, >9.0, >9.0.0, >=10, >=10.0, >=10.0.0, >10, >10.0, >10.0.0, >=11, >=11.0, >=11.0.0, >11, >11.0, >11.0.0].
I think you can file an issue in the Public Issue Tracker, I found this similar in Flexible. This issue could be related to some internal stuff architecture of App Engine. When filing the issue, provide as much information as possible, always sanitizing to avoid sharing sensitive information, such as project ID, passwords, etc.