Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

Bug: Ad not working in android release build #72

Closed
1 of 2 tasks
ShivamJoker opened this issue Nov 25, 2021 · 10 comments
Closed
1 of 2 tasks

Bug: Ad not working in android release build #72

ShivamJoker opened this issue Nov 25, 2021 · 10 comments

Comments

@ShivamJoker
Copy link

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
@wjaykim
Copy link
Collaborator

wjaykim commented Nov 25, 2021

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.

@ShivamJoker
Copy link
Author

@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

@wjaykim
Copy link
Collaborator

wjaykim commented Nov 25, 2021

Did you changed the app id and ad unit ids to yours which are for production?

@ShivamJoker
Copy link
Author

ShivamJoker commented Nov 25, 2021

Yes I checked it multiple times to make sure it is same
Oh hold on my app id is not same

@ShivamJoker
Copy link
Author

image

image

Okay I fixed it cleaned rebuilt but still getting same error

@wjaykim
Copy link
Collaborator

wjaykim commented Nov 26, 2021

Did you try https://stackoverflow.com/a/41991172 this solution, just asking because it seems you uploaded app to google play.

@ShivamJoker
Copy link
Author

ShivamJoker commented Nov 26, 2021

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

@ShivamJoker
Copy link
Author

@wjaykim even after releasing the beta the ads doesn't show at all.

Is there anything I should check ?

@ShivamJoker
Copy link
Author

@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

@wjaykim
Copy link
Collaborator

wjaykim commented Dec 9, 2021

Glad you find the solution.😎

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants