Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] <closeTransport called before connection was established at EventEmitter.rejectTransportOpen> #1301

Closed
1 task done
elvinest opened this issue Jun 15, 2023 · 9 comments
Labels
walletconnect Bug or issue with WalletConnect v2

Comments

@elvinest
Copy link

elvinest commented Jun 15, 2023

Is there an existing issue for this?

  • I have searched the existing issues

RainbowKit Version

1.0.2

wagmi Version

1.2.0

Current Behavior

When I was testing RainbowKit I ran into an error. The error is caused by setting the WalletConnect ProjectId, it will work fine without WalletConnect. The error message is as follows:
ERROR
closeTransport called before connection was established
at EventEmitter.rejectTransportOpen (http://localhost:3000/static/js/vendors-node_modules_walletconnect_ethereum-provider_dist_index_es_js.chunk.js:6192:11)
at Object.onceWrapper (http://localhost:3000/static/js/bundle.js:35031:54)
at EventEmitter.emit (http://localhost:3000/static/js/bundle.js:34960:5)
at Pt.transportOpen (http://localhost:3000/static/js/vendors-node_modules_walletconnect_ethereum-provider_dist_index_es_js.chunk.js:6175:21)
at async Promise.all (index 1)
at async Pt.init (http://localhost:3000/static/js/vendors-node_modules_walletconnect_ethereum-provider_dist_index_es_js.chunk.js:6110:68)
at async J.initialize (http://localhost:3000/static/js/vendors-node_modules_walletconnect_ethereum-provider_dist_index_es_js.chunk.js:7104:87)
at async J.start (http://localhost:3000/static/js/vendors-node_modules_walletconnect_ethereum-provider_dist_index_es_js.chunk.js:7099:26)
at async M.initialize (http://localhost:3000/static/js/vendors-node_modules_walletconnect_ethereum-provider_dist_index_es_js.chunk.js:11195:7)
at async M.init (http://localhost:3000/static/js/vendors-node_modules_walletconnect_ethereum-provider_dist_index_es_js.chunk.js:11184:12)
walletconnect_error1
walletconnect_error3

Expected Behavior

No response

Steps To Reproduce

`const { chains, publicClient, webSocketPublicClient } = configureChains(
[
mainnet,
polygon,
optimism,
arbitrum
],
[publicProvider()]
);

const connectors=connectorsForWallets([
{
groupName:'Recommended',
wallets:[
metaMaskWallet({chains}),
injectedWallet({chains}),
coinbaseWallet({chains}),
//walletConnectWallet({projectId:configProjectId,chains}) //remove this line it will work fine
],
}
])

const wagmiConfig = createConfig({
autoConnect: true,
connectors,
publicClient,
webSocketPublicClient,
});`

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

No response

Anything else?

"dependencies": {
"@rainbow-me/rainbowkit": "^1.0.2",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"viem": "^1.0.7",
"wagmi": "^1.2.0",
"web-vitals": "^2.1.4"
}

@DanielSinclair
Copy link
Collaborator

@elvinest This is an issue within the underlying WalletConnect libraries. Have relayed the issue and am awaiting a response.

@DanielSinclair DanielSinclair added the walletconnect Bug or issue with WalletConnect v2 label Jun 15, 2023
@elvinest
Copy link
Author

@elvinest This is an issue within the underlying WalletConnect libraries. Have relayed the issue and am awaiting a response.

thx, walletconnect v2 seems unstable.

@mlenser
Copy link

mlenser commented Jun 20, 2023

@DanielSinclair is there any link to the underlying issue so we can track it?

The deadline to stop using v1 is fast approaching so we need to know how to handle it.

@Frontend-io
Copy link

Hey @DanielSinclair . Any updates on this issue yet?

@DanielSinclair
Copy link
Collaborator

@mlenser @Frontend-io Received word from WalletConnect that an update to their libraries is going out today to fix many of these errors. Should be available upstream in Wagmi very soon.

@linghuccc
Copy link

How is this issue now? I am having the same problem

@linghuccc
Copy link

Just to confirm with you experience guys: we cannot use rainbowkit for development until this issue is fixed, right?
-- from a rainbowkit newbie.

@DanielSinclair
Copy link
Collaborator

We just released 1.0.4 and 0.12.16 to support the latest versions of wagmi and viem that pull in the latest WalletConnect library fixes. Try upgrading RainbowKit and these dependencies and let me know if you're still experiencing the issue.

@linghuccc
Copy link

We just released 1.0.4 and 0.12.16 to support the latest versions of wagmi and viem that pull in the latest WalletConnect library fixes. Try upgrading RainbowKit and these dependencies and let me know if you're still experiencing the issue.

Unfortunately, there is still error for the latest release. I have reported error in the post below:
#1333

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
walletconnect Bug or issue with WalletConnect v2
Projects
None yet
Development

No branches or pull requests

5 participants