Skip to content

[Bug]: Android fatal NullPointerException during MapView.onCreate with bundled Navigation SDK 7.6.1 #627

Description

@RayanMoarkech

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

We are seeing a production Android fatal crash during map initialization. The crash is entirely inside the Google Navigation SDK native internals and happens from MapView.onCreate.

The package version we are using is @googlemaps/react-native-navigation-sdk@0.16.3, which currently bundles Android Navigation SDK 7.6.1.

Google Navigation SDK for Android 7.8.0 release notes mention a fix for a crash during map initialization on first launch after upgrading from Maps SDK to Navigation SDK:

https://developers.google.com/maps/documentation/navigation/android-sdk/release-notes

There is already PR #621 to upgrade Android Navigation SDK to 7.7.0, but this specific crash appears to require 7.8.0.

iOS Platform

Not affected

Android Platform

Affected

React Native version

0.86.0

React version

19.2.3

Package version

0.16.3

Native SDK versions

  • I haven't changed the version of the native SDKs

React Native Doctor Output

Not available right now. This is an Expo app on Expo SDK 57 / React Native 0.86.0.

Steps to reproduce

This is production-only / timing-dependent so far, but the crash happens while initializing the map provider / map view.

Observed flow:

  1. Launch the Android app.
  2. App loads screens that initialize the map provider.
  3. Native MapView.onCreate is called.
  4. App crashes before JS can recover.

Expected vs Actual Behavior

Expected:
The map initializes normally and the app remains alive.
Actual:
The app crashes with an uncaught native Android NullPointerException.

Code Sample

Stack Trace

Fatal Exception: java.lang.NullPointerException:
Attempt to invoke interface method
'boolean com.google.android.libraries.navigation.internal.py.d.y()'
on a null object reference

  at b in PG [Line 28]
  at ay in PG [Line 44]
  at bf in PG [Line 2]
  at a in dex-id-0802816734cee420a618dc06b33bedb699e181b5 [Line 1]
  at a in PG [Line 3]
  at b in PG [Line 3]
  at b in PG [Line 1]
  at a in PG [Line 2]
  at m in PG [Line 5]
  at o in PG [Line 6]
  at b in PG [Line 1]
  at onCreate in PG [Line 4]
  at onCreate in MapView.java [Line 207]
  at onStateChanged in DefaultLifecycleObserverAdapter.kt [Line 24]
  at dispatchEvent in LifecycleRegistry.jvm.kt [Line 313]
  at addObserver in LifecycleRegistry.jvm.kt [Line 191]

Additional Context

OS: Android 16
Device: Samsung SM-S928B
App architecture: React Native new architecture / Fabric
Expo SDK: 57
@googlemaps/react-native-navigation-sdk: 0.16.3
Android Navigation SDK resolved by package: 7.6.1

For local investigation, forcing the Android dependency to com.google.android.libraries.navigation:navigation:7.8.0 resolves Gradle dependency selection, but it requires the newer Android build toolchain mentioned by Google:
AGP 8.13.2
Navigation SDK 7.8.0
desugar 2.1.5
Because PR #621 currently upgrades only to 7.7.0, could the package upgrade Android Navigation SDK directly to 7.8.0 so apps can receive the map initialization crash fix?

Metadata

Metadata

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions