WalletConnect / walletconnect-monorepo

WalletConnect Monorepo
Apache License 2.0
1.38k stars 680 forks source link

Expo app crashes on Android with error: no identifiers allowed after numeric literal #1306

Closed thevirinchi closed 1 year ago

thevirinchi commented 2 years ago

Describe the bug Expo application crashes on Android only. And does not return any stack. WhatsApp Image 2022-08-01 at 7 18 39 PM

SDK Version (if relevant)

To Reproduce Steps to reproduce the behavior:

  1. Create Expo app with expo version ~45.0.0
  2. Install @walletconnect/react-native-dapp
  3. Run on Android
  4. App crashes

Expected behavior App should run as it does in iOS.

Screenshots WhatsApp Image 2022-08-01 at 7 18 39 PM

Desktop (please complete the following information):

Smartphone (please complete the following information):

truongngodang commented 2 years ago

same bug

daniiba commented 1 year ago

Same bug. Any solutions?

markcutajar commented 1 year ago

Have encountered the same bug too

andrei0x309 commented 1 year ago

The issue stems from how you nodify the expo app, so it comes from node dependencies: In order to fix this use this lib: expo-crypto-polyfills

and this metro config:

const { getDefaultConfig } = require('expo/metro-config');

const config = getDefaultConfig(__dirname);
config.resolver.extraNodeModules = require('expo-crypto-polyfills');

module.exports = config;

and delete the rest of the polyfill packages

It should solve it.