config-js test fails
bernardoaraujor opened this issue Β· comments
@pepoviola I copied these three files from the zombienet tests
directory:
When I try to invoke the main script, I run into the following error message:
$ ./zombienet.sh test tests/examples/0008-custom-js.feature
custom js( System Events Custom JS )
Launching network... this can take a while.
Using provider: native
Launching network under namespace: zombie-aaf74141e26f46f042609a2b0f64f763
Using temporary directory: /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW
launching temp
with command: bash -c ./polkadot build-spec --chain rococo-local --disable-default-bootnode > /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/cfg/rococo-local-plain.json
temp is ready!
π§Ή Starting with a fresh authority set...
π€ Added Genesis Authority alice - 5CrY25p7g85soBZyxBNRHh3KU6WpcpyGJdYSfwqbkRVbFrbq
π€ Added Genesis Authority bob - 5HR2hzzJi4V3VKKsVr5HSv6C3d1TuuBw45FZfPTxjAh1LSpo
launching temp-1
with command: bash -c target/release/parachain-collator build-spec --disable-default-bootnode > /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/cfg/rococo-local-plain.json
temp-1 is ready!
launching temp-2
with command: bash -c target/release/parachain-collator build-spec --chain /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/rococo-local-100-plain.json --disable-default-bootnode --raw > /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/rococo-local-100-raw.json
temp-2 is ready!
launching temp-collator
with command: bash -c target/release/parachain-collator export-genesis-state --chain /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/rococo-local-100.json > /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/cfg/genesis-state && target/release/parachain-collator export-genesis-wasm --chain /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/rococo-local-100.json > /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/cfg/genesis-wasm
temp-collator is ready!
β Added Genesis Parachain 100
launching temp-3
with command: bash -c ./polkadot build-spec --chain /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/rococo-local-plain.json --disable-default-bootnode --raw > /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/rococo-local-raw.json
temp-3 is ready!
Chain name: Rococo Local Testnet
β Clear Boot Nodes
launching alice
with command: ./polkadot --chain /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/alice/cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --alice --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --validator --prometheus-port 45263 --rpc-port 46555 --ws-port 37935 --listen-addr /ip4/0.0.0.0/tcp/40677/ws --base-path /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/alice/data
alice is ready!
alice running
You can follow the logs of the node by running this command:
tail -f /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/alice.log
β Added Boot Nodes: /ip4/127.0.0.1/tcp/40677/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm
launching bob
with command: ./polkadot --chain /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/bob/cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --bob --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --validator --bootnodes /ip4/127.0.0.1/tcp/40677/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --prometheus-port 44659 --rpc-port 43675 --ws-port 40441 --listen-addr /ip4/0.0.0.0/tcp/40661/ws --base-path /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/bob/data
bob is ready!
bob running
You can follow the logs of the node by running this command:
tail -f /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/bob.log
All relay chain nodes spawned...
launching collator01
with command: target/release/parachain-collator --name collator01 --alice --collator --force-authoring --chain /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/collator01/cfg/rococo-local-100.json --base-path /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/collator01/data --listen-addr /ip4/0.0.0.0/tcp/34097/ws --ws-port 36809
Error: Timeout(30) for node : collator01
at NativeClient.<anonymous> (/snapshot/zombienet/dist/providers/native/nativeClient.js:267:19)
at Generator.next (<anonymous>)
at fulfilled (/snapshot/zombienet/dist/providers/native/nativeClient.js:5:58)
Node's logs are available in /tmp/zombie-aaf74141e26f46f042609a2b0f64f763_-6254-S2zJxzvfr3OW/logs
Is there some parameter missing from the config files?
@pepoviola how do I run javascript assertions against parachain nodes?
I tried the following syntax on the .feature
file:
collator01: js-script ./polkadot-js-example.js return is greater than 1 within 200 seconds
but it breaks with:
unhandledRejection
_Event {
type: 'error',
isTrusted: false,
_yaeti: true,
target: W3CWebSocket {
_listeners: {},
addEventListener: [Function: _addEventListener],
removeEventListener: [Function: _removeEventListener],
dispatchEvent: [Function: _dispatchEvent],
_url: 'ws://127.0.0.1:39619',
_readyState: 3,
_protocol: undefined,
_extensions: '',
_bufferedAmount: 0,
_binaryType: 'arraybuffer',
_connection: undefined,
_client: WebSocketClient {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
config: [Object],
_req: null,
protocols: [],
origin: undefined,
url: [Url],
secure: false,
base64nonce: 'Qoqlw3A/sHnciqbF1KWVng==',
[Symbol(kCapture)]: false
},
onclose: null,
onerror: null,
onmessage: null,
onopen: null
},
cancelable: true,
stopImmediatePropagation: [Function (anonymous)]
}
Hi @bernardoaraujor, I try adding this line
collator01: js-script ./0008-custom.js return is greater than 1 within 200 seconds
And works as expected
β collator01: js-script ./0008-custom.js return is greater than 1 within 200 seconds (187ms)
Node's logs are available in /var/folders/rz/1cyx7hfj31qgb98d8_cg7jwh0000gn/T/zombie-8735874711a7c9295c9a17f14208a118_-23957-G6LVEtkSRpcz/logs
Deleting network
5 passing (26s)
Note: zombienet
will connect to the collator
part, not the full-node .
@pepoviola it's weird that it's not reproduced on your side. I keep getting on my side, not sure what I'm missing.
what do you think these logs mean?
unhandledRejection
_Event {
type: 'error',
isTrusted: false,
_yaeti: true,
target: W3CWebSocket {
_listeners: {},
addEventListener: [Function: _addEventListener],
removeEventListener: [Function: _removeEventListener],
dispatchEvent: [Function: _dispatchEvent],
_url: 'ws://127.0.0.1:40243',
_readyState: 3,
_protocol: undefined,
_extensions: '',
_bufferedAmount: 0,
_binaryType: 'arraybuffer',
_connection: undefined,
_client: WebSocketClient {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
config: [Object],
_req: null,
protocols: [],
origin: undefined,
url: [Url],
secure: false,
base64nonce: 'kY3p99HZx7etmut2E4bKuw==',
[Symbol(kCapture)]: false
},
onclose: null,
onerror: null,
onmessage: null,
onopen: null
},
cancelable: true,
stopImmediatePropagation: [Function (anonymous)]
}
Hi @bernardoaraujor, not sure but looks like a connection error. Can we schedule a call to check this issue in your environment?
Thanks!
Hi @bernardoaraujor, not sure but looks like a connection error. Can we schedule a call to check this issue in your environment?
Thanks!
sent you an invite for tomorrow. thanks!