maps: [Bug]: Expo 53: App Crashes immediately on open on Android
Mapbox Implementation
Mapbox
Mapbox Version
10.7.0 and 11.0.0
React Native Version
0.79.2
Platform
Android
@rnmapbox/maps version
10.1.38
Standalone component to reproduce
import React from 'react';
import {
MapView,
ShapeSource,
LineLayer,
Camera,
} from '@rnmapbox/maps';
const aLine = {
type: 'LineString',
coordinates: [
[-74.00597, 40.71427],
[-74.00697, 40.71527],
],
};
class BugReportExample extends React.Component {
render() {
return (
<MapView style={{flex: 1}}>
<Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
<ShapeSource id="idStreetLayer" shape={aLine}>
<LineLayer id="idStreetLayer" />
</ShapeSource>
</MapView>
);
}
}
Observed behavior and steps to reproduce
The app crashes on open after installing Expo 52 and doing npx expo prebuild --clean. I tried upgrading to Expo 53, tried both version 10.x.x and 11.x.x of mapbox and tried the patch to fix the issue but nothing helped. I am attaching a log report from the emulator after running: adb logcat | grep -E "(mapbox-common|SIGSEGV)"
Expected behavior
No response
Notes / preliminary analysis
No response
Additional links and references
No response
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 6
- Comments: 42 (10 by maintainers)
As noted by people in this issue, yes, people have fixed it. Here is a commit with my fixes: https://github.com/pinballmap/pbm-react/commit/f0e9eda069e55e9564ee9a7caeafb0b4dbd25f97
Four things:
It would be better if the maintainer can address the issues properly and collectively.
Thanks for your 32bit fix. I packed it into a patch for rn 0.79.5
react-native+0.79.5.patch
This latest release, 10.1.39, does not fix the Android production crash. And, per the comment above about setting the Mapbox SDK version to (in expo)
RNMapboxMapsVersion: "11.12.1"- I am still experiencing a crash in production.@sanguu516 there is RC version released 1-2 days ago git that a try
I’ve tried to install a clean project and it’s still not working.
Steps to reproduce Create new project:
npx create-expo-app@latestAdd @rnmapbox/maps:
npx expo install @rnmapbox/mapsAdd config to app.json in plugins array:
[ "@rnmapbox/maps", { "RNMapboxMapsDownloadToken": "sk....." } ]Run expo prebuild:
npx expo prebuild --platform androidRun app for android:
npx expo run:androidThe app builds and installs properly but crashes immediately on open. I tried to find some errors in logcat and got these:
05-16 11:49:09.770 4171 4171 I MapboxInitializer: MapboxMapsInitializer create() is called 05-16 11:49:09.770 4171 4171 I MapboxInitializer: MapboxInitializer started MapboxMapsInitializerImpl initialization, attempt 1 05-16 11:49:09.806 4171 4171 F libc : Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x755d1ed52280 in tid 4171 (new_project.project), pid 4171 (new_project.project) 05-16 11:49:09.836 4189 4189 E crash_dump64: failed to get the guest state header for thread 4171: Bad addressRemoving mapbox makes the project run perfectly well