Firebase C++ Android Crash in Create() method.

2,052 views
Skip to first unread message

syl

unread,
May 19, 2016, 4:16:47 PM5/19/16
to Firebase Google Group
Hello !

I am very new to firebase. It seems to crash very early. This is C++, Android, using ndk-build but no gradle.
Something is not clear, because I have not equivalent with ndk-build to the gradle "depencies { compile 'com.google.firebase:firebase-ads:9.0.0' }"

My code :

 
 
// Create the Firebase app.
 
App* app = App::Create(AppOptions(), get_jni_env(), activity);




The "get_jni_env()" is correct since I already use it at some other place.
The activity seem also correct ...



ABI
: 'arm'
pid
: 25251, tid: 25281, name: SDLThread  >>> my.new.app <<<
signal
6 (SIGABRT), code -6 (SI_TKILL), fault addr --------

   r0
00000000  r1 000062c1  r2 00000006  r3 dcb35978
   r4 dcb35980  r5 dcb35930  r6
00000058  r7 0000010c
   r8
0010057e  r9 00000000  sl df976500  fp de6569f8
   ip
00000006  sp dcb339c0  lr f7046365  pc f7048754  cpsr 400e0010

backtrace
:
   
#00 pc 00042754  /system/lib/libc.so (tgkill+12)
#01 pc 00040361  /system/lib/libc.so (pthread_kill+32)
#02 pc 0001ca9b  /system/lib/libc.so (raise+10)
#03 pc 00019d19  /system/lib/libc.so (__libc_android_abort+34)
#04 pc 0001755c  /system/lib/libc.so (abort+4)
#05 pc 00079b5b  /data/app/my.new.app/lib/arm/libmain.so (firebase::util::FindClassGlobal(_JNIEnv*, _jobject*, std::vector<firebase::util::EmbeddedFile, std::allocator<firebase::util::EmbeddedFile> > const*, char const*)+102)
#06 pc 00076fa9  /data/app/my.new.app/lib/arm/libmain.so (firebase::app::CacheClassFromFiles(_JNIEnv*, _jobject*, std::vector<firebase::util::EmbeddedFile, std::allocator<firebase::util::EmbeddedFile> > const*)+16)
#07 pc 00077005  /data/app/my.new.app/lib/arm/libmain.so (firebase::app::CacheMethodIds(_JNIEnv*, _jobject*)+4)
#08 pc 000780af  /data/app/my.new.app/lib/arm/libmain.so (firebase::App::Create(firebase::AppOptions const&, char const*, _JNIEnv*, _jobject*)+70)
#09 pc 00071e7b  /data/app/my.new.app/lib/arm/libmain.so (init_firebase+402)
#10 pc 00069a93  /data/app/my.new.app/lib/arm/libmain.so (MyApp::MyApp()+558)
#11 pc 000578e7  /data/app/my.new.app/lib/arm/libmain.so (Create_main+38)
#12 pc 00075717  /data/app/my.new.app/lib/arm/libmain.so (Java_org_Activity_Init+230)
#13 pc 0027bbd9  /data/app/my.new.app/oat/arm/base.odex (offset 0x1d6000)


If something is missing, it should tell it ...

Thanks for you help



syl

unread,
May 20, 2016, 3:14:29 AM5/20/16
to Firebase Google Group
I have studied the sample code: https://github.com/firebase/quickstart-cpp

One big difference is that the sample code use the native_glue code to create the android activity, whereas I use some java code to create the activity.
Don't know whether this can be an issue or not.

Maybe Firebase team could add a sample for this use-case to make sure this works :/
That is: create a JavaApp that calls a C++ function to start Firebase.

My code still crahes:

I saw the GetActivity() is getting the "clazz" member.

      /**
       * The NativeActivity object handle.
       *
       * IMPORTANT NOTE: This member is mis-named. It should really be named
       * 'activity' instead of 'clazz', since it's a reference to the
       * NativeActivity instance created by the system for you.
       *
       * We unfortunately cannot change this without breaking NDK
       * source-compatibility.
       */

      jobject clazz
;

Is this "jobject" reference equivalent to getting the "this" pointer of my instance of subclass of android.app.Activity ?
I mean doing something in java:

public class MainActivity extends Activity
{
     
protected static MainActivity mSingletonMainActivity = null;
     
public static MainActivity getMainActivity() {
       
return mSingletonMainActivity;
     
}
 
     
public MainActivity()
     
{
        mSingletonMainActivity
= this;
       
...
     
}

My C++ code calls, with jni, the "getMainActivity()". Then, make it as a "NewGlobalRef" and send it to App::Create()

Cheers.







Cheers.

syl

unread,
May 20, 2016, 4:28:47 AM5/20/16
to Firebase Google Group
More investigation.

My jni function to start firebase was called from a thread started out from the java Activity. (The app is actually a native EGL APP, using a java SurfaceView, with need to run on a thread aside).

I move the firebase code to a native function that is called, from onCreate / onResume (I tried both), but I got exactly the same exception.

Cheers.

Stewart Miles

unread,
May 20, 2016, 11:43:53 AM5/20/16
to Firebase Google Group
Hi again, the assert you're seeing is due to not including the required Google Play Services module.  If you take a look through logcat you'll likely see a message like "Unable to find <CLASS>.  Please verify the AAR which contains the <CLASS> class is included in your app.".

In order to use Firebase you need to include the AARs (e.g com.google.firebase:firebase-ads:9.0.0) required by the set of C++ libraries you're using in your app, you'll find the full set of dependencies on https://firebase.google.com/docs/cpp/setup#dependencies_1 and if you have proguard enabled you'll also need to follow instructions here https://firebase.google.com/docs/cpp/setup#additional_information

Since you're packaging up an APK and you're not using Gradle, I'm guessing you're using Ant.  I'm afraid building with Ant has been deprecated by the Android Tools group so you'll either have to change your build system to Gradle (very easy if you have only a little bit of Java) or suffer some pain as described in http://stackoverflow.com/questions/23777423/aar-in-eclipse-ant-project .  If you do go down the path of manually including AARs into an Ant project you'll need to make sure all AndroidManifest.xml files are merged into your application's AndroidManifest.xml otherwise either things won't work at all or you'll see broken behavior.  AARs are located under <ANDROID_SDK_DIR>/extras/google/m2repository/com/google/firebase/firebase-* for example android-sdk-macosx/extras/google/m2repository/com/google/firebase/firebase-ads/9.0.0/firebase-ads-9.0.0.aar after you're run the Android SDK Manager and installed / updated "Google Play Services".

Good luck,
Stewart

syl

unread,
May 21, 2016, 4:35:30 PM5/21/16
to Firebase Google Group
Hello,

Many thanks for your help !
So I switched to gradle 2.10 + ndk-build plugin and got admob working with firebase.
I basically re-used the "build.gradle" file from the cpp quickstart, + the gradle wrapper 2.10.
Only had to configure it to look for the "assets", java "src" dir, signing, installing, etc.


Few minor things to report:
- I didn't saw the message you mentioned "Unable to find <CLASS>". Only something like "firebase local class" ...

- If I call my firebase/admob C++ function directly from the java Activity, it crashes because of "banner_view->Show();".
  So, I call my firebase/admob C++ function from the thread beside (which created from the Activity) and it seems to work fine.
  This is a difference to my old code. Before the Activity was creating directly the Admob view + loading the ad. Don't know if this could lead to an issue...

- At some point, I got a crash in LoadAd because I left the "AdRequest" un-initialized (not zero-ed).
(I have no specific information to fill inside the AdRequest).
I was expecting some default constructor. But in fact this not a class, but a structure.
Maybe, it would be better to upgrade this structure to a class, with a real constructor.

Thanks

syl

unread,
May 22, 2016, 11:29:03 AM5/22/16
to Firebase Google Group
A few more things ...

- It seems to me my .APK is not requiring three more permissions:
   android.permission.WAKE_LOCK
   com.google.android.c2dm.permission.RECEIVE
   net.my.app.permission.C2D_MESSAGE
   Is this normal ?

- Previously, my Java Admob code was preventing a display bug (first ad not appearing) by setting the background color as transparent: adView.setBackgroundColor(Color.TRANSPARENT);
  Don't know if this issue still exists, or if there is something equivalent you would know about that ?

- It would be nice to have a setting for AdSize, so that the width fills exactly 100% of the screen.

- Bug on a Samsung Tab S8:
  Even if I move the banner view to (0,0), it appears y-shifted. Of a size exactly of the status bar (which is hidden in this case).
  Seems to be a regression compare to previous version of admob (e.g. rev 29, vs rev 30+firebase) ...

Cheers











syl

unread,
May 23, 2016, 2:52:28 AM5/23/16
to Firebase Google Group
And also :

On a older device, that has not the Google-Play-Services installed. (nexus 7 tablet, android 5).
There was a not ad displayed and the non fatal exception in the log cat :

W/Ads     (10741): Failed to instantiate ClientApi class.
W
/Ads     (10741): java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.internal.ClientApi" on path: DexPathList[[zip file "/data/app/org.my.app/base.apk"],nativeLibraryDirectories=[/data/app/org.my.app/lib/arm, /vendor/lib, /system/lib]]
W/Ads     (10741):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
W/Ads     (10741):     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
W/Ads     (10741):     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
W/Ads     (10741):     at com.google.android.gms.ads.internal.client.ae.a(Unknown Source)
W/Ads     (10741):     at com.google.android.gms.ads.internal.client.ae.b(Unknown Source)
W/Ads     (10741):     at com.google.android.gms.ads.internal.client.ae.a(Unknown Source)
W/Ads     (10741):     at com.google.android.gms.ads.internal.client.al.c(Unknown Source)
W/Ads     (10741):     at com.google.android.gms.ads.internal.client.ae.a(Unknown Source)
W/Ads     (10741):     at com.google.android.gms.ads.internal.client.ae.a(Unknown Source)
W/Ads     (10741):     at com.google.android.gms.ads.internal.client.zzae.o(Unknown Source)
W/Ads     (10741):     at com.google.android.gms.ads.internal.client.zzae.n(Unknown Source)
W/Ads     (10741):     at com.google.android.gms.ads.internal.client.zzae.a(Unknown Source)
W/Ads     (10741):     at com.google.android.gms.ads.c.loadAd(Unknown Source)
W/Ads     (10741):     at com.google.android.gms.ads.AdView.loadAd(Unknown Source)
W/Ads     (10741):     at com.google.firebase.admob.internal.cpp.BannerViewHelper$3.run(BannerViewHelper.java:213)
W/Ads     (10741):     at android.os.Handler.handleCallback(Handler.java:739)
W/Ads     (10741):     at android.os.Handler.dispatchMessage(Handler.java:95)
W/Ads     (10741):     at android.os.Looper.loop(Looper.java:135)
W/Ads     (10741):     at android.app.ActivityThread.main(ActivityThread.java:5221)
W/Ads     (10741):     at java.lang.reflect.Method.invoke(Native Method)
W/Ads     (10741):     at java.lang.reflect.Method.invoke(Method.java:372)
W/Ads     (10741):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
W/Ads     (10741):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
W/Ads     (10741):     Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.ads.internal.ClientApi
W/Ads     (10741):         at java.lang.Class.classForName(Native Method)
W/Ads     (10741):         at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
W/Ads     (10741):         at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
W/Ads     (10741):         at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
W/Ads     (10741):         ... 21 more
W/Ads     (10741):     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
W/Ads     (10741): ClientApi class cannot be loaded.
E/Ads     (10741): This app is using a lightweight version of the Google Mobile Ads SDK that requires the latest Google Play services to be installed, but Google Play services is either missing or out of date.


That could be solved :
- either by installing the google-play-services on the device
- removing minify from the gradle.build
- adding the proguard setting :

-keep public class com.google.android.gms.ads.** {
         
public *;
}

Maybe this last one should also be present by default in the "lib/android/admob.pro" file ?










Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

syl

unread,
May 23, 2016, 4:38:08 AM5/23/16
to Firebase Google Group
Some trouble to post entirely this message, so I will remove the formatting.


Sorry to dump all my issue in the same thread but here's another one, with half a solution :

I have an old phone with android 2.3.4. This is a custom rom.

The ad does not displayed and it crashed after calling admob "banner->Show()".
There is a fatal Java exception:

-----------
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil: Cannot find Google Play services package name.
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil: android.content.pm.PackageManager$NameNotFoundException: com.google.android.gms
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at android.app.ContextImpl$ApplicationPackageManager.getPackageInfo(ContextImpl.java:1854)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at com.google.android.gms.internal.act.b(Unknown Source)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at com.google.android.gms.common.r.k(Unknown Source)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at com.google.android.gms.common.r.j(Unknown Source)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at com.google.android.gms.common.r.i(Unknown Source)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at com.google.android.gms.common.r.a(Unknown Source)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at com.google.android.gms.common.j.a(Unknown Source)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at com.google.android.gms.ads.identifier.AdvertisingIdClient.a(Unknown Source)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at com.google.android.gms.ads.identifier.AdvertisingIdClient.a(Unknown Source)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at com.google.android.gms.ads.identifier.AdvertisingIdClient.getAdvertisingIdInfo(Unknown Source)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at com.google.android.gms.measurement.internal.bu.a(Unknown Source)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at com.google.android.gms.measurement.internal.bu.b(Unknown Source)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at com.google.android.gms.measurement.internal.zzx.c(Unknown Source)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at com.google.android.gms.measurement.internal.zzx.b(Unknown Source)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at com.google.android.gms.measurement.internal.cs.run(Unknown Source)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:444)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil:     at com.google.android.gms.measurement.internal.cf.run(Unknown Source)
06-10 16:49:02.828  3838  3845 W GooglePlayServicesUtil: Google Play services is missing.
06-10 16:49:03.117  3838  3851 D dalvikvm: GetMethodID: method not found: Landroid/app/Activity;.getCodeCacheDir:()Ljava/io/File;
06-10 16:49:03.117  3838  3851 W System.err: java.lang.NoSuchMethodError: getCodeCacheDir
06-10 16:49:03.117  3838  3851 W System.err:     at net.my.app.o.run(Unknown Source)
06-10 16:49:03.117  3838  3851 W System.err:     at java.lang.Thread.run(Thread.java:1019)

06-10 16:49:03.124  3838  3851 W dalvikvm: dvmFindClassByName rejecting 'com/google/firebase/app/internal/cpp/Log'
06-10 16:49:03.124  3838  3851 W dalvikvm: dvmFindClassByName rejecting 'com/google/firebase/app/internal/cpp/Log'
06-10 16:49:03.124  3838  3851 W dalvikvm: dvmFindClassByName rejecting 'com/google/firebase/app/internal/cpp/JniResultCallback'
06-10 16:49:03.124  3838  3851 W dalvikvm: dvmFindClassByName rejecting 'com/google/firebase/app/internal/cpp/JniResultCallback'

06-10 16:49:03.124  3838  3851 I firebase: firebase::App initializing app net.my.app (default 1).

06-10 16:49:03.132  3838  3851 W dalvikvm: dvmFindClassByName rejecting 'com/google/firebase/admob/internal/cpp/AdRequestHelper'
06-10 16:49:03.132  3838  3851 W dalvikvm: dvmFindClassByName rejecting 'com/google/firebase/admob/internal/cpp/AdRequestHelper'
06-10 16:49:03.140  3838  3851 W dalvikvm: dvmFindClassByName rejecting 'com/google/firebase/admob/internal/cpp/AdRequestHelper'
06-10 16:49:03.140  3838  3851 W dalvikvm: dvmFindClassByName rejecting 'com/google/firebase/admob/internal/cpp/InterstitialAdHelper'
06-10 16:49:03.140  3838  3851 W dalvikvm: dvmFindClassByName rejecting 'com/google/firebase/admob/internal/cpp/InterstitialAdHelper'
06-10 16:49:03.140  3838  3851 W dalvikvm: dvmFindClassByName rejecting 'com/google/firebase/admob/internal/cpp/InterstitialAdHelper'
06-10 16:49:03.140  3838  3851 W dalvikvm: dvmFindClassByName rejecting 'com/google/firebase/admob/internal/cpp/BannerViewHelper'
06-10 16:49:03.140  3838  3851 W dalvikvm: dvmFindClassByName rejecting 'com/google/firebase/admob/internal/cpp/BannerViewHelper'
06-10 16:49:03.140  3838  3851 W dalvikvm: dvmFindClassByName rejecting 'com/google/firebase/admob/internal/cpp/BannerViewHelper'

06-10 16:49:03.156  3838  3851 I dalvikvm: Could not find method android.view.Display.getSize, referenced from method com.google.firebase.admob.internal.cpp.BannerViewHelper.updatePopUpLocation
06-10 16:49:03.156  3838  3851 W dalvikvm: VFY: unable to resolve virtual method 4: Landroid/view/Display;.getSize (Landroid/graphics/Point;)V
06-10 16:49:03.156  3838  3851 D dalvikvm: VFY: replacing opcode 0x6e at 0x0039
06-10 16:49:03.156  3838  3851 D dalvikvm: VFY: dead code 0x003c-006e in Lcom/google/firebase/admob/internal/cpp/BannerViewHelper;.updatePopUpLocation ()V
06-10 16:49:03.164  3838  3838 D AndroidRuntime: Shutting down VM
06-10 16:49:03.164  3838  3838 W dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x40018560)
06-10 16:49:03.171  3838  3838 E AndroidRuntime: FATAL EXCEPTION: main
06-10 16:49:03.171  3838  3838 E AndroidRuntime: java.lang.NoSuchMethodError: android.view.Display.getSize
06-10 16:49:03.171  3838  3838 E AndroidRuntime:     at com.google.firebase.admob.internal.cpp.BannerViewHelper.updatePopUpLocation(BannerViewHelper.java:449)
06-10 16:49:03.171  3838  3838 E AndroidRuntime:     at com.google.firebase.admob.internal.cpp.BannerViewHelper.access$1000(BannerViewHelper.java:25)
06-10 16:49:03.171  3838  3838 E AndroidRuntime:     at com.google.firebase.admob.internal.cpp.BannerViewHelper$5.run(BannerViewHelper.java:268)
06-10 16:49:03.171  3838  3838 E AndroidRuntime:     at android.os.Handler.handleCallback(Handler.java:587)
06-10 16:49:03.171  3838  3838 E AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:92)
06-10 16:49:03.171  3838  3838 E AndroidRuntime:     at android.os.Looper.loop(Looper.java:130)
06-10 16:49:03.171  3838  3838 E AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:3806)
06-10 16:49:03.171  3838  3838 E AndroidRuntime:     at java.lang.reflect.Method.invokeNative(Native Method)
06-10 16:49:03.171  3838  3838 E AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:507)
06-10 16:49:03.171  3838  3838 E AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
06-10 16:49:03.171  3838  3838 E AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
06-10 16:49:03.171  3838  3838 E AndroidRuntime:     at dalvik.system.NativeStart.main(Native Method)
06-10 16:49:03.179  1393  1546 W ActivityManager:   Force finishing activity net.my.app.MainActivity
----------


It appears the banner was not even displaying with my previous -no firebase- apk. So let's forget about this point.

But the fact Admob could crash is annoying.
More over, the "InitializeLastResult().Error()" was admob::kAdMobErrorNone.

My issue is that it would be really nice if admob were not raising Java Fatal Exception at all.


(NB: it appears the crash can be prevented by explicitly calling "banner->MoveTo(0, 0)" before the "banner->Show()".)





Stewart Miles

unread,
May 23, 2016, 11:10:37 AM5/23/16
to fireba...@googlegroups.com
I'll try to provide responses to your comments, please let me know if I miss anything.

"If I call my firebase/admob C++ function directly from the java Activity, it crashes because of "banner_view->Show();".
  So, I call my firebase/admob C++ function from the thread beside (which created from the Activity) and it seems to work fine.
  This is a difference to my old code. Before the Activity was creating directly the Admob view + loading the ad. Don't know if this could lead to an issue..."

Could you clarify what you're doing here.  It would be great if you could share some code.  For all methods that require interaction with UI we should be spawning a runnable that is executed on the UI thread.  It's possible you've run across a bug here or maybe you're doing something we didn't expect.

"- At some point, I got a crash in LoadAd because I left the "AdRequest" un-initialized (not zero-ed).
(I have no specific information to fill inside the AdRequest).
I was expecting some default constructor. But in fact this not a class, but a structure.
Maybe, it would be better to upgrade this structure to a class, with a real constructor. "

AdRequest is intentionally a struct, we expect users to either use a few static const instances of the structure to form requests (which means it will be zero'd on module load) or memset() then populate.

"- It seems to me my .APK is not requiring three more permissions: 
   android.permission.WAKE_LOCK
   com.google.android.c2dm.permission.RECEIVE
   net.my.app.permission.C2D_MESSAGE
   Is this normal ?"

You shouldn't need these permissions what is leading you to that conclusion?

com.google.android.c2dm.permission.RECEIVE and net.my.app.permission.C2D_MESSAGE for example are required by Firebase Cloud Messaging and IID.

"Previously, my Java Admob code was preventing a display bug (first ad not appearing) by setting the background color as transparent: adView.setBackgroundColor(Color.TRANSPARENT);"

I'll forward to the AdMob team for a response.

" It would be nice to have a setting for AdSize, so that the width fills exactly 100% of the screen."

You can get the size of the screen in pixels so you can just set the width of the Ad to that size.  We've intentionally kept the API as simple as possible.

"Bug on a Samsung Tab S8:
  Even if I move the banner view to (0,0), it appears y-shifted. Of a size exactly of the status bar (which is hidden in this case).
  Seems to be a regression compare to previous version of admob (e.g. rev 29, vs rev 30+firebase) ..."

I'll forward to the AdMob team for a response.

"On a older device, that has not the Google-Play-Services installed. (nexus 7 tablet, android 5)."

You need the latest Google-Play-Services installed to use Firebase.  Google-Play-Services hosts the implementation of all Firebase (and Google) APIs, each time you use a new client SDK if you exercise new functionality you'll need a new Google-Play-Services on the device.

"I have an old phone with android 2.3.4. This is a custom rom.

The ad does not displayed and it crashed after calling admob "banner->Show()".
There is a fatal Java exception:"

As mentioned before, you need to be running the latest Google-Play-Services to use Firebase.




--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/a9ae3d81-3902-4ff2-844b-f89daa2d2eb1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Andrew Brogdon

unread,
May 23, 2016, 11:56:29 AM5/23/16
to Firebase Google Group
AdMob developer relations checking in. I recognize your email from our Android forum!

"Previously, my Java Admob code was preventing a display bug (first ad not appearing) by setting the background color as transparent: adView.setBackgroundColor(Color.TRANSPARENT);"

If your first request is valid, but doesn't result in a properly loaded ad, that's something that should be investigated. Are you using a different ad unit than the other requests, or anything else that would differentiate them?

"- At some point, I got a crash in LoadAd because I left the "AdRequest" un-initialized (not zero-ed).
(I have no specific information to fill inside the AdRequest).
I was expecting some default constructor. But in fact this not a class, but a structure.
Maybe, it would be better to upgrade this structure to a class, with a real constructor. "

We considered a bunch of options for AdRequest and went with a struct in the end because it's essentially a blob of data used in the calls to LoadAd. If you don't have any specific request data that you need, just zero it out with memset. You're free to re-use a single struct in multiple calls, as well.

" It would be nice to have a setting for AdSize, so that the width fills exactly 100% of the screen."

We're looking into whether to include the smart banner size in the C++ API. We weren't sure if game devs would rather just center the ad and draw any extra padding to the left and right themselves.

"Bug on a Samsung Tab S8:
  Even if I move the banner view to (0,0), it appears y-shifted. Of a size exactly of the status bar (which is hidden in this case).
  Seems to be a regression compare to previous version of admob (e.g. rev 29, vs rev 30+firebase) ..."

Do you mind sharing some details about your activity setup? For example, are you using a NativeActivity, and if not, what does your Activity layout/manifest entry look like?

Thanks!

-Andrew

syl

unread,
May 23, 2016, 12:48:42 PM5/23/16
to Firebase Google Group

On Monday, May 23, 2016 at 5:10:37 PM UTC+2, Stewart Miles wrote:
I'll try to provide responses to your comments, please let me know if I miss anything.

"If I call my firebase/admob C++ function directly from the java Activity, it crashes because of "banner_view->Show();".
  So, I call my firebase/admob C++ function from the thread beside (which created from the Activity) and it seems to work fine.
  This is a difference to my old code. Before the Activity was creating directly the Admob view + loading the ad. Don't know if this could lead to an issue..."

Could you clarify what you're doing here.  It would be great if you could share some code.  For all methods that require interaction with UI we should be spawning a runnable that is executed on the UI thread.  It's possible you've run across a bug here or maybe you're doing something we didn't expect.


King of hard to share to some code ... I can detailed my explanation though :

My app consists in an Activity, which creates a SurfaceView, and also creates a Java Thread that executes a JNI function (my C++App).
This C++App is an EGL App.

Previously (without firebase), AdMob was set up in the onCreate of the Java Activity. Creating the view, adding the view to the layout and loading the ad.

I was expecting to do the same to use firebase/admob. Calling a C++ "Start_Firebase_Admob()" function *from* this onCreate() method. But it crashed in banner->show().

I moved "Start_Firebase_Admob()" so that it's now called from the C++App. (so, not anymore from the Activity.onCreate(), but from the thread beside). And it worked.

This is my use case ...


"- At some point, I got a crash in LoadAd because I left the "AdRequest" un-initialized (not zero-ed).
(I have no specific information to fill inside the AdRequest).
I was expecting some default constructor. But in fact this not a class, but a structure.
Maybe, it would be better to upgrade this structure to a class, with a real constructor. "

AdRequest is intentionally a struct, we expect users to either use a few static const instances of the structure to form requests (which means it will be zero'd on module load) or memset() then populate.


Answered to Andrew Brogdon

"- It seems to me my .APK is not requiring three more permissions: 
   android.permission.WAKE_LOCK
   com.google.android.c2dm.permission.RECEIVE
   net.my.app.permission.C2D_MESSAGE
   Is this normal ?"

You shouldn't need these permissions what is leading you to that conclusion?

com.google.android.c2dm.permission.RECEIVE and net.my.app.permission.C2D_MESSAGE for example are required by Firebase Cloud Messaging and IID.

Just noticed this difference when publishing an alpha version of my APK under google developer console. Don't know if it's important.

"Previously, my Java Admob code was preventing a display bug (first ad not appearing) by setting the background color as transparent: adView.setBackgroundColor(Color.TRANSPARENT);"

I'll forward to the AdMob team for a response.
 
Answered to Andrew Brogdon


" It would be nice to have a setting for AdSize, so that the width fills exactly 100% of the screen."

You can get the size of the screen in pixels so you can just set the width of the Ad to that size.  We've intentionally kept the API as simple as possible.

Answered to Andrew Brogdon


"Bug on a Samsung Tab S8:
  Even if I move the banner view to (0,0), it appears y-shifted. Of a size exactly of the status bar (which is hidden in this case).
  Seems to be a regression compare to previous version of admob (e.g. rev 29, vs rev 30+firebase) ..."

I'll forward to the AdMob team for a response.
 
Answered to Andrew Brogdon
 

"On a older device, that has not the Google-Play-Services installed. (nexus 7 tablet, android 5)."

You need the latest Google-Play-Services installed to use Firebase.  Google-Play-Services hosts the implementation of all Firebase (and Google) APIs, each time you use a new client SDK if you exercise new functionality you'll need a new Google-Play-Services on the device.

I agree. But:
- the google-play-service is something downloaded from the app store. It is not installed by default on Android 5.0 Nexus 7 (2012) for instance. (Once it is installed it cannot be removed).
  My old tablet N7 did not have google-play-service.
  It crashed with an APK compiled with ProGuard, but It could be solved by adding some extra "keep configuration" about (com.google.android.gms.ads.**).
  I have many users, and statistically some of them have for sure their tablet not up-to-date. I mean with no google-play-service.
  So, It seems to me this ProGuard line is beneficial. Is this correct ? 
  If so, it should be added to the default admob proguard file. (e.g. /lib/android/admob.pro) ?


"I have an old phone with android 2.3.4. This is a custom rom.

The ad does not displayed and it crashed after calling admob "banner->Show()".
There is a fatal Java exception:"

As mentioned before, you need to be running the latest Google-Play-Services to use Firebase.

 
This is issue is a little bit different. I agree Google-Play-Services should be used. I use this ROM+Phone because the device is deprecated to have official ROM and this is my way to test on old android 2.3.4.
In this case, no admob should be displayed.
My issue is there is a crash in admob banner->show(). And this could be avoided by only calling MoveTo(0,0);
Anyway, I have a fix for it ... But in case you would have a look at the crash you would have the opportunity make the lib more robust.


Thanks your help and the many answers !

syl

unread,
May 23, 2016, 12:51:09 PM5/23/16
to Firebase Google Group
Hello,

Yes, It submitted some AdMob-only issue there.

On Monday, May 23, 2016 at 5:56:29 PM UTC+2, Andrew Brogdon wrote:
AdMob developer relations checking in. I recognize your email from our Android forum!

"Previously, my Java Admob code was preventing a display bug (first ad not appearing) by setting the background color as transparent: adView.setBackgroundColor(Color.TRANSPARENT);"

If your first request is valid, but doesn't result in a properly loaded ad, that's something that should be investigated. Are you using a different ad unit than the other requests, or anything else that would differentiate them?

On Android Admob forum, this was a long thread about this issue "first banner is not shower, but others do".
This workaround was solving the issue. Don't know if something is needed now with firebase. I have seen any issue so far.
 


"- At some point, I got a crash in LoadAd because I left the "AdRequest" un-initialized (not zero-ed).
(I have no specific information to fill inside the AdRequest).
I was expecting some default constructor. But in fact this not a class, but a structure.
Maybe, it would be better to upgrade this structure to a class, with a real constructor. "

We considered a bunch of options for AdRequest and went with a struct in the end because it's essentially a blob of data used in the calls to LoadAd. If you don't have any specific request data that you need, just zero it out with memset. You're free to re-use a single struct in multiple calls, as well.

Ok. It would be more helpful to have a function to initialize AdRequest ... But it's not a big deal neither.
My natural first attempt was to write :

admob::AdRequest request;
banner->LoadAd(request);

And it crashed because the structure is no zero-ed by default. Now I fixed it :)
 
" It would be nice to have a setting for AdSize, so that the width fills exactly 100% of the screen."

We're looking into whether to include the smart banner size in the C++ API. We weren't sure if game devs would rather just center the ad and draw any extra padding to the left and right themselves.

Ok. Again that would have been a helper setting.
I would personnaly try to set the ad full-width.

By the way, there is an issue on my S7 : setting the adsize to full width does not go full-width.
(I set the full width as the width reported in the logcat when it exceeds the with..)

I reported some similar with Smart_Banners a few week ago ..


"Bug on a Samsung Tab S8:
  Even if I move the banner view to (0,0), it appears y-shifted. Of a size exactly of the status bar (which is hidden in this case).
  Seems to be a regression compare to previous version of admob (e.g. rev 29, vs rev 30+firebase) ..."

Do you mind sharing some details about your activity setup? For example, are you using a NativeActivity, and if not, what does your Activity layout/manifest entry look like?


Hmm. Fore sure I clearly saw the bug when I reported it. But I am not able to reproduce it anymore. Although nothing has changed in my app code. Only playing around with admob function.
(some details of my activity in my previous mail).

Thanks!

-Andrew


Thanks for your help !
Message has been deleted
Message has been deleted

tactical hoceky

unread,
May 25, 2016, 12:37:17 PM5/25/16
to fireba...@googlegroups.com
Hello,

Here's a sample Java app calling C++Firebase Admob.
With no EGL, only a plain activity.

When C++Firebase is call from the Java Activity it crashes in "banner->Show()".
When it's called from a Thread, this works.

Cheers.


--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/GZsXftJA3BE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
proj_test_admob_java.tar.gz

Andrew Brogdon

unread,
May 27, 2016, 10:36:47 AM5/27/16
to Firebase Google Group
Thanks, that's really helpful! I'll add your sample project to our issue report for this and try to get it resolved.

-Andrew

syl

unread,
May 31, 2016, 8:20:46 AM5/31/16
to Firebase Google Group
You're welcome !

Please don't miss my other issues, especially this one for which I have no workaround :
I can't put the Ad full-width.
- When I compute the max size myself, admob displays no ad and it logs a warning message in the logcat, about size being exceeded.
- When I re-use the max size from the logcat warning message, the ad is not full width but around 90%.

It reinforces the idea that the max width could be retrieved from admob/firebase library :
- either a value to set the ad to max-width
- or a function to get the max-width.
So that the responsability of the max-width belongs to firebase library!

Cheers


 

syl

unread,
May 31, 2016, 1:20:29 PM5/31/16
to Firebase Google Group
I have already put an app to production with firebase, and that seemed to be ok.
So, I decided to put another one, which has one more degree of users.

After a few hours, I received on the android developer console, the stack trace below.

Seems to be Android 4.4, on a Galaxy Tab Pro 10.1 (picasso wifi).

#00 pc 000222d0 /system/lib/libc.so (tgkill+12)
#01 pc 000130dd /system/lib/libc.so (pthread_kill+48)
#02 pc 000132f1 /system/lib/libc.so (raise+10)
#03 pc 00012027 /system/lib/libc.so
#04 pc 00021b84 /system/lib/libc.so (abort+4)
#05 pc 00137eef /mnt/asec/net.my.app-5/lib/libmyapp.so (firebase::util::FindClassGlobal(_JNIEnv*, _jobject*, std::vector<firebase::util::EmbeddedFile, std::allocator<firebase::util::EmbeddedFile> > const*, char const*)+102)
#06 pc 00138053 /mnt/asec/net.game.mahjong-5/lib/libmyapp.so (firebase::util::log::CacheClassFromFiles(_JNIEnv*, _jobject*, std::vector<firebase::util::EmbeddedFile, std::allocator<firebase::util::EmbeddedFile> > const*)+14)
#07 pc 00138ae9 /mnt/asec/net.my.app-5/lib/libmyapp.so (firebase::util::Initialize(_JNIEnv*, _jobject*)+340)
#08 pc 00136453 /mnt/asec/net.my.app-5/lib/libmyapp.so (firebase::App::Create(firebase::AppOptions const&, char const*, _JNIEnv*, _jobject*)+62)


Of course, I cannot reproduce the issue ...
The stack trace looks like my first post. But this is slightly different, this one is in "Initialize" whereas the first one was in "cacheMethodIds".

Any idea ?

Thanks

Stewart Miles

unread,
Jun 1, 2016, 1:52:06 PM6/1/16
to fireba...@googlegroups.com
Great news that you were able to get an app out with Firebase.

The stack trace suggests that Google Play Services isn't up to date on the device which is very strange since the user should be prompted for an update.  Are there any more details beyond the stack trace you can share?

Cheers,
Stewart

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

syl

unread,
Jun 2, 2016, 4:38:22 AM6/2/16
to Firebase Google Group
No more details .. This stack trace gets reported into my android developer console, and it can't be reproduced.

I can send you the whole stack trace privately if want to look at everything!
There are 7 crashs reported currently, all in "firebase::App::Create". Seems very few.

Thanks,
Sylvain

Stewart Miles

unread,
Jun 2, 2016, 11:39:29 AM6/2/16
to Firebase Google Group
It makes me wonder whether we're seeing failures due to devices not being upgraded to the latest Google Play Services.  It would be great if you could send along the complete crash dump privately if you don't mind.

Cheers,
Stewart

tactical hoceky

unread,
Jun 2, 2016, 12:17:19 PM6/2/16
to fireba...@googlegroups.com
I sent an email ... let me know it arrives to you !
Cheers,
Sylvain


--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/GZsXftJA3BE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

Stewart Miles

unread,
Jun 6, 2016, 1:55:51 PM6/6/16
to fireba...@googlegroups.com
It worked its way over to me on Friday, I finally got to have a look this morning.  I think the issue we're seeing is a Google Play Services capable device that doesn't have the latest version required to use Firebase.

Looking at the stack traces the issue looks like it's in the C++ layer's initialization process.  I've opened a ticket to track and fix this internally for our next release.  In the meantime, you'll be fine on all devices that are updated to the latest Google Play Services which is a majority of devices.

Thanks for the stack traces.  Very useful :)

Cheers,
Stewart

syl

unread,
Jun 7, 2016, 2:21:34 AM6/7/16
to Firebase Google Group
Good news!

In the meantimes, I got also some new crash reports. (might be duplicate or other things ...)
Maybe the faster, should be that you got access to my google developer console to see the crash reports when needed ..
Cheers,
Sylvain

Quick short copy-paste:
1)
backtrace:
#00 pc 00001040 <unknown>
#01 pc 002b2c17 /data/app/com.google.android.webview-1/lib/arm/libwebviewchromium.so

2)
(android::uirenderer::renderthread::RenderThread::threadLoop()+66)
#04 pc 0000ef55 /system/lib/libutils.so (android::Thread::_threadLoop(void*)+112)
#05 pc 0005f8d9 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+72)
#06 pc 0000eac5 /system/lib/libutils.so
#07 pc 00012f33 /system/lib/libc.so (__pthread_start(void*)+30)
#08 pc 00010ff7 /system/lib/libc.so (__start_thread+6)

3)
#05 pc 00137eef /data/app-lib/net.game.app-2/libmain.so (firebase::util::FindClassGlobal(_JNIEnv*, _jobject*, std::vector<firebase::util::EmbeddedFile, std::allocator<firebase::util::EmbeddedFile> > const*, char const*)+102)
#06 pc 00138053 /data/app-lib/net.game.app-2/libmain.so (firebase::util::log::CacheClassFromFiles(_JNIEnv*, _jobject*, std::vector<firebase::util::EmbeddedFile, std::allocator<firebase::util::EmbeddedFile> > const*)+14)
#07 pc 00138ae9 /data/app-lib/net.game.app-2/libmain.so (firebase::util::Initialize(_JNIEnv*, _jobject*)+340)
#08 pc 00136453 /data/app-lib/net.game.app-2/libmain.so (firebase::App::Create(firebase::AppOptions const&, char const*, _JNIEnv*, _jobject*)+62

syl

unread,
Jun 7, 2016, 11:57:35 AM6/7/16
to Firebase Google Group
Stewart, Andrew,

Also, can you confirm me that you notice (and have in your bug-tracker) this issue of maximal AdMob width:

When I try to set my Ad to full width, it gets rejected with an error message in the "log cat" something like "Maximal size must be w * h".
If I set my Ad to this very "w", the ad appears, but it's *not* full-width. Only around 90% maybe.

It's not a Portrait vs Landscape, but more something like "Width with status bar" versus "Width without status bar")
Phone is a S7edge, in Landscape.

Solutions:
- for me the best solution would be to accept a parameter "full_width", so that I don't need to compute the width and just put the Ad full width.
- another solution would be to have a function to get the "full_width" value in pixel), so that I am sure that the width I set will be accepted by AdMob. (avoiding potential rounding issue because of the scale..).
- last solution, would be nothing :) just fix the issue. But what happens this is not 100% fixed :/ ?  Maybe an error code?

Cheers,
Sylvain







 

Andrew Brogdon

unread,
Jun 10, 2016, 11:58:03 AM6/10/16
to Firebase Google Group
When you tried setting your ad to be full width, was it using the FULL_WIDTH constant seen here?


If so, I'll make a test case for it and see what happens. Right now, I think we're using just the standard banner sizes (320x50, medium rectangle, etc.) in our testing.

The plan as we move forward on the API is to add things like Full Width to the list of ad size types, so you can have one list of constants. In my head, the code will look like this:

AdSize size;
size.ad_size_type = admob::kAdSizeFullWidth;
size.height = 50;
/* size.width ignored. */

-Andrew

syl

unread,
Jun 10, 2016, 12:07:56 PM6/10/16
to Firebase Google Group
I am using the C++ API with Firebase, and there is no such constant ! (firebase cpp sdk 1.0.0)

cf admob/types.h :
  enum AdSizeType { kAdSizeStandard = 0 };

I use
    // Create an AdSize and initialize the g_banner view
    admob::AdSize ad_size;
    ad_size.ad_size_type = admob::kAdSizeStandard;
    ad_size.width =  val;  // I put a value, but never got the full width
    ad_size.height = 50;

Any solution is fine ...
a type admob::kAdSizeFullWidth 
would be perfect (for me) !

Cheers,
Sylvain

Andrew Brogdon

unread,
Jun 13, 2016, 4:11:44 PM6/13/16
to Firebase Google Group
Thanks for the info. I think we'll probably end up with a separate ad size for this with a new constant, so keep an eye out for it as we roll out new versions!

-Andrew

syl

unread,
Jun 23, 2016, 3:56:06 AM6/23/16
to Firebase Google Group
... I keep an eye for a new firebase cpp sdk release, but I am not sure where to look :)
would be nice to have a "release" page. (there ? https://firebase.google.com/docs/cpp/setup )

Jacob Wenger

unread,
Jun 23, 2016, 1:00:00 PM6/23/16
to fireba...@googlegroups.com
You can follow release notes for all of our libraries here. If you are on Twitter, @FirebaseRelease also tweets out when libraries are updated, although I don't think our C++ release process is set up to tweet just yet.

Cheers,
Jacob

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.

Stewart Miles

unread,
Jun 27, 2016, 7:36:50 PM6/27/16
to fireba...@googlegroups.com
Hi Syl,

As Jacob mentioned, we announce our releases on: 

a new release (1.0.1) went out today

We *think* we've resolved this issue (and quite a few others) by forcing the user to update Google Play Services on their device if it's out of date.  Please let us know how it works out.

Cheers,
Stewart

syl

unread,
Jun 28, 2016, 3:40:23 AM6/28/16
to Firebase Google Group
Hello Stewart,

Thanks for the answer ! I have just downloaded the cpp sdk 1.0.1, on an old device with cyanogen android 2.3.3 that did not have google service,
It actually asked for downloading google play services, and after installing, it worked.
It also shows the ads!

Thanks,
Sylvain

Stewart Miles

unread,
Jun 28, 2016, 12:10:24 PM6/28/16
to fireba...@googlegroups.com
Excellent, we're glad this worked out for you.  Please let us know if you run into any other problems.

Cheers,
Stewart

syl

unread,
Jun 29, 2016, 5:03:12 PM6/29/16
to Firebase Google Group
A little issue is that I use Pre-Launch report of the developer console.
And pretty much all test fail with this log cat message:

06-29 13:36:46.248: W/GooglePlayServicesUtil(22350): Google Play services out of date.  Requires 9256000 but found 9083238
06-29 13:36:46.249: E/firebase(22350): Google Play services unavailable, firebase::App::Create() failed.

(and then, crash in (firebase::analytics::LogEvent(..))

So the Pre-Launch report can be used whereas this is really important to have it...

Cheers,
Sylvain

Stewart Miles

unread,
Jun 29, 2016, 5:15:30 PM6/29/16
to fireba...@googlegroups.com
Hi Sylvain,

Looking at your log output I think a couple of issues are going on here:
  • I *think* Play Test Lab devices haven't been upgrade to the latest Play Services - I've contacted the team to find out what's going on here.
  • You're not retrying the process of app creation in your application.  Since we changed the API when Google Play Services is not up to date, if the user decides to not update Google Play Services the application needs to either redisplay the dialog or quit gracefully rather than proceeding which will inevitably lead to a crash.
    See https://github.com/firebase/quickstart-cpp/blob/master/analytics/testapp/src/common_main.cc#L30 for an example of how to just wait for the user to upgrade Play Services.
Cheers,
Stewart

syl

unread,
Jun 30, 2016, 1:57:07 AM6/30/16
to Firebase Google Group
Hello Stewart,

Yes, you right I need to implement something in case the Google Play Services is not updated (I was about to do it :)). Thanks for the link !

About the Play Test Lab,
- I think, it's good if they keep some device with old Google Play Services, so that it helps to spot issues !
- With previous version of Firebase CPP SDK, the Ads was working, so it means that Google Play Services didn't need to be the most up-to-date.
  Maybe, Firebase could requires a lower minimal version of Google Play Services ? (something lower than 9256000, maybe even lower than 9083238)

Cheers,
Sylvain

Stewart Miles

unread,
Jun 30, 2016, 11:09:06 AM6/30/16
to fireba...@googlegroups.com
We don't push a new Google Play services SDK (client libraries) until the service (APK) has rolled out to almost all devices.  So the happy path is for a device to be up to date and if it isn't then we force the user to update.

The issue right now with the Play Test Lab is that the latest Firebase SDK built with and requires the latest Google Play services which should be fine as all devices should be updated :)  Play Test Lab team are currently on a solution.

In the meantime if you want to ship and have Play Test Lab tests pass you could roll back to building with the previously released Firebase AARs (Android specific component).  e.g in your build.gradle, change com.google.firebase:firebase-ads:9.2.0 from to com.google.firebase:firebase-ads:9.0.2 .  You'll need to do this across all firebase components that you're including.

Cheers,
Stewart 

tactical hoceky

unread,
Jul 1, 2016, 6:29:23 AM7/1/16
to fireba...@googlegroups.com
Not sure that I understand everything :) I just hope it's fine to put some .apk in production with latest version of 9.2.0 and firebase cpp sdk 1.0.1

Just started a few new runs on Play Test Lab, and it seems there are no more the pop up of GMS displayed so it must have been updated ...
I just have two issues :

1) On a Samsung S6. screen remains black ! but the ad is displayed (a little bit shifted). I have a S5 and a S7 and that don't appear ... I am somehow wondering if this could not be a bug in Play Test Lab ... I have seen this issue doing several tests, always on S6...

2) On a Nexus 5. Ads won't load. and the landscape app seems to be displayed -rescaled- on portrait. On the video. But the screenshot is fine.

On a previous test it has worked. so maybe it's not an issue ...

I just put the log, if you want to have a look.

Nexus 5 / android 4.4 / armeabi-v7a / Locale ar /  Qualcomm / MSM8974

07-01 02:56:12.571: I/Ads(7804): Starting ad request.
07-01 02:56:12.571: I/Ads(7804): Use AdRequest.Builder.addTestDevice("312A0F87AFD6CF02218B741A27FAD24D") to get test ads on this device.
07-01 02:56:12.591: D/AppStreamingHelper(7804): Creating delegate
07-01 02:56:12.601: W/DynamiteLoaderImpl(7804): Failed to load module version: module com.google.android.gms.piccard.dynamite not found
07-01 02:56:12.601: D/GmsModuleFndr(7804): Staging file APK's and updating chimera config...
07-01 02:56:12.601: D/dalvikvm(7868): DexOpt: load 2ms, verify+opt 10ms, 191436 bytes
07-01 02:56:12.601: W/AppOps(773): Bad call: specified package com.google.android.gms under uid 10079 but it is really 10007
07-01 02:56:12.611: D/dalvikvm(7804): DexOpt: --- END '1460683162801.jar' (success) ---
07-01 02:56:12.611: D/dalvikvm(7804): DEX prep '/data/data/net.myapp/cache/1460683162801.jar': unzip in 0ms, rewrite 67ms
07-01 02:56:12.621: D/FileApkUtils(2614): Optimizing (staging complete)
07-01 02:56:12.621: D/FileApkUtils(2614): Optimizing: DynamiteModulesB_GmsCore_prod_xxhdpi_release.apk [0f774d6a66ca341f950b0accbc1ac9d1800200cae77bccf1849fc259e4e08fe1]
07-01 02:56:12.621: D/DexOptUtils(2614): Module /data/data/com.google.android.gms/app_chimera/m/00000001/DynamiteModulesB_GmsCore_prod_xxhdpi_release.apk is already optimized. Bailing.
07-01 02:56:12.621: D/FileApkUtils(2614): Optimizing: DynamiteModulesC_GmsCore_prod_xxhdpi_release.apk [20434fd97ef16a453142199e45c52c724a0e177d455c8510c6a4d187f327222d]
07-01 02:56:12.621: D/hf(7804):
 File /data/data/net.myapp/cache/1460683162801.dex not found. No need for deletion
07-01 02:56:12.621: D/DexOptUtils(2614): Module /data/data/com.google.android.gms/app_chimera/m/00000002/DynamiteModulesC_GmsCore_prod_xxhdpi_release.apk is already optimized. Bailing.
07-01 02:56:12.621: D/FileApkUtils(2614): Optimizing: DynamiteModulesA_GmsCore_prod_xxhdpi_release.apk [9c51a363a51961146d666edf68d19e873615f864ec35018587511d3567f52892]
07-01 02:56:12.621: D/DexOptUtils(2614): Module /data/data/com.google.android.gms/app_chimera/m/00000000
...
07-01 02:56:12.631: D/GmsModuleFndr(7804): Staging file APKs completed
07-01 02:56:12.631: W/DynamiteLoaderImpl(7804): Failed to load module version after staging: module com.google.android.gms.piccard.dynamite not found
07-01 02:56:12.631: W/DynamiteModule(7804): Local module descriptor class for com.google.android.gms.piccard.dynamite not found.
07-01 02:56:12.631: I/DynamiteModule(7804): Considering local module com.google.android.gms.piccard.dynamite:0 and remote module com.google.android.gms.piccard.dynamite:0
07-01 02:56:12.631: E/AppStreamingHelper(7804): No acceptable module found. Local version is 0 and remote version is 0.
07-01 02:56:12.731: D/OpenGLRenderer(7804): GL error from OpenGLRenderer: 0x502
07-01 02:56:12.731: E/OpenGLRenderer(7804):   GL_INVALID_OPERATION
07-01 02:56:12.731: I/QueryController(7715): Matched selector: UiSelector[] <<==>> [android.view.accessibility.AccessibilityNodeInfo@7447; boundsInParent: Rect(0, 0 - 1794, 1080); boundsInScreen: Rect(0, 0 - 1794, 1080); packageName: net.myapp; className: android.widget.FrameLayout; text: null; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; enabled: true; password: false; scrollable: false; [ACTION_SELECT, ACTION_CLEAR_SELECTION, ACTION_ACCESSIBILITY_FOCUS]]
07-01 02:56:12.731: D/AudioManagerAndroid(7804): ==> onReceive: s=1, m=0, n=h2w, sb=true
07-01 02:56:12.731: D/AudioManagerAndroid(7804): reportUpdate: state=3, devices=[Speakerphone, Wired headset]
---
07-01 02:56:23.251: W/Ads(7804): There was a problem getting an ad response. ErrorCode: 0
07-01 02:56:23.271: W/Ads(7804): Failed to load ad: 0
07-01 02:56:23.271: D/firebase(7804): (AdMobBv) load failed

Cheers,
Sylvain












--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/GZsXftJA3BE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

Justin Broughton

unread,
Jul 6, 2016, 2:44:21 PM7/6/16
to Firebase Google Group
Sylvain,

As you have already noticed we have fixed the PlayServices issue. We rolled out the change last week to Production. We are working on a solution to make sure that we automatically have the latest released PlayServices on all our devices. 

Sorry for the inconvenience and thank you for bringing this to our attention.

 -- Justin
Reply all
Reply to author
Forward
0 new messages