numberformatexception facebook ads - android

I recently added facebook ads to my app. Till yesterday it was working fine but from today the app is crashing because of facebook ads.The stack trace is :
E/UncaughtException: java.lang.NumberFormatException: Invalid int: "false"
at java.lang.Integer.invalidInt(Integer.java:138)
at java.lang.Integer.parse(Integer.java:410)
at java.lang.Integer.parseInt(Integer.java:367)
at java.lang.Integer.parseInt(Integer.java:334)
at java.lang.Integer.valueOf(Integer.java:525)
at com.facebook.ads.internal.h.a(Unknown Source)
at com.facebook.ads.internal.h.h(Unknown Source)
at com.facebook.ads.internal.j.a.a(Unknown Source)
at com.facebook.ads.internal.j.a$b.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5276)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:911)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:706)
please help me solve this error

Related

ForwardingCookieHandler.java line 136

I am getting errors from Crashlytics, and I actually don't know how to resolve it ,can someone help me please.I am getting this error in firebase, actually from samsung mobile, I couldn't find how to reproduce it, or any information about it. I will be very grateful for any advice. Thank you in advance
Sorry for my English )
Fatal Exception: android.util.AndroidRuntimeException: android.content.pm.PackageManager$NameNotFoundException: com.google.android.webview
at android.webkit.WebViewFactory.getFactoryClass(WebViewFactory.java:174)
at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:109)
at android.webkit.CookieManager.getInstance(CookieManager.java:42)
at com.facebook.react.modules.network.ForwardingCookieHandler.getCookieManager(ForwardingCookieHandler.java:136)
at com.facebook.react.modules.network.ForwardingCookieHandler.get(ForwardingCookieHandler.java:53)
at com.facebook.react.modules.websocket.WebSocketModule.getCookie(WebSocketModule.java:392)
at com.facebook.react.modules.websocket.WebSocketModule.connect(WebSocketModule.java:100)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:151)
at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
at android.os.Looper.loop(Looper.java:135)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
at java.lang.Thread.run(Thread.java:818)
Caused by android.content.pm.PackageManager$NameNotFoundException: com.google.android.webview
at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:164)
at android.webkit.WebViewFactory.getFactoryClass(WebViewFactory.java:146)
at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:109)
at android.webkit.CookieManager.getInstance(CookieManager.java:42)
at com.facebook.react.modules.network.ForwardingCookieHandler.getCookieManager(ForwardingCookieHandler.java:136)
at com.facebook.react.modules.network.ForwardingCookieHandler.get(ForwardingCookieHandler.java:53)
at com.facebook.react.modules.websocket.WebSocketModule.getCookie(WebSocketModule.java:392)
at com.facebook.react.modules.websocket.WebSocketModule.connect(WebSocketModule.java:100)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:151)
at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
at android.os.Looper.loop(Looper.java:135)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
at java.lang.Thread.run(Thread.java:818)

Firebase real-time database error in Android Studio

This error happens when I click the category from which I expect to see all the categories from firebase where I put all the category names and pictures. I am a beginner of Android studio and not many solved issues can be found in the search on Google.
04-07 18:35:13.271 25281-25281/com.example.a2015015407.edenparkproject E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.a2015015407.edenparkproject, PID: 25281
com.google.firebase.database.DatabaseException: Invalid Firebase Database url specified
at com.google.android.gms.internal.zzepd.zzqj(Unknown Source)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
at com.example.a2015015407.edenparkproject.CategoryFragment.onCreate(CategoryFragment.java:41)
at android.support.v4.app.Fragment.performCreate(Fragment.java:2328)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1379)
at android.support.v4.app.FragmentTransition.addToFirstInLastOut(FragmentTransition.java:1188)
at android.support.v4.app.FragmentTransition.calculateFragments(FragmentTransition.java:1071)
at android.support.v4.app.FragmentTransition.startTransitions(FragmentTransition.java:115)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2379)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2337)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2244)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:702)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: java.net.URISyntaxException: Invalid scheme specified: Category
at com.google.android.gms.internal.zzepd.zzqj(Unknown Source)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
at com.example.a2015015407.edenparkproject.CategoryFragment.onCreate(CategoryFragment.java:41)
at android.support.v4.app.Fragment.performCreate(Fragment.java:2328)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1379)
at android.support.v4.app.FragmentTransition.addToFirstInLastOut(FragmentTransition.java:1188)
at android.support.v4.app.FragmentTransition.calculateFragments(FragmentTransition.java:1071)
at android.support.v4.app.FragmentTransition.startTransitions(FragmentTransition.java:115)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2379)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2337)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2244)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:702)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
From the error message, it looks like you're initializing Firebase with an invalid URL:
Invalid Firebase Database url specified
My guess is that you're calling getReferenceFromUrl("some/path"). To get a reference, instead call FirebaseDatabase.getInstance().getReference("some/path") as shown in the getting started page of the documentation.
Update: it looks like you need:
FirebaseDatabase.getInstance().getReference("Category")

Security Exception While upgrading play services version

Non-fatal Exception: java.lang.SecurityException: Unknown calling package name 'com.grofers.customerapp'.
at android.os.Parcel.readException(Parcel.java:1546)
at android.os.Parcel.readException(Parcel.java:1499)
at com.google.android.gms.common.internal.zzv$zza$zza.zza(Unknown Source)
at com.google.android.gms.common.internal.zzf.zzh(Unknown Source)
at com.google.android.gms.common.internal.zzf$zzi.zzg(Unknown Source)
at com.google.android.gms.common.internal.zzf$zzk.zzn(Unknown Source)
at com.google.android.gms.common.internal.zzf$zza.zzwZ(Unknown Source:1000)
at com.google.android.gms.common.internal.zzf$zze.zzxa(Unknown Source)
at com.google.android.gms.common.internal.zzf$zzd.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5422)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
Getting above exception in Fabric while after updating play services version.

GoogleSign in error only on Xiomi Devices

Using com.google.android.gms:play-services-auth:10.0.1 for google signin in android app and its not working on xiomi devices and on other devices its working.
Stacktrace :
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp/com.google.android.gms.auth.api.signin.internal.SignInHubActivity}: java.lang.IllegalStateException: Bad magic number for Bundle: 0xffff4f45
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2332)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2394)
at android.app.ActivityThread.access$800(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5276)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:911)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:706) Caused by java.lang.IllegalStateException: Bad magic number for Bundle: 0xffff4f45
at android.os.Parcel.readException(Parcel.java:1554)
at android.os.Parcel.readException(Parcel.java:1499)
at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:2441)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1500)
at android.app.Activity.startActivityForResult(Activity.java:3796)
at android.app.Activity.startActivityForResult(Activity.java:3757)
at android.support.v4.app.FragmentActivity.startActivityForResult(SourceFile:842)
at com.google.android.gms.auth.api.signin.internal.SignInHubActivity.zzj(Unknown Source)
at com.google.android.gms.auth.api.signin.internal.SignInHubActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:6041)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1109)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2285)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2394)
at android.app.ActivityThread.access$800(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5276)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:911)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:706)

FirebaseStorage.getInstance().getReference() crashes app

FirebaseStorage.getInstance().getReference() crashes the app. I have checked another similar post but that did not help as my google-services.json file is correctly downloaded from FireBase API and the FireBase assistant shows connection and status as 'OK'.
here's the log:
A/FirebaseApp: Firebase API initialization failure.
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.google.firebase.FirebaseApp.zza(Unknown Source)
at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1737)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1712)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:6487)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6082)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6022)
at android.app.ActivityThread.access$1700(ActivityThread.java:211)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1766)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6946)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal .os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal .os.ZygoteInit.main(ZygoteInit.java:1199)
Caused by: java.lang.NoSuchMethodError: No static method getNoBackupFilesDir(Landroid/content/Context;)Ljava/io/File; in class Lcom/google/android/gms/common/util/zzx; or its super classes (declaration of 'com.google.android.gms.common.util.zzx' appears in /data /data /com.example.bhrigu.simpleblog/files/instant-run/dex/slice-com.google.android.gms-play-services-basement-10.0.0_c06534ef2c8c0d287af412696f22ee66b12bcbfa-classes.dex)
at com.google.firebase.iid.zzg.zzkg(Unknown Source)
There was indeed a conflict with the google-play version. Initially, I had used version 9.2.0 for Firebase libraries as I was getting errors with 10.0.0. However fixing the google-play version seems to have taken care of those ones as well. And I am able to run with all the updated libraries.

Categories

Resources