maplibre / maplibre-react-native

A MapLibre react native module for creating custom maps
Other
172 stars 39 forks source link

Minimal Example Crashing #369

Open Craytor opened 3 weeks ago

Craytor commented 3 weeks ago

Steps to Trigger Behavior

  1. clone repo
  2. npm install
  3. cd ios && pod install
  4. cd ..
  5. npm run ios

Link to Minimal Reproducible Example

https://github.com/Craytor/maplibre-rn-test

Expected Behavior

A map should be displayed.

Actual Behavior

Without the inclusion of <MapLibreGL.Camera />, the app simply displays no content and the following logs are shown in the bundler: LOG Mapbox [fault] The attribution is not in the visible area of the mapview. Please check your position and offset settings {"filePath": "-[MGLMapView layoutSubviews]", "level": "fault", "line": 1080, "message": "The attribution is not in the visible area of the mapview. Please check your position and offset settings"} LOG Mapbox [fault] The compassView is not in the visible area of the mapview. Please check your position and offset settings {"filePath": "-[MGLMapView layoutSubviews]", "level": "fault", "line": 1084, "message": "The compassView is not in the visible area of the mapview. Please check your position and offset settings"}

With the inclusion of <MapLibreGL.Camera />, the app immediately crashes with the provided crash report attached below.

Version(s) affected

Additional context

Crash report: crashreport.txt

brentforder commented 2 weeks ago

Not sure what is going on with that crash report, but I also had trouble with the "Getting Started" example for Android when I was first trying it out. No map tiles were loading for me with the MapLibre demo tiles URL in that example. The screen was blank. I got it working by switching to following the example from Stadia Maps (and signing up for a free trial API key from them for it): https://docs.stadiamaps.com/native-multiplatform/maplibre-react-native/

edfungus commented 1 week ago

Same problem here. Affects only the simulator and not the actual device (works on iOS and Android devices, have not tried android simulator)

Version(s) affected

tyrauber commented 1 week ago

Can you please try ^10.0.0-alpha.4 and report back if the problem persists? Thanks.

edfungus commented 1 week ago

Ok, took me much longer than expected since I had to upgrade everything (react native, expo, etc) to the latest as well. But happy news, it doesn't crash on the simulator anymore!