includable / react-native-email-link

📭 Open an email client from React Native (for 'magic link' type functionality).

Home Page:https://includable.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot read property 'compose' of null

giacomoalonzi opened this issue · comments

Hello there, I've implemented openComposer properly, on ios works fine, on android i got this error message:

Cannot read property 'compose' of null
at node_modules/react-native-email-link/src/android.js:57:9 in openComposer
at /tmp/hermes/staging/hermes/cmake/intlDebug/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:61:8 in tryCallTwo
at /tmp/hermes/staging/hermes/cmake/intlDebug/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:216:24 in doResolve
at /tmp/hermes/staging/hermes/cmake/intlDebug/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:82:13 in Promise
at node_modules/react-native-email-link/src/android.js:46:7 in openComposer
at src/screens/Profile.tsx:70:12 in onOpenComposer
at /tmp/hermes/staging/hermes/cmake/intlDebug/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:61:8 in tryCallTwo
at /tmp/hermes/staging/hermes/cmake/intlDebug/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:216:24 in doResolve
at /tmp/hermes/staging/hermes/cmake/intlDebug/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:82:13 in Promise
at src/screens/Profile.tsx:68:43 in onOpenComposer
at node_modules/react-native/Libraries/Pressability/Pressability.js:702:17 in _performTransitionSideEffects
at node_modules/react-native/Libraries/Pressability/Pressability.js:639:6 in _receiveSignal
- ... 21 more stack frames from framework internals

any hint?

The Android version of the library uses a native component. Make sure to rebuild the native app, that should work.

The Android version of the library uses a native component. Make sure to rebuild the native app, that should work.

what do you mean? I'm testing via expo go here.

That doesn't work unfortunately. There is custom native code needed on Android to open specific email apps using App Intents. See the Expo section in the README for more info. You'll need to compile the app yourself to test the Android side of the functionality.