ionic-team / ionic-team/capacitor-google-maps
google-maps: Fatal. Unexpectedly found nil while implicitly unwrapping an Optional value
- Dominant language
- TypeScript
- Stars
- 32
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Description
## Bug Report
### Plugin(s)
```
"@capacitor/google-maps": "^5.4.1"
```
### Capacitor Version
```
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/core: 5.7.0
@capacitor/ios: 5.0.4
```
### Platform(s)
IOS
### Current Behavior
```
CapacitorGoogleMaps/Map.swift:129: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
2023-07-27 20:14:05.769063-0400 amp[47665:3118612] CapacitorGoogleMaps/Map.swift:129: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
```
I can now reproduce this error, on my iPhone SE (first generation) IOS 14. I could also reproduce it inside an emulator iPhone SE (first generation) IOS 15. When I want to create the native google maps, the app crashes. I also got this issue on newer devices but it was not easy to reproduce it. I couldn't detect a pattern. With older devices and platforms, I found now again the same error.
### Expected Behavior
App should not crash
### Code Reproduction
[code.zip](https://github.com/ionic-team/capacitor-plugins/files/15436802/code.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
Something similar already happened in some other issues. But reproduction couldn't be provided.
- https://github.com/ionic-team/capacitor-plugins/issues/1832
- https://github.com/ionic-team/capacitor-plugins/issues/1710
- https://github.com/ionic-team/capacitor-plugins/issues/1392
- https://github.com/ionic-team/capacitor-plugins/issues/1007
- https://github.com/ionic-team/capacitor-plugins/issues/947
- https://github.com/ionic-team/capacitor-plugins/issues/980
Contributor guide
Assessment
This issue has not been assessed yet.