polkadot-js / extension

Simple browser extension for managing Polkadot and Substrate network accounts in a browser. Allows the signing of extrinsics using these accounts. Also provides a simple interface for compliant extensions for dapps.
Apache License 2.0
971 stars 417 forks source link

Automation Requires version to be included in manifest #1375

Closed aanandan1987 closed 2 months ago

aanandan1987 commented 3 months ago

In order to automate the plokadot site (https://orderbook.polkadex.trade/) , we need plokadot dot source code and manifest file to be included in our source code. got the manifest file from the below location (packages\extension\manifiest). but while running the code it shows below error. can some one take a look and help us here

image

Ran the same on firefox browser with play wright and type script. code block is as below const extensionPath = path.join(__dirname, 'extension-master'); global.browser = await chromium.launchPersistentContext('', { //devtools: true, headless: false, channel: 'chrome', args: [ --disable-extensions-except=${extensionPath}, --load-extension=${extensionPath}, ], viewport: { width: 1920, height: 1080, }, }); // for manifest v2: let [background] = global.browser.backgroundPages(); if (!background) background = await global.browser.waitForEvent('backgroundpage'); // let [background] = global.browser.serviceWorkers(); // if (!background) // background = await global.browser.waitForEvent('serviceworker'); const pages = global.browser.pages(); global.page = pages[0];

TarikGul commented 3 months ago

The version is included in the build.

You should be grabbing the manifest from the build - so if you run yarn build against the repo then go to packages/extension/build/manifest.json you will see the version attached.

TarikGul commented 2 months ago

Closing this as answered above

polkadot-js-bot commented 2 months ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.