clxyder / walletconnect-expo-example

A simple example on how to get WalletConnect to authenticate wallets in the Expo Go app.
66 stars 25 forks source link

Unhandled promise rejection: Error: Secure random number generation is not supported by this browser. #13

Open RgonzalezSLC opened 1 year ago

RgonzalezSLC commented 1 year ago

When it tried to log out, it shows me the error.

at node_modules\randombytes\browser.js:null in oldBrowser
at node_modules\@walletconnect\randombytes\dist\cjs\node\index.js:null in randomBytes
at node_modules\@walletconnect\iso-crypto\dist\esm\index.js:null in generateKey
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in asyncGeneratorStep
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in _next
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in Promise$argument_0
at node_modules\promise\setimmediate\core.js:null in tryCallTwo
at node_modules\promise\setimmediate\core.js:null in doResolve
at node_modules\promise\setimmediate\core.js:null in Promise
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in <anonymous>
at node_modules\@walletconnect\iso-crypto\dist\esm\index.js:null in <global>
at node_modules\@walletconnect\iso-crypto\dist\esm\index.js:null in generateKey
at node_modules\@walletconnect\iso-crypto\dist\esm\index.js:null in encrypt
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in asyncGeneratorStep
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in _next
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in Promise$argument_0
at node_modules\promise\setimmediate\core.js:null in tryCallTwo
at node_modules\promise\setimmediate\core.js:null in doResolve
at node_modules\promise\setimmediate\core.js:null in Promise
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in <anonymous>
at node_modules\@walletconnect\iso-crypto\dist\esm\index.js:null in <global>
at node_modules\@walletconnect\iso-crypto\dist\esm\index.js:null in encrypt
at node_modules\@walletconnect\client\node_modules\@walletconnect\core\dist\esm\index.js:null in Connector#_encrypt
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in asyncGeneratorStep
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in _next
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in Promise$argument_0
at node_modules\promise\setimmediate\core.js:null in tryCallTwo
at node_modules\promise\setimmediate\core.js:null in doResolve
at node_modules\promise\setimmediate\core.js:null in Promise
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in <anonymous>
at node_modules\@walletconnect\client\node_modules\@walletconnect\core\dist\esm\index.js:null in Connector
at node_modules\@walletconnect\client\node_modules\@walletconnect\core\dist\esm\index.js:null in Connector#_sendRequest
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in asyncGeneratorStep
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in _next
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in Promise$argument_0
at node_modules\promise\setimmediate\core.js:null in tryCallTwo
at node_modules\promise\setimmediate\core.js:null in doResolve
at node_modules\promise\setimmediate\core.js:null in Promise
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in <anonymous>
at node_modules\@walletconnect\client\node_modules\@walletconnect\core\dist\esm\index.js:null in Connector
at node_modules\@walletconnect\client\node_modules\@walletconnect\core\dist\esm\index.js:null in Connector#killSession
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in asyncGeneratorStep
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in _next
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in Promise$argument_0
at node_modules\promise\setimmediate\core.js:null in tryCallTwo
at node_modules\promise\setimmediate\core.js:null in doResolve
at node_modules\promise\setimmediate\core.js:null in Promise
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in <anonymous>
at node_modules\@walletconnect\client\node_modules\@walletconnect\core\dist\esm\index.js:null in Connector
at src\views\Login.tsx:null in killSession
at node_modules\react-native\Libraries\Pressability\Pressability.js:null in _performTransitionSideEffects
at node_modules\react-native\Libraries\Pressability\Pressability.js:null in _receiveSignal
at node_modules\react-native\Libraries\Pressability\Pressability.js:null in responderEventHandlers.onResponderRelease
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:null in invokeGuardedCallbackProd
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:null in invokeGuardedCallback
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:null in invokeGuardedCallbackAndCatchFirstError
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:null in executeDispatch
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:null in executeDispatchesInOrder
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:null in executeDispatchesAndRelease
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:null in forEachAccumulated
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:null in runEventsInBatch
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:null in runExtractedPluginEventsInBatch
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:null in batchedUpdates$argument_0
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:null in batchedUpdates$1
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:null in batchedUpdates
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:null in _receiveRootNodeIDEvent
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:null in receiveTouches
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:null in __callFunction
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:null in __guard$argument_0
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:null in __guard
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:null in callFunctionReturnFlushedQueue
RgonzalezSLC commented 1 year ago

These are my dependencies:

{
 "dependencies": {
    "@expo/vector-icons": "^13.0.0",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-navigation/bottom-tabs": "^6.0.5",
    "@react-navigation/native": "^6.1.6",
    "@react-navigation/native-stack": "^6.9.12",
    "@types/react": "~18.0.24",
    "@types/react-native": "~0.70.6",
    "@walletconnect/react-native-compat": "^2.4.6",
    "@walletconnect/react-native-dapp": "^1.8.0",
    "@walletconnect/sign-client": "^2.4.6",
    "base-64": "^1.0.0",
    "crypto-browserify": "^3.12.0",
    "expo": "~47.0.12",
    "expo-asset": "~8.7.0",
    "expo-constants": "~14.0.2",
    "expo-font": "~11.0.1",
    "expo-linear-gradient": "~12.0.1",
    "expo-linking": "~3.3.1",
    "expo-splash-screen": "~0.17.5",
    "expo-status-bar": "~1.4.2",
    "expo-web-browser": "~12.0.0",
    "https-browserify": "^1.0.0",
    "native-base": "^3.4.26",
    "node-libs-react-native": "^1.2.1",
    "os-browserify": "^0.3.0",
    "path-browserify": "^1.0.1",
    "react": "18.1.0",
    "react-dom": "18.1.0",
    "react-native": "0.70.8",
    "react-native-crypto": "^2.2.0",
    "react-native-get-random-values": "^1.8.0",
    "react-native-randombytes": "^3.6.1",
    "react-native-safe-area-context": "4.4.1",
    "react-native-screens": "~3.18.0",
    "react-native-tcp": "^4.0.0",
    "react-native-web": "~0.18.9",
    "readable-stream": "^3.6.0",
    "stream-http": "^3.2.0",
    "typescript": "^4.6.3",
    "vm-browserify": "^1.1.2",
    "xml2js": "^0.4.23"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@types/xml2js": "^0.4.11",
    "typescript": "~4.3.5"
  },
}