Bug: Ad not working in android release build
ShivamJoker opened this issue · comments
Description
Hey the app seems to able to load ad in the development but after creating a release build the ad fails with the following error (from logcat)
11-24 17:32:26.174 3269 20885 I Ads : SDK version: afma-sdk-a-v213806999.213806000.1
11-24 17:32:26.176 3269 20885 I Ads : HTTP timeout: 60000 milliseconds.
11-24 17:32:26.440 1035 1130 E QMI_FW : qmi_cci_get_ref: ref count increased 2
11-24 17:32:26.440 1035 1130 D VSC : @ 18495.100: [WO] Proposed rotation: 4, flat angle threshold: 65
11-24 17:32:26.440 1035 1130 D VSC : @ 18495.100: [WO] orientation angle 333, orientation 4
11-24 17:32:26.440 1035 1130 E QMI_FW : qmi_cci_get_ref: ref count increased 2
11-24 17:32:26.440 1035 1130 D VSC : @ 18495.100: [WO] Gyro angle integrated: 11.260452
11-24 17:32:26.718 19773 20853 E FA : Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI
11-24 17:32:26.722 19773 19773 I Ads : Ad failed to load : 3
11-24 17:32:26.731 3269 3269 D BoundBrokerSvc: onBind: Intent { act=com.google.android.gms.measurement.START pkg=com.google.android.gms }
11-24 17:32:26.731 3269 3269 D BoundBrokerSvc: Loading bound service for intent: Intent { act=com.google.android.gms.measurement.START pkg=com.google.android.gms }
Expected behavior
The ad should show up in the release build of android as well
App source
https://github.com/ShivamJoker/SQL-Play/blob/master/src/component/App.tsx#L86
Package versions
- React Native: 0.66.1
- React Native AdMob: ^1.2.3
- Google Mobile Ads SDK(if specified):
- Xcode: 13.1
- Java & Gradle: Gradle 4.2.2
Affected platforms
- Android
- iOS
11-24 17:32:26.722 19773 19773 I Ads : Ad failed to load : 3
Also an ad error code 3 which is not cause of the library code.
@wjaykim I tried everything but I am not sure what to do ?
It doesn't work on emulator doesn't work on test device and doesn't work on real device which in another city
Did you changed the app id and ad unit ids to yours which are for production?
Yes I checked it multiple times to make sure it is same
Oh hold on my app id is not same
Did you try https://stackoverflow.com/a/41991172 this solution, just asking because it seems you uploaded app to google play.
Yes I already looked into it, I have app on the play store with the same config
I'll release in beta as well to test again
@wjaykim even after releasing the beta the ads doesn't show at all.
Is there anything I should check ?
@wjaykim turns out https://github.com/luggit/react-native-config was the culprit :( took so long to finally figure out why it wasn't working.
I had the fallback to test id if there is no platform specific id
anyways thanks a lot and sorry to trouble you because of silly mistake
Glad you find the solution.😎