cosmology-tech / cosmos-kit

Universal wallet connector for the Cosmos ⚛️
https://cosmology.zone/products/cosmos-kit
BSD 3-Clause Clear License
183 stars 129 forks source link

Blocked by CORS when sending transaction #414

Closed kombos closed 4 months ago

kombos commented 6 months ago

When i'm trying to perform a transaction using 'Metamask Snap for LeapWallet' wallet integration in CosmosKit, the following error showcases:

Cannot read properties of undefined (reading 'authInfoBytes')

Further log shows a 'blocked by CORS policy error':

Access to XMLHttpRequest at 'https://rpc-assetmantle-ia.cosmosia.notional.ventures/' from origin 'https://names.assetmantle.one' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
rpc-assetmantle-ia.cosmosia.notional.ventures/:1 
Failed to load resource: net::ERR_FAILED
rpc-assetmanle.d-stake.xyz/:1 
Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID

I've implemented it in a NextJS app (v13.4.19)

twhy commented 6 months ago

@kombos which version of @cosmos-kit/leap-metamask-cosmos-snap are you using ? Please try upgrade to v0.6.2 first. versions prior to 0.6.2 have known issues.

About the CORS issue, you may need to use a different endpoint.

pyramation commented 4 months ago

CORS is usually the node issue, looks like you're using public endpoints. I would contact notional