[Android] [expo-analytics-segment] ExponentSegment: Method addObserver must be called on the main thread
See original GitHub issueSummary
Hello,
When I try to initialize Segment, I receive this error :
[Unhandled promise rejection: Error: Encountered an exception while calling native method: Exception occurred while executing exported method initialize on module ExponentSegment: Method addObserver must be called on the main thread]
This has been tested with Expo Go on Android device.
Cheers 😄
Managed or bare workflow? If you have ios/
or android/
directories in your project, the answer is bare!
managed
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
41.0.1
Environment
Expo CLI 4.5.2 environment info: System: OS: macOS 11.2.3 Shell: 5.8 - /bin/zsh Binaries: Node: 14.16.1 - /var/folders/k6/cqlnsz8x0756r83kbyb0s2700000gp/T/fnm-shell-5389680/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.12 - /var/folders/k6/cqlnsz8x0756r83kbyb0s2700000gp/T/fnm-shell-5389680/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.1 - /Users/colisweb/.rvm/gems/jruby-9.2.13.0/bin/pod SDKs: iOS SDK: Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2 IDEs: Android Studio: 3.5 AI-191.8026.42.35.5791312 Xcode: 12.4/12D4e - /usr/bin/xcodebuild npmPackages: expo: ~41.0.1 => 41.0.1 react: 16.13.1 => 16.13.1 react-dom: 16.13.1 => 16.13.1 react-native: https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz => 0.63.2 react-native-web: ~0.13.12 => 0.13.18 npmGlobalPackages: expo-cli: 4.5.2 Expo Workflow: managed
Reproducible demo or steps to reproduce from a blank project
Issue Analytics
- State:
- Created 2 years ago
- Reactions:12
- Comments:33 (10 by maintainers)
Top GitHub Comments
Hi! Any chances to get this working on Expo 41? I believe that it has been fixed here https://github.com/expo/expo/pull/13263
Any updates on this? Observing the same issue on android, no Segment events are being registered as a result