tschoffelen / react-native-email-link

📭 Open an email client from React Native (for 'magic link' type functionality).
MIT License
394 stars 70 forks source link

Cannot read property 'compose' of null #106

Closed giacomoalonzi closed 2 years ago

giacomoalonzi commented 2 years ago

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?

tschoffelen commented 2 years ago

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

giacomoalonzi commented 2 years ago

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.

tschoffelen commented 2 years ago

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.