Expo Analytics not working

  1. SDK Version: 39.0.0
  2. Platforms(Android/iOS/web/all): Android
  3. Libraries( “expo-firebase-core”: “~1.2.0”, “expo-firebase-analytics”: “~2.5.0”)

I’m trying to integrate firebase analytics into my app. I followed the docs and set it up. it’s working fine on Expo client which is based on web but it doesn’t work when I build the APK. Android logs says:

07-24 21:48:42.974 9577 9577 I FirebaseInitProvider: FirebaseApp initialization successful
07-24 21:48:42.967 9577 9577 W firebase-iid-ex: type=1400 audit(0.0:115951): avc: denied { read } for name=“u:object_r:vendor_displayfeature_prop:s0” dev=“tmpfs” ino=26707 scontext=u:r:untrusted_app:s0:c37,c257,c512,c768 tcontext=u:object_r:vendor_displayfeature_prop:s0 tclass=file permissive=0
07-24 21:48:43.003 9577 9608 V FA : Deferring to Google Analytics for Firebase for event data collection. https://goo.gl/J1sWQy
07-24 21:48:43.210 9577 9607 I FA : App measurement initialized, version: 22048
07-24 21:48:43.210 9577 9607 I FA : To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
07-24 21:48:43.210 9577 9607 I FA : Faster debug mode event logging enabled. To disable, run:
07-24 21:48:43.210 9577 9607 I FA : adb shell setprop debug.firebase.analytics.app .none.
07-24 21:48:43.218 9577 9607 W FA : Failed to retrieve Firebase Instance Id
07-24 21:48:43.246 9577 9607 W FA : Failed to retrieve Firebase Instance Id
07-24 21:48:43.260 9577 9607 I FA : Tag Manager is not found and thus will not be used
07-24 21:48:43.273 9577 9607 W FA : Failed to retrieve Firebase Instance Id

I tried to use the following code to get runtime firebase configuration:

console.log(FirebaseCore.DEFAULT_APP_OPTIONS);

and the log:

07-24 21:48:46.767 9577 9706 I ReactNativeJS: { storageBucket: null,
07-24 21:48:46.767 9577 9706 I ReactNativeJS: messagingSenderId: ‘’,
07-24 21:48:46.767 9577 9706 I ReactNativeJS: appId: ‘1:300000000000:android:0000000000000000’,
07-24 21:48:46.767 9577 9706 I ReactNativeJS: apiKey: ‘’,
07-24 21:48:46.767 9577 9706 I ReactNativeJS: projectId: ‘’,
07-24 21:48:46.767 9577 9706 I ReactNativeJS: trackingId: ‘’,
07-24 21:48:46.767 9577 9706 I ReactNativeJS: databaseURL: ‘https://test-do-not-use.firebaseio.com’ }

Then for each time that I trigger analytics log event, this log is displayed:

07-24 21:48:49.056 9577 9607 W FA : Failed to retrieve Firebase Instance Id
07-24 21:48:49.056 9577 9607 W FA : Failed to retrieve Firebase Instance Id
07-24 21:48:49.056 9577 9607 W FA : Failed to retrieve Firebase Instance Id
07-24 21:48:49.056 9577 9607 W FA : Failed to retrieve Firebase Instance Id

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.