Skip to content

[Bug]: [Android] GoogleMap() blank on first install when used alongside google_navigation_flutter 0.9.x on Samsung high-end devices #696

Description

@uranzev4

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

Description

When using google_maps_flutter alongside google_navigation_flutter 0.9.x,
the GoogleMap() widget renders blank on first app install on certain Samsung
devices. After killing and relaunching the app, the map renders correctly.

Affected Devices

  • Samsung Galaxy Z Fold series
  • Samsung Galaxy S Ultra series (S23 Ultra, S24 Ultra, etc.)

Not affected

  • Samsung Galaxy A20 series (slower devices work fine)
  • Samsung Galaxy Tab (fixed separately)

Package Versions

  • google_navigation_flutter: 0.9.2
  • google_maps_flutter: 2.13.1
  • google_maps_flutter_android: 2.18.12

Flutter Version

Flutter version

3.38.7

Package version

google_navigation_flutter: ^0.9.2

Native SDK versions

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

Flutter Doctor Output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.38.7, on macOS 15.6.1 24G90 darwin-arm64, locale en-MN)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 26.2)
[✓] Chrome - develop for the web
[✓] Connected device (4 available)
! Error: Browsing on the local area network for iPhone12 89287780. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
! Error: Browsing on the local area network for QA’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
! Error: Browsing on the local area network for QA iphone 15. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
! Error: Browsing on the local area network for iPhone Xs Max. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

• No issues found!

Steps to reproduce

Flutter 3.38.7 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 3b62efc2a3 (4 months ago) • 2026-01-13 13:47:42 -0800
Engine • hash 6f3039bf7c3cb5306513c75092822d4d94716003 (revision 78fc3012e4) (4 months ago) • 2026-01-07 18:42:12.000Z
Tools • Dart 3.10.7 • DevTools 2.51.1

Steps to Reproduce

  1. Fresh install the app on an affected Samsung device
  2. Navigate to any screen containing GoogleMap() widget
  3. Map renders blank / white

Expected vs Actual Behavior

Expected Behavior

Map renders correctly on first install.

Actual Behavior

Map is blank on first install. Works correctly after:

  • Killing the app and relaunching
  • OR reinstalling

Error Log

[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception:
PlatformException(error, Attempt to invoke interface method
'boolean com.google.android.libraries.navigation.internal.py.d.y()'
on a null object reference, null,
java.lang.NullPointerException: Attempt to invoke interface method
'boolean com.google.android.libraries.navigation.internal.py.d.y()'
on a null object reference
at com.google.android.gms.maps.internal.cs.b(PG:28)
at com.google.android.gms.maps.MapView.onCreate(PG:4)
at io.flutter.plugins.googlemaps.GoogleMapController.onCreate(GoogleMapController.java:462)
at io.flutter.plugins.googlemaps.GoogleMapController.init(GoogleMapController.java:193)
at io.flutter.plugins.googlemaps.GoogleMapBuilder.build(GoogleMapBuilder.java:43)
at io.flutter.plugins.googlemaps.GoogleMapFactory.create(GoogleMapFactory.java:56)

Code Sample

// Example code here

Additional Context

Root Cause Analysis

google_navigation_flutter 0.9.x upgraded the underlying Navigation SDK
which now takes strict ownership of the Maps SDK initialization. When
GoogleMap() mounts before NavigationApi finishes initializing its
internal state, it hits a null object reference inside the Navigation SDK.

This did NOT happen in google_navigation_flutter 0.8.x and earlier.

Workaround

Calling NavigationApi.getNavigator() in MainActivity.onCreate()
before Flutter engine starts partially helps, but does not fully resolve
the issue when Terms & Conditions dialog is shown on first install
(async acceptance delays SDK readiness).

Additional Context

  • Issue only occurs when BOTH google_maps_flutter and
    google_navigation_flutter are used in the same app
  • Faster devices (Samsung Ultra/Fold) are more affected because
    GoogleMap() mounts faster than the Navigation SDK can initialize
  • Slower devices (Samsung A20) are unaffected because Navigation SDK
    finishes initializing before the user navigates to the map screen
  • The official google_navigation_flutter README warns against using
    multiple packages with Google Maps dependencies, but does not provide
    a migration path for apps that need both GoogleMap() features
    (clustering, polyline animation) and navigation

Metadata

Metadata

Labels

priority: p0Highest priority. Critical issue. P0 implies highest priority.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions