Expo 26 - pb with android - attempt to invoke virtual methode int java.lang.String.hashCode() on a null object

Hi,

I updated from expo 25 to 26.
I have an app. On IOS it’s still work just fine.
But I have an error on my android device when I’m trying to login :
‘Attempt to invoke virtual method ‘int java.lang.String.hasCode()’ on a null object reference’

Does anyone know what can I do ?

Thanks

2 Likes

Hard to say without more context about where it’s being thrown and why. Maybe Android is catching an underlaying error that it used to ignore :woman_shrugging: Is this being invoked from any particular API?

I got this after upgrade to expo 26. Seems to be related to marker images for maps. I only get this for android standalone build:

--------- beginning of crash
04-01 18:49:38.444 31343 31343 E AndroidRuntime: FATAL EXCEPTION: main
04-01 18:49:38.444 31343 31343 E AndroidRuntime: Process: com.NeighborWatch.NeighborWatch, PID: 31343
04-01 18:49:38.444 31343 31343 E AndroidRuntime: java.lang.RuntimeException: com.google.maps.api.android.lib6.common.apiexception.b: Failed to decode image. The provided image must be a Bitmap.
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at abi26_0_0.com.facebook.react.bridge.ReactContext.handleException(ReactContext.java:313)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at abi26_0_0.com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:33)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at abi26_0_0.com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:136)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at abi26_0_0.com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:107)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:909)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:723)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:655)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:790)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6494)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: Caused by: com.google.maps.api.android.lib6.common.apiexception.b: Failed to decode image. The provided image must be a Bitmap.
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at com.google.maps.api.android.lib6.impl.n.a(com.google.android.gms.DynamiteModulesB@12221440@12.2.21 (440-188803320):12)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at com.google.maps.api.android.lib6.impl.o.a(com.google.android.gms.DynamiteModulesB@12221440@12.2.21 (440-188803320):7)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at com.google.maps.api.android.lib6.impl.db.(com.google.android.gms.DynamiteModulesB@12221440@12.2.21 (440-188803320):25)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at com.google.maps.api.android.lib6.impl.bc.a(com.google.android.gms.DynamiteModulesB@12221440@12.2.21 (440-188803320):496)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at com.google.android.gms.maps.internal.l.onTransact(com.google.android.gms.DynamiteModulesB@12221440@12.2.21 (440-188803320):94)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at android.os.Binder.transact(Binder.java:627)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at com.google.android.gms.maps.a.b$a$a.a(Unknown Source:28)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at com.google.android.gms.maps.c.a(Unknown Source:2)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at abi26_0_0.host.exp.exponent.modules.api.components.maps.AirMapMarker.addToMap(AirMapMarker.java:297)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at abi26_0_0.host.exp.exponent.modules.api.components.maps.AirMapView.addFeature(AirMapView.java:481)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at abi26_0_0.host.exp.exponent.modules.api.components.maps.AirMapManager.addView(AirMapManager.java:350)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at abi26_0_0.host.exp.exponent.modules.api.components.maps.AirMapManager.addView(AirMapManager.java:27)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at abi26_0_0.com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren(NativeViewHierarchyManager.java:311)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at abi26_0_0.com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute(UIViewOperationQueue.java:180)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at abi26_0_0.com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:822)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at abi26_0_0.com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:929)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at abi26_0_0.com.facebook.react.uimanager.UIViewOperationQueue.access$2100(UIViewOperationQueue.java:47)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at abi26_0_0.com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:989)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: at abi26_0_0.com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:31)
04-01 18:49:38.444 31343 31343 E AndroidRuntime: … 13 more

You can test how the app will run in prod by running exp start --no-dev --minify this should surface better errors for you

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.