web-examples icon indicating copy to clipboard operation
web-examples copied to clipboard

Missing or invalid "message" param

Open 1648045459 opened this issue 3 years ago • 5 comments

Describe the bug Missing or invalid "message" param

After the 2.0.0-beta.100 is reinstalled, the error displayed on the connection is the same as the error displayed in the 2.0.0-beta.101 version

{ "code": -32000, "message": "Missing or invalid "message" param" }

SDK Version (if relevant)

  • Client: @walletconnect/sign-client
  • Version 2.0.0-beta.100

To Reproduce Steps to reproduce the behavior:

  1. 2.0.0-beta.100 version code downloaded a month ago from https://github.com/WalletConnect/web-examples
  2. 2022/06/28 npm uninstall @walletconnect/sign-client @walletconnect/types @walletconnect/utils @walletconnect/legacy-modal
  3. 2022/06/28 npm install @walletconnect/[email protected] @walletconnect/[email protected] @walletconnect/[email protected] @walletconnect/[email protected] --save
  4. npm run start
  5. select chain:Ethereum Kovan
  6. Click the button connect

Expected behavior Display uri QR code

Screenshots

Desktop (please complete the following information):

  • OS: MAC M1
  • Browser chrome
  • Version [e.g. 22]

1648045459 avatar Jun 28 '22 08:06 1648045459

Version v2.0.0-beta.57 reported the same error

1648045459 avatar Jun 28 '22 09:06 1648045459

localhost sends two requests:

wss://relay.walletconnect.com/?auth=eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkaWQ6a2V5Ono2TWtpRm9lZ2tmWU0xWGljN0dLOVNDZzZWV2l2QmdyZjNTVVJSa1RKMkxNS1JmRSIsInN1YiI6InFmMTBnaiJ9.TTasr3ihVTC3_h1SCooExIy2DC19Uk6c52MU7xIndHycsPCAju1fq0_8b8IWFFEgRMCJ80Eef40SHZxS_fjjDw&env=browser&host=localhost%3A3000&projectId=64f46328e6659d165cac3948a9a3c88b&protocol=wc&version=2

https://relay.walletconnect.com/auth-nonce?did=did:key:z6MkiFoegkfYM1Xic7GK9SCg6VWivBgrf3SURRkTJ2LMKRfE

https://react-app.walletconnect.com/ only sends one request

wss://relay.walletconnect.com/?env=browser&host=react-app.walletconnect.com&projectId=e899c82be21d4acca2c8aec45e893598&protocol=wc&version=2

1648045459 avatar Jun 28 '22 09:06 1648045459

Same here.

lmcmz avatar Jul 08 '22 23:07 lmcmz

Hi @1648045459,

Sorry to hear you were having trouble between beta versions when interfacing with the relay.

In principle there shouldn't be any difference in behaviour between the deployed examples and running locally (this is also how we cross-test wallet <-> dapp), assuming that all the dependencies are still aligned in version.

We have however had some important auth changes in the recent beta versions when interfacing with the relay, which have stabilised now with beta.102: https://github.com/WalletConnect/walletconnect-monorepo/releases/tag/2.0.0-beta.102

Could you please try the following and report if you're still experiencing this issue:

  1. Update your local copy of the main branch (or merge it into your own working branch) so that both the dapp and wallet examples are using beta.102.
  2. Do a clean slate install (e.g. rm -rf react-dapp-v2/node_modules && yarn)
  3. Check if connecting to the relay works and if you can interface with e.g. https://react-wallet.walletconnect.com as expected

The primary deployed examples have also been updated to beta.102:

bkrem avatar Jul 12 '22 08:07 bkrem

Moving this to the web-examples repo since this seems to be a configuration issue with examples rather than an explicit bug in the sign-client

bkrem avatar Jul 12 '22 08:07 bkrem