Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google-maps: GMapView.camera throws Fatal error: Unexpectedly found nil #2117

Open
ngmiduc opened this issue May 26, 2024 · 1 comment
Open

Comments

@ngmiduc
Copy link

ngmiduc commented May 26, 2024

Bug Report

Plugin(s)

    "@capacitor/google-maps": "^5.4.1"

Capacitor Version

💊   Capacitor Doctor  💊

Latest Dependencies:

  @capacitor/cli: 6.0.0
  @capacitor/core: 6.0.0
  @capacitor/android: 6.0.0
  @capacitor/ios: 6.0.0

Installed Dependencies:

  @capacitor/android: not installed
  @capacitor/cli: 5.0.4
  @capacitor/ios: 5.0.4
  @capacitor/core: 5.7.0

Platform(s)

IOS

  • IOS 15, Iphone SE (1) Emulator
  • IOS 14, Iphone SE (1) real device

Current Behavior

The app crashes when map sets camera after the map is created. Error is thrown from google maps plugin.
Also with other methods of the plugin the error is thrown:
eg.:

  • enableClustering

I haven't tested all methods.

Expected Behavior

App should not crash

Code Reproduction

Archive.zip

  • ionic cap add ios
  • npm install
  • add google API key to google-maps component file src/app/core/map/components/google-map/google-map.component.ts
  • ionic capacitor build ios
  • open xcode
  • download ios 15
  • create emulator SE(1) with IOS 15
  • run app

or

  • run against an older iPhone

Additional context:

I did some further debugging and found out that it may be related to this issue: #1366, where the map is not properly created and any operation will crash the app since there is no mapViewController.

With some of the comments on the other issue, I could partly create the map and the camera is working now. So I believe that the plugin fails to create the GMapView so that it is nil.

@singatias
Copy link

Same error, it works properly on the iphone 16 pro but not on the iphone 16 and I have no idea why

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants