AcalaNetwork / chopsticks

Create parallel reality of your Substrate network.
Apache License 2.0
133 stars 80 forks source link

Encountering Error in XCM Testing #658

Closed abhiyana closed 8 months ago

abhiyana commented 8 months ago

Description: When attempting to run XCM testing using the command npx @acala-network/chopsticks@latest xcm -r polkadot -p acala -p moonbeam, the following error is encountered:

@polkadot/types-create has multiple versions, ensure that there is only one installed.
Either remove and explicitly install matching versions or dedupe using your package manager.
The following conflicting packages were found:
    cjs 10.11.1 node_modules/@polkadot/types-create/cjs
    cjs 10.11.2 node_modules/@polkadot/types-known/node_modules/@polkadot/types-create/cjs
@polkadot/types-codec has multiple versions, ensure that there is only one installed.
Either remove and explicitly install matching versions or dedupe using your package manager.
The following conflicting packages were found:
    cjs 10.11.1 node_modules/@polkadot/types-codec/cjs
    cjs 10.11.2 node_modules/@polkadot/types-known/node_modules/@polkadot/types-codec/cjs
[16:57:51.873] INFO (68128): Loading config file https://raw.githubusercontent.com/AcalaNetwork/chopsticks/master/configs/acala.yml
    app: "chopsticks"
Unable to map [u8; 32] to a lookup index
[16:58:00.768] INFO (68128): Acala RPC listening on port 8000
    app: "chopsticks"
[16:58:00.768] INFO (68128): Loading config file https://raw.githubusercontent.com/AcalaNetwork/chopsticks/master/configs/moonbeam.yml
    app: "chopsticks"
2024-01-30 16:58:01          API-WS: disconnected from wss://wss.api.moonbeam.network: 1006:: Abnormal Closure
panicked at 'called `Result::unwrap()` on an `Err` value: VirtualMachine(UnresolvedFunctionImport { function: "ext_panic_handler_abort_on_panic_version_1", module_name: "env" })', src/task.rs:131:6

Stack:

Error
    at imports.wbg.__wbg_new_abda76e883ba8a5f (/Users/abhishekharde/.npm/_npx/81ad9c881cb83600/node_modules/@acala-network/chopsticks-executor/dist/cjs/chopsticks_executor.js:750:19)
    at wasm://wasm/00974292:wasm-function[729]:0x12a598
    at wasm://wasm/00974292:wasm-function[891]:0x133f33
    at wasm://wasm/00974292:wasm-function[805]:0x12e6ee
    at wasm://wasm/00974292:wasm-function[104]:0xa8282
    at wasm://wasm/00974292:wasm-function[356]:0x10e402
    at wasm://wasm/00974292:wasm-function[942]:0x1347c5
    at __wbg_adapter_46 (/Users/abhishekharde/.npm/_npx/81ad9c881cb83600/node_modules/@acala-network/chopsticks-executor/dist/cjs/chopsticks_executor.js:410:10)
    at real (/Users/abhishekharde/.npm/_npx/81ad9c881cb83600/node_modules/@acala-network/chopsticks-executor/dist/cjs/chopsticks_executor.js:394:22)
    at node:internal/process/task_queues:140:7

node:internal/event_target:1096
  process.nextTick(() => { throw err; });
                           ^
Error [RuntimeError]: unreachable
    at wasm://wasm/00974292:wasm-function[729]:0x12a6c1
    at wasm://wasm/00974292:wasm-function[891]:0x133f33
    at wasm://wasm/00974292:wasm-function[805]:0x12e6ee
    at wasm://wasm/00974292:wasm-function[104]:0xa8282
    at wasm://wasm/00974292:wasm-function[356]:0x10e402
    at wasm://wasm/00974292:wasm-function[942]:0x1347c5
    at __wbg_adapter_46 (/Users/abhishekharde/.npm/_npx/81ad9c881cb83600/node_modules/@acala-network/chopsticks-executor/dist/cjs/chopsticks_executor.js:410:10)
    at real (/Users/abhishekharde/.npm/_npx/81ad9c881cb83600/node_modules/@acala-network/chopsticks-executor/dist/cjs/chopsticks_executor.js:394:22)
    at node:internal/process/task_queues:140:7
    at AsyncResource.runInAsyncScope (node:async_hooks:206:9)

Node.js v21.6.1

Steps to Reproduce:

  1. Run the command: npx @acala-network/chopsticks@latest xcm -r polkadot -p acala -p moonbeam

Environment Information

ermalkaleci commented 8 months ago

https://github.com/AcalaNetwork/chopsticks/issues/650

ermalkaleci commented 8 months ago

use latest beta

abhiyana commented 8 months ago

with beta tag, getting below error "/Users/abhishekharde/.npm/_npx/84d26c864c64a94e/node_modules/@acala-network/chopsticks/dist/cjs/utils/decoder.js:12 const _jsondiffpatch = require("jsondiffpatch"); ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/abhishekharde/.npm/_npx/84d26c864c64a94e/node_modules/jsondiffpatch/lib/index.js from /Users/abhishekharde/.npm/_npx/84d26c864c64a94e/node_modules/@acala-network/chopsticks/dist/cjs/utils/decoder.js not supported. Instead change the require of index.js in /Users/abhishekharde/.npm/_npx/84d26c864c64a94e/node_modules/@acala-network/chopsticks/dist/cjs/utils/decoder.js to a dynamic import() which is available in all CommonJS modules. at Object. (/Users/abhishekharde/.npm/_npx/84d26c864c64a94e/node_modules/@acala-network/chopsticks/dist/cjs/utils/decoder.js:12:24) { code: 'ERR_REQUIRE_ESM' } "

abhiyana commented 8 months ago

I am running below command "npx @acala-network/chopsticks@beta xcm -r polkadot -p acala -p moonbeam --allow-unresolved-imports"

ermalkaleci commented 8 months ago

Will push a fix

albertov19 commented 8 months ago

I can confirm I'm getting the same error as @abhiyana after using beta.

@ermalkaleci let us know when the new beta is live so we can test.

ermalkaleci commented 8 months ago

https://github.com/AcalaNetwork/chopsticks/pull/660

ermalkaleci commented 8 months ago

@albertov19 @abhiyana https://github.com/AcalaNetwork/chopsticks/actions/runs/7712329180/job/21019637095

albertov19 commented 8 months ago

Workin! 🚀

ermalkaleci commented 8 months ago

new version is out