Describe the bug
UniversalProvider tests fail and timeout at fabf6bb
To Reproduce
Steps to reproduce the behavior:
Follow the README instructions to setup development:
- Install nodejs and npm
- Install python3 and ensure python cli is linked (required to build some npm modules)
- Install workspace dependencies i.e. run npm install from root folder
- Install redis. We recommend running it as a brew service
- Pull and start ts-relay server (separate repo) PORT=5555 npm run start
- Ensure everything runs correctly by executing npm run check
Expected behavior
Tests should pass
Desktop (please complete the following information):
Additional context
Entire output of npm run check:
➜ walletconnect-monorepo git:(v2.0) npm run check
> check
> npm run lint; npm run build; npm run test
> lint
> npm run lint --workspaces --if-present
> @walletconnect/types@2.1.0 lint
> eslint -c '../../.eslintrc' --fix './src/**/*.ts'
> @walletconnect/utils@2.1.0 lint
> eslint -c '../../.eslintrc' --fix './src/**/*.ts'
> @walletconnect/core@2.1.0 lint
> eslint -c '../../.eslintrc' --fix './src/**/*.ts'
> @walletconnect/sign-client@2.1.0 lint
> eslint -c '../../.eslintrc' --fix './src/**/*.ts'
> @walletconnect/react-native-compat@2.1.0 lint
> eslint -c '../../.eslintrc' --fix './**/*.{js,ts,jsx,tsx}'
> @walletconnect/signer-connection@2.1.0 lint
> eslint -c '../../.eslintrc' --fix './src/**/*.ts'
> @walletconnect/ethereum-provider@2.1.0 lint
> eslint -c '../../.eslintrc' --fix './src/**/*.ts'
> @walletconnect/universal-provider@2.1.0 lint
> eslint -c '../../.eslintrc' --fix './src/**/*.ts'
> build
> npm run build --workspaces --if-present
> @walletconnect/types@2.1.0 build
> npm run build:pre; npm run build:source; npm run build:types
> @walletconnect/types@2.1.0 build:pre
> npm run clean
> @walletconnect/types@2.1.0 clean
> rm -rf dist
> @walletconnect/types@2.1.0 build:source
> rollup --config rollup.config.js
./src/index.ts → ./dist/index.umd.js...
created ./dist/index.umd.js in 105ms
./src/index.ts → ./dist/index.cjs.js, ./dist/index.es.js...
created ./dist/index.cjs.js, ./dist/index.es.js in 70ms
> @walletconnect/types@2.1.0 build:types
> tsc
> @walletconnect/utils@2.1.0 build
> npm run build:pre; npm run build:source; npm run build:types
> @walletconnect/utils@2.1.0 build:pre
> npm run clean
> @walletconnect/utils@2.1.0 clean
> rm -rf dist
> @walletconnect/utils@2.1.0 build:source
> rollup --config rollup.config.js
./src/index.ts → ./dist/index.umd.js...
(!) `this` has been rewritten to `undefined`
https://rollupjs.org/guide/en/#error-this-is-undefined
../../node_modules/detect-browser/es/index.js
1: var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
^
2: if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3: if (ar || !(i in from)) {
...and 1 other occurrence
created ./dist/index.umd.js in 418ms
./src/index.ts → ./dist/index.cjs.js, ./dist/index.es.js...
created ./dist/index.cjs.js, ./dist/index.es.js in 51ms
> @walletconnect/utils@2.1.0 build:types
> tsc
> @walletconnect/core@2.1.0 build
> npm run build:pre; npm run build:source; npm run build:types
> @walletconnect/core@2.1.0 build:pre
> npm run clean
> @walletconnect/core@2.1.0 clean
> rm -rf dist
> @walletconnect/core@2.1.0 build:source
> rollup --config rollup.config.js
./src/index.ts → ./dist/index.umd.js...
(!) `this` has been rewritten to `undefined`
https://rollupjs.org/guide/en/#error-this-is-undefined
../../node_modules/detect-browser/es/index.js
1: var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
^
2: if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3: if (ar || !(i in from)) {
...and 1 other occurrence
created ./dist/index.umd.js in 731ms
./src/index.ts → ./dist/index.cjs.js, ./dist/index.es.js...
created ./dist/index.cjs.js, ./dist/index.es.js in 160ms
> @walletconnect/core@2.1.0 build:types
> tsc
> @walletconnect/sign-client@2.1.0 build
> npm run build:pre; npm run build:source; npm run build:types
> @walletconnect/sign-client@2.1.0 build:pre
> npm run clean
> @walletconnect/sign-client@2.1.0 clean
> rm -rf dist
> @walletconnect/sign-client@2.1.0 build:source
> rollup --config rollup.config.js
./src/index.ts → ./dist/index.umd.js...
(!) `this` has been rewritten to `undefined`
https://rollupjs.org/guide/en/#error-this-is-undefined
../../node_modules/detect-browser/es/index.js
1: var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
^
2: if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3: if (ar || !(i in from)) {
...and 1 other occurrence
created ./dist/index.umd.js in 771ms
./src/index.ts → ./dist/index.cjs.js, ./dist/index.es.js...
created ./dist/index.cjs.js, ./dist/index.es.js in 87ms
> @walletconnect/sign-client@2.1.0 build:types
> tsc
> @walletconnect/signer-connection@2.1.0 build
> npm run build:pre; npm run build:source; npm run build:types
> @walletconnect/signer-connection@2.1.0 build:pre
> npm run clean
> @walletconnect/signer-connection@2.1.0 clean
> rm -rf dist
> @walletconnect/signer-connection@2.1.0 build:source
> rollup --config rollup.config.js
./src/index.ts → ./dist/index.umd.js...
(!) `this` has been rewritten to `undefined`
https://rollupjs.org/guide/en/#error-this-is-undefined
../../node_modules/detect-browser/es/index.js
1: var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
^
2: if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3: if (ar || !(i in from)) {
...and 1 other occurrence
created ./dist/index.umd.js in 754ms
./src/index.ts → ./dist/index.cjs.js, ./dist/index.es.js...
created ./dist/index.cjs.js, ./dist/index.es.js in 31ms
> @walletconnect/signer-connection@2.1.0 build:types
> tsc
> @walletconnect/ethereum-provider@2.1.0 build
> npm run build:pre; npm run build:source; npm run build:types
> @walletconnect/ethereum-provider@2.1.0 build:pre
> npm run clean
> @walletconnect/ethereum-provider@2.1.0 clean
> rm -rf dist
> @walletconnect/ethereum-provider@2.1.0 build:source
> rollup --config rollup.config.js
./src/index.ts → ./dist/index.umd.js...
(!) `this` has been rewritten to `undefined`
https://rollupjs.org/guide/en/#error-this-is-undefined
../../node_modules/detect-browser/es/index.js
1: var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
^
2: if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3: if (ar || !(i in from)) {
...and 1 other occurrence
created ./dist/index.umd.js in 814ms
./src/index.ts → ./dist/index.cjs.js, ./dist/index.es.js...
created ./dist/index.cjs.js, ./dist/index.es.js in 25ms
> @walletconnect/ethereum-provider@2.1.0 build:types
> tsc
> @walletconnect/universal-provider@2.1.0 build
> npm run build:pre; npm run build:source; npm run build:types
> @walletconnect/universal-provider@2.1.0 build:pre
> npm run clean
> @walletconnect/universal-provider@2.1.0 clean
> rm -rf dist
> @walletconnect/universal-provider@2.1.0 build:source
> rollup --config rollup.config.js
./src/index.ts → ./dist/index.umd.js...
(!) `this` has been rewritten to `undefined`
https://rollupjs.org/guide/en/#error-this-is-undefined
../../node_modules/detect-browser/es/index.js
1: var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
^
2: if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3: if (ar || !(i in from)) {
...and 1 other occurrence
created ./dist/index.umd.js in 848ms
./src/index.ts → ./dist/index.cjs.js, ./dist/index.es.js...
created ./dist/index.cjs.js, ./dist/index.es.js in 67ms
> @walletconnect/universal-provider@2.1.0 build:types
> tsc
> test
> npm run test --workspaces --if-present
> @walletconnect/utils@2.1.0 test
> npm run test:pre; npm run test:run
> @walletconnect/utils@2.1.0 test:pre
> rm -rf ./test/test.db
> @walletconnect/utils@2.1.0 test:run
> vitest run --dir test
RUN v0.21.1 /Users/derekbrans/DappCamp/walletconnect-monorepo/packages/utils
✓ test/validators.spec.ts (1)
✓ test/misc.spec.ts (3)
✓ test/uri.spec.ts (2)
✓ test/crypto.spec.ts (9)
Test Files 4 passed (4)
Tests 15 passed (15)
Start at 22:01:08
Duration 584ms (setup 0ms, collect 492ms, tests 31ms)
> @walletconnect/core@2.1.0 test
> npm run test:pre; npm run test:run
> @walletconnect/core@2.1.0 test:pre
> rm -rf ./test/test.db
> @walletconnect/core@2.1.0 test:run
> vitest run --dir test
RUN v0.21.1 /Users/derekbrans/DappCamp/walletconnect-monorepo/packages/core
✓ test/subscriber.spec.ts (8)
✓ test/messages.spec.ts (11)
✓ test/publisher.spec.ts (3) 2100ms
✓ test/pairing.spec.ts (23) 1140ms
✓ test/store.spec.ts (12)
✓ test/crypto.spec.ts (16)
✓ test/relayer.spec.ts (12)
✓ test/keychain.spec.ts (1)
✓ test/core.spec.ts (1)
Test Files 9 passed (9)
Tests 86 passed | 1 skipped (87)
Start at 22:01:09
Duration 2.80s (setup 0ms, collect 1.99s, tests 3.75s)
> @walletconnect/sign-client@2.1.0 test
> npm run test:pre; npm run test:run
> @walletconnect/sign-client@2.1.0 test:pre
> rm -rf ./test/tmp && mkdir ./test/tmp
> @walletconnect/sign-client@2.1.0 test:run
> vitest run --dir test/sdk
RUN v0.21.1 /Users/derekbrans/DappCamp/walletconnect-monorepo/packages/sign-client
✓ test/sdk/events.spec.ts (6)
↓ test/sdk/push.spec.ts (1) [skipped]
✓ test/sdk/validation.spec.ts (102) 367ms
✓ test/sdk/client.spec.ts (14) 6710ms
Test Files 3 passed | 1 skipped (4)
Tests 122 passed | 1 skipped (123)
Start at 22:01:13
Duration 7.40s (setup 0ms, collect 1.02s, tests 7.32s)
> @walletconnect/signer-connection@2.1.0 test
> npm run test:pre; npm run test:run
> @walletconnect/signer-connection@2.1.0 test:pre
> rm -rf ./test/test.db
> @walletconnect/signer-connection@2.1.0 test:run
> vitest run --dir test
RUN v0.21.1 /Users/derekbrans/DappCamp/walletconnect-monorepo/providers/signer-connection
✓ test/index.spec.ts (1)
Test Files 1 passed (1)
Tests 1 passed (1)
Start at 22:01:21
Duration 434ms (setup 0ms, collect 9ms, tests 1ms)
> @walletconnect/ethereum-provider@2.1.0 test
> npm run test:pre; npm run test:run
> @walletconnect/ethereum-provider@2.1.0 test:pre
> rm -rf ./test/test.db
> @walletconnect/ethereum-provider@2.1.0 test:run
> vitest run --dir test
RUN v0.21.1 /Users/derekbrans/DappCamp/walletconnect-monorepo/providers/ethereum-provider
✓ test/index.spec.ts (1)
Test Files 1 passed (1)
Tests 1 passed (1)
Start at 22:01:22
Duration 432ms (setup 0ms, collect 11ms, tests 1ms)
> @walletconnect/universal-provider@2.1.0 test
> vitest run --dir test
RUN v0.21.1 /Users/derekbrans/DappCamp/walletconnect-monorepo/providers/universal-provider
❯ test/index.spec.ts (15)
❯ UniversalProvider (15)
❯ eip155 (15)
✓ multi chain (1)
❯ Web3 (8) 240156ms
✓ matches accounts
✓ matches chainId
× ERC20 contract 80008ms
✓ estimate gas
× send transaction 80004ms
✓ sign transaction
× sign message 80002ms
❯ test/index.spec.ts (15) 505301ms
❯ UniversalProvider (15) 505301ms
❯ eip155 (15) 480214ms
✓ multi chain (1)
❯ Web3 (8) 240156ms
✓ matches accounts
✓ matches chainId
× ERC20 contract 80008ms
✓ estimate gas
× send transaction 80004ms
✓ sign transaction
× sign message 80002ms
✓ sign transaction and send via sendAsync
❯ Ethers (6) 240054ms
✓ matches accounts
✓ matches chainId
× ERC20 contract 80007ms
✓ estimate gas
× send transaction 80002ms
× sign message 80004ms
⠴ [ afterAll ]
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
FAIL test/index.spec.ts > UniversalProvider
Error: Hook timed out in 25000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "hookTimeout".
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/7]⎯
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Tests 6 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
FAIL test/index.spec.ts > UniversalProvider > eip155 > Web3 > ERC20 contract
FAIL test/index.spec.ts > UniversalProvider > eip155 > Web3 > send transaction
FAIL test/index.spec.ts > UniversalProvider > eip155 > Web3 > sign message
FAIL test/index.spec.ts > UniversalProvider > eip155 > Ethers > ERC20 contract
FAIL test/index.spec.ts > UniversalProvider > eip155 > Ethers > send transaction
FAIL test/index.spec.ts > UniversalProvider > eip155 > Ethers > sign message
Error: Test timed out in 80000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/7]⎯
Test Files 1 failed (1)
Tests 6 failed | 9 passed (15)
Start at 22:01:23
Duration 506.68s (setup 0ms, collect 905ms, tests 505.30s)
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Vitest caught 1 unhandled error during the test run. This might cause false positive tests.
Please, resolve all errors to make sure your tests are not affected.
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error: No matching key. session or pairing topic doesn't exist: c86b049bb51b3c3a96438fdaa235d4dfd5f57fb1c14d7aaad53ac029a3b58268
❯ oe.isValidSessionOrPairingTopic ../../node_modules/events/events.js:1:26310
❯ oe.isValidDisconnect ../../node_modules/events/events.js:1:24062
❯ oe.onSessionDeleteRequest ../../node_modules/events/events.js:1:18241
❯ oe.onRelayEventRequest ../../node_modules/events/events.js:1:13583
❯ E.<anonymous> ../../node_modules/events/events.js:1:24531
❯ process.processTicksAndRejections node:internal/process/task_queues:95:5
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
npm ERR! Lifecycle script `test` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: @walletconnect/universal-provider@2.1.0
npm ERR! at location: /Users/derekbrans/DappCamp/walletconnect-monorepo/providers/universal-provider
➜ walletconnect-monorepo git:(v2.0)
Describe the bug
UniversalProvider tests fail and timeout at fabf6bb
To Reproduce
Steps to reproduce the behavior:
Follow the README instructions to setup development:
Expected behavior
Tests should pass
Desktop (please complete the following information):
Additional context
Entire output of
npm run check: