maplibre-native icon indicating copy to clipboard operation
maplibre-native copied to clipboard

Mapbox error Exception in onDidFinishRenderingMap {"level": "error", "message": "Exception in onDidFinishRenderingMap", "tag": "Mbgl-MapChangeReceiver"}

Open BubbleTrouble14 opened this issue 2 years ago • 12 comments

I just created a clean new react native app running react-native 0.68.2 and each time I open the map I get "Mapbox error Exception in onDidFinishRenderingMap {"level": "error", "message": "Exception in onDidFinishRenderingMap", "tag": "Mbgl-MapChangeReceiver"}" its also a little a random as on my pc emulator it will sometimes not occur. I switched to Maps SDK v10 to see if it has the same issue. But this was not the case as it didn't crash at all.

BubbleTrouble14 avatar May 17 '22 15:05 BubbleTrouble14

Even the example project on rnmapbox/maps crashes when opening a map example when setting the RNMapboxMapsImpl = "maplibre" in the build.gradle. Note the issue is probably only for android, haven't tried ios yet.

BubbleTrouble14 avatar May 17 '22 16:05 BubbleTrouble14

i face the same problem !!

karimelsaidy avatar May 18 '22 08:05 karimelsaidy

The problems seems to be with the v10 version. But with the v8 version I also didnt get it to work either sadly.

BubbleTrouble14 avatar May 18 '22 08:05 BubbleTrouble14

Also facing the same problem

goodryanboy avatar May 20 '22 08:05 goodryanboy

Current work around is to comment out the code onDidFinishRenderingMap, If your not using this event I think this is fine

node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-mapboxgl/common/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.java

@Override
    public void onDidFinishRenderingMap(boolean fully) {
        // if (fully) {
        //     for (Pair<Integer, ReadableArray> preRenderMethod : mPreRenderMethods) {
        //         Integer methodID = preRenderMethod.first;
        //         ReadableArray args = preRenderMethod.second;
        //         mManager.receiveCommand(this, methodID, args);
        //     }
        //     mPreRenderMethods.clear();
        //     handleMapChangedEvent(EventTypes.DID_FINISH_RENDERING_MAP_FULLY);
        // } else {
        //     // handleMapChangedEvent(EventTypes.DID_FINISH_RENDERING_MAP);
        // }
    }

goodryanboy avatar May 20 '22 11:05 goodryanboy

Okay great thx. Atm I am just using mapbox instead of maplibre.

BubbleTrouble14 avatar May 20 '22 12:05 BubbleTrouble14

I'm facing the same issue and im using mapbox.

Mapbox error Exception in onDidFinishRenderingMap {"level": "error", "message": "Exception in onDidFinishRenderingMap", "tag": "Mbgl-MapChangeReceiver"}

ahmedyasin21 avatar May 20 '22 21:05 ahmedyasin21

Also facing the same problem

guidoabelleira avatar May 21 '22 14:05 guidoabelleira

There is a type casting error. In the node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-mapboxgl/common/com/mapbox/rctmgl/components/mapview/RCTMGLMapViewManager.java file in the body of receiveCommand function should be used args.getArray().toString() instead of args.getString()

mmarganski avatar May 23 '22 08:05 mmarganski

Same issue

joshua-smith4 avatar May 27 '22 19:05 joshua-smith4

The project react native project seems to have had a discussion about its future in https://github.com/rnmapbox/maps/discussions/1680 and the community was asked if the focus should be on supporting Mapbox v10 or MapLibre or both.

I did not understand the conclusion but if you feel like you depend on a react native wrapper for MapLibre then it might make sense to coordinate your efforts and have a discussion probably under this thread: https://github.com/rnmapbox/maps/discussions/1680#discussioncomment-1883127

wipfli avatar May 28 '22 08:05 wipfli

Same issue RN 0.68.2 --> problem RN 0.67.4 --> ok !

rayansys avatar May 30 '22 08:05 rayansys

Did anyone resolve this?

mawrukh avatar Aug 26 '23 13:08 mawrukh