firebase / firebase/firebase-android-sdk
sGTM Preview/Debug Not Working Reliably on Android While iOS Works with Identical Configuration
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 710
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 31
Description
### Describe your environment
```
Flutter firebase_analytics (Dart) | 12.4.1
Flutter firebase_core (Dart) | 4.9.0
Android firebase-analytics (resolved) | 23.2.0
Android play-services-measurement (resolved) | 23.2.0
Android play-services-tagmanager | 18.3.0 (latest)
Firebase BOM (declared) | 33.12.0
Google Services Plugin | 4.4.2
Android compileSdk / targetSdk / minSdk | 36 / 36 / 26
Google Play Services Dynamite Module | measurementdynamite@262532029@26.25.32
Test Device | Samsung SM-S908E, Android 14
```
### **AndroidManifest.xml:**
```
```
**### build.gradle**
```
implementation platform('com.google.firebase:firebase-bom:33.12.0')
implementation 'com.google.android.gms:play-services-tagmanager:18.3.0'
```
**### We have already attempted the following:**
- Uninstalled and reinstalled the application multiple times.
- Cleared Google Play Services data.
- Disabled Private DNS on the device.
- Tested on multiple Android devices with the same outcome.
- Confirmed that play-services-tagmanager:18.3.0 is the latest available version.
- Confirmed that firebase-analytics:23.2.0 is the version resolved by Gradle.
- Added Firebase BOM 33.12.0; no change in behavior.
- Verified that the GA4 data stream is configured with the correct sGTM endpoint.
- Verified that iOS works correctly using the same Firebase, GA4, and sGTM configuration.
### Describe the problem
We are unable to reliably see events in the sGTM Preview Mode for Android.
**Observed behavior:**
Preview mode connects successfully.
Occasionally, standard events such as click and screen_view appear intermittently.
Custom events do not appear consistently or are completely missing.
Event visibility is unreliable and inconsistent across test sessions.
The identical setup on iOS works perfectly, where all events appear in the sGTM Preview debugger in real time.
**Both platforms are configured with:**
Same Firebase project
Same GA4 property
Same sGTM server URL configured in the GA4 data stream
Same event implementation logic
We have attached the logs collected during testing for reference.
Given the impact on validation and debugging, we would appreciate the opportunity to schedule a call with your team to discuss and troubleshoot the issue.
Are there any known issues with Android Firebase Analytics 23.2.0 and sGTM Preview Mode?
Is the EOFException on 204 No Content responses a confirmed regression in the dynamite module versions listed above, and when is a fix expected?
#### Steps to reproduce:
Log attached.
[firebase_analytics_2.log](https://github.com/user-attachments/files/30501937/firebase_analytics_2.log)
#### Relevant Code:
**### Network_security_config file**
```
192.168.1.254
```
Contributor guide
Research direction
Start by reviewing firebase_analytics_2.log alongside the AndroidManifest.xml, build.gradle, and network security configuration shown in the report. Compare the Android Firebase Analytics 23.2.0 and sGTM preview setup with the working iOS configuration, focusing on the reported EOFException from 204 responses. Done means reproducing the unreliable event visibility and establishing whether it is a regression or configuration issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, dart, firebase, flutter, java
- Domain
- analytics, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100