maps icon indicating copy to clipboard operation
maps copied to clipboard

RN 0.77 support

Open talaikis opened this issue 11 months ago โ€ข 40 comments

Environment

  • Dev OS: Win 11
  • @rnmapbox/maps version: 10.1,33
  • React Native version: 0.77.0
  • Expo version: 52.0.27

Steps to reproduce

  1. build app for RN 0.77

Errors

e: file:////node_modules/rn-utils/android/src/main/java/com/utils/HashStoreModule.kt:66:29 Argument type mismatch: actual type is 'kotlin.String?', but 'kotlin.String' was expected.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXCalloutManager.kt:15:49 Argument type mismatch: actual type is 'com.rnmapbox.rnmbx.components.annotation.RNMBXCalloutManager', but 'U!' was expected.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerViewManager.kt:28:52 Argument type mismatch: actual type is 'com.rnmapbox.rnmbx.components.annotation.RNMBXMarkerViewManager', but 'U!' was expected.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXPointAnnotationManager.kt:24:57 Argument type mismatch: actual type is 'com.rnmapbox.rnmbx.components.annotation.RNMBXPointAnnotationManager', but 'U!' was expected.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:252:29 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:252:49 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:252:91 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:255:51 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:255:80 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt:18:27 Unresolved reference 'ViewTreeLifecycleOwner'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt:119:30 Class '<anonymous>' is not abstract and does not implement abstract member 'lifecycle'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt:134:17 'getLifecycle' overrides nothing.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt:138:13 Unresolved reference 'ViewTreeLifecycleOwner'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt:37:16 Argument type mismatch: actual type is 'kotlin.String?', but 'kotlin.String' was expected.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt:43:9 Argument type mismatch: actual type is 'kotlin.String?', but 'kotlin.String' was expected.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt:60:63 Type argument is not within its bounds: should be subtype of 'it(BaseViewManagerInterface & com.facebook.react.viewmanagers.RNMBXMapViewManagerInterface<com.rnmapbox.rnmbx.components.mapview.RNMBXMapView!>)!'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt:60:84 Argument type mismatch: actual type is 'com.rnmapbox.rnmbx.components.mapview.RNMBXMapViewManager', but 'U!' was expected.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleValue.kt:85:28 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableMap?'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleValue.kt:107:29 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableMap?'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleValue.kt:124:45 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleValue.kt:124:55 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableMap?'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleValue.kt:126:33 Argument type mismatch: actual type is 'com.facebook.react.bridge.ReadableMap?', but 'com.facebook.react.bridge.ReadableMap' was expected.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleValue.kt:126:41 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/atmosphere/RNMBXAtmosphereManager.kt:16:52 Argument type mismatch: actual type is 'com.rnmapbox.rnmbx.components.styles.atmosphere.RNMBXAtmosphereManager', but 'U!' was expected.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSourceManager.kt:122:40 None of the following candidates is applicable:
fun literal(value: Boolean): Expression
fun literal(value: Double): Expression
fun literal(value: Long): Expression
fun literal(value: String): Expression
fun literal(value: HashMap<String, Any>): Expression
fun literal(value: List<Any>): Expression
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:44:26 Argument type mismatch: actual type is 'kotlin.String?', but 'kotlin.String' was expected.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/shapeAnimators/RNMBXChangeLineOffsetsShapeAnimatorModule.kt:213:41 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/shapeAnimators/RNMBXChangeLineOffsetsShapeAnimatorModule.kt:213:59 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/Dynamic.kt:41:42 None of the following candidates is applicable:
static fun valueOf(p0: Double): Value
static fun valueOf(p0: Long): Value
static fun valueOf(p0: Boolean): Value
static fun valueOf(p0: String): Value
static fun valueOf(p0: (MutableList<Value!>..List<Value!>)): Value
static fun valueOf(p0: HashMap<String!, Value!>): Value
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/Dynamic.kt:42:46 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/Dynamic.kt:43:42 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableMap?'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/ReadableArray.kt:49:53 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableMap?'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/ReadableArray.kt:50:57 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:////node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/ReadableMap.kt:28:26 Argument type mismatch: actual type is 'kotlin.Any?', but 'kotlin.Any' was expected.
e: file:////node_modules/@rnmapbox/maps/android/src/main/rn-compat/rn75/com/rnmapbox/rnmbx/rncompat/ReadableMap.kt:6:12 Return type mismatch: expected 'kotlin.collections.Iterator<kotlin.collections.Map.Entry<kotlin.String, kotlin.Any>>', actual 'kotlin.collections.Iterator<kotlin.collections.Map.Entry<kotlin.String, kotlin.Any?>>'.

talaikis avatar Jan 24 '25 18:01 talaikis

I've opened a draft PR about supporting but need some input from the maintainers

  • https://github.com/rnmapbox/maps/pull/3749

efstathiosntonas avatar Jan 27 '25 06:01 efstathiosntonas

@rnmapbox+maps+10.1.33.patch

"@rnmapbox/maps": "10.1.33",
"react": "18.3.1",
"react-native": "0.77.0",

try this patch, works for me

ulucantugberk avatar Feb 01 '25 12:02 ulucantugberk

@rnmapbox+maps+10.1.33.patch

"@rnmapbox/maps": "10.1.33",
"react": "18.3.1",
"react-native": "0.77.0",

try this patch, works for me

thanks, working for me..

1453alabanda avatar Feb 01 '25 13:02 1453alabanda

i'm still getting the error after applying the patch but it is at RNMBXCalloutManager file ๐Ÿ˜ฟ

using same exact version:

"@rnmapbox/maps": "10.1.33",
"react": "18.3.1",
"react-native": "0.77.0",

Tried rm -rf node_modules and Invalidate Caches in android studio but still same

file:///xxx/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXCalloutManager.kt:15:49 Argument type mismatch: actual type is 'com.rnmapbox.rnmbx.components.annotation.RNMBXCalloutManager', but 'U!' was expected.

Is there anything that needs to be done apart from the patch?

kyaroru avatar Feb 05 '25 08:02 kyaroru

https://github.com/rnmapbox/maps/issues/3753#issuecomment-2636062950

getting the same issue @1453alabanda @ulucantugberk

may i know your android setup

anandtatva avatar Feb 06 '25 05:02 anandtatva

@rnmapbox+maps+10.1.33.patch

"@rnmapbox/maps": "10.1.33",
"react": "18.3.1",
"react-native": "0.77.0",

try this patch, works for me

I tried and it didn't work, can you send me more details of your environment on Android? things like, Kotlinversion, compileSdkVersion, etc

brunoscardoso avatar Feb 13 '25 18:02 brunoscardoso

Install the lib patch-package, download the package below (is different from the patches above) this works @rnmapbox+maps+10.1.33.patch

"@rnmapbox/maps": "10.1.33", "react": "18.3.1", "react-native": "0.77.0",

brunoscardoso avatar Feb 13 '25 22:02 brunoscardoso

Install the lib patch-package, download the package below (is different from the patches above) this works @rnmapbox+maps+10.1.33.patch

"@rnmapbox/maps": "10.1.33", "react": "18.3.1", "react-native": "0.77.0",

Patch package failed for me **ERROR** Failed to apply patch for package @rnmapbox/maps at path

It's the first time I'm working with patch package, am I doing something wrong?

  1. Inslatted patch package with yarn add -D patch-package
  2. added "postinstall": "patch-package" under my "scripts:" on package.json
  3. Added the file you linked under patches, so now I got \patches\@rnmapbox+maps+10.1.33.patch
  4. Deleted node_modules
  5. Ran yarn install

On my dependencies I have "@rnmapbox/maps": "10.1.33"

Dosbodoke avatar Feb 14 '25 03:02 Dosbodoke

@rnmapbox+maps+10.1.33.patch

"@rnmapbox/maps": "10.1.33",
"react": "18.3.1",
"react-native": "0.77.0",

try this patch, works for me

this one worked tough

Dosbodoke avatar Feb 14 '25 19:02 Dosbodoke

With patch file:

e: file:///C:/..../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerViewManager.kt:28:52 Argument type mismatch: actual type is 'com.rnmapbox.rnmbx.components.annotation.RNMBXMarkerViewManager', but 'U!' was expected.
e: file:///C:/..../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXPointAnnotationManager.kt:24:57 Argument type mismatch: actual type is 'com.rnmapbox.rnmbx.components.annotation.RNMBXPointAnnotationManager', but 'U!' was expected.
e: file:///C:/..../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt:60:63 Type argument is not within its bounds: should be subtype of 'it(BaseViewManagerInterface & com.facebook.react.viewmanagers.RNMBXMapViewManagerInterface<com.rnmapbox.rnmbx.components.mapview.RNMBXMapView!>)!'.
e: file:///C:/..../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt:60:84 Argument type mismatch: actual type is 'com.rnmapbox.rnmbx.components.mapview.RNMBXMapViewManager', but 'U!' was expected.
e: file:///C:/..../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/atmosphere/RNMBXAtmosphereManager.kt:16:52 Argument type mismatch: actual type is 'com.rnmapbox.rnmbx.components.styles.atmosphere.RNMBXAtmosphereManager', but 'U!' was expected
```

talaikis avatar Feb 15 '25 07:02 talaikis

With patch file:

...

Try to strict the versin to "@rnmapbox/maps": "10.1.33", use the patch provided by @1453alabanda and delete node_modules and yarn.lock/package-lock.json, It worked for me. BTW I'm using yarn, don't know if can make any difference.

Dosbodoke avatar Feb 15 '25 14:02 Dosbodoke

Try to strict the versin to "@rnmapbox/maps": "10.1.33", use the patch provided by @1453alabanda and delete node_modules and yarn.lock/package-lock.json, It worked for me. BTW I'm using yarn, don't know if can make any difference.

That has nothing to do with Kotlin errors. Kotlin isn't affected by gradle or yarn cache. What Kotlin version are you using?

talaikis avatar Feb 15 '25 18:02 talaikis

Hello

I am facing the same issue as you @talaikis after applying the first suggested patch.

I am currently using :

Android gradle plugin: 8.7.2
Gradle: 8.10.2
React-Native: 0.77
Kotlin 2.0.21 (the one suggested by the upgrade helper)
minSdkVersion: 24
compileSdkVersion: 35
targetSdkVersion: 34
ndkVersion : "27.1.12297006"
agp_version : '8.8.1'

But from what I saw in the official Android docs, I might be using an outdated AGP version, I'll try to bump it and I'll come back to you to confirm if after that the patch worked

EDIT: from what I've tested, even if I upgrade to latest AGP issue, I'm still facing the issue after running the first patch

EDIT 2: the patch suggested by @brunoscardoso works perfectly, thank you very much ! ๐Ÿ’ฏ

I saw there is a PR for the support of react-native 0.77, let's hope it get merged soon ๐Ÿ‘

Vikmanatus avatar Feb 17 '25 19:02 Vikmanatus

@rnmapbox-maps-npm-10.1.37-06aa7f1b50.patch

Here's our patch compatible with version 10.1.37 of the library that incorporates the contents of the open PR along with an Android-specific fix that I assume is related to appcompat / kotlin versions

Note that we use yarn berry (v4) so the patch format is a bit different if you use patch-package - you should replace the diff line file paths, for example:

diff --git a/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt b/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt

to:

diff --git a/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt b/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt

The patch was implemented & tested with an Expo project using 0.77.1:

"expo": "52.0.37",
"react-native": "0.77.1"

iffa avatar Feb 24 '25 14:02 iffa

@iffa I can confirm this works on RN 0.78 as well (plain expo-less RN app) with patch-package.

Attached the used patch file. filename: @rnmapbox+maps+10.1.37.patch

Thx! Much appreciated!

@rnmapbox+maps+10.1.37.patch

robonaut avatar Feb 25 '25 16:02 robonaut

The version 10.1.37 with the patch applied crashes on Android in release mode on a real device. It works fine in debug mode and also in the emulator, but as soon as the app runs on a real device in release mode, it crashes immediately on launch.

The logs I have :

03-07 17:05:31.792 8186 8219 E cc.nearyou.app: Invalid ID 0x00000000. 03-07 17:05:31.903 8186 8219 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4 in tid 8219 (mqt_v_js), pid 8186 (cc.nearyou.app) 03-07 17:05:32.656 8240 8240 F DEBUG : Cause: null pointer dereference 03-07 17:05:32.656 8240 8240 F DEBUG : #03 pc 00247431 /data/app/.../base.apk!libreactnative.so
03-07 17:05:32.656 8240 8240 F DEBUG : #04 pc 0030faa7 /data/app/.../base.apk!libreactnative.so (facebook::react::JavaTurboModule::setEventEmitterCallback) 03-07 17:05:32.656 8240 8240 F DEBUG : #05 pc 0023423d /data/app/.../base.apk!libappmodules.so (facebook::react::NativeRNMBXLocationModuleSpecJSI::NativeRNMBXLocationModuleSpecJSI)

Has anyone else experienced this issue? Is there any fix or workaround available?

Thanks!

PierreMartin avatar Mar 08 '25 19:03 PierreMartin

@PierreMartin - I have ONE device in production that's hitting this crash - at least I think it's the same thing, all I have is the stack trace from the google play console. All of the rest of them are working fine, including my local test devices. The prod device that's breaking is a Samsumg a13x running android 13 (sdk 33). What device/api are you seeing it on? It'd be nice to narrow down what the incompatibility is so it could at least be reproduced in a simulator.

bfd-paul-vicknair avatar Mar 28 '25 14:03 bfd-paul-vicknair

Any updates on this? SLowly getting more and more behind on react native versions...

RemiHin avatar Apr 14 '25 08:04 RemiHin

The patch version for 10.1.38.

// build.gradle
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 35
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
// package.json
"@rnmapbox/maps": "^10.1.38",
"react": "19.0.0",
"react-native": "0.79.0",

@rnmapbox+maps+10.1.38.patch

baralmanish avatar Apr 16 '25 10:04 baralmanish

The patch version for 10.1.38.

// build.gradle
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 35
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
// package.json
"@rnmapbox/maps": "^10.1.38",
"react": "19.0.0",
"react-native": "0.79.0",

@rnmapbox+maps+10.1.38.patch

I can confirm this patch also works on:

"@rnmapbox/maps": "10.1.38", "react-native": "0.78.2"

kotlinVersion = "2.0.21"

Thanks! Hope this gets merged soon.

generic-delta avatar Apr 18 '25 12:04 generic-delta

The patch version for 10.1.38.

// build.gradle
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 35
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
// package.json
"@rnmapbox/maps": "^10.1.38",
"react": "19.0.0",
"react-native": "0.79.0",

@rnmapbox+maps+10.1.38.patch

I can confirm this patch also works on:

"@rnmapbox/maps": "10.1.38", "react-native": "0.78.2"

kotlinVersion = "2.0.21"

Thanks! Hope this gets merged soon.

How to install the patch

umardev500 avatar May 02 '25 23:05 umardev500

 npm install patch-package postinstall-postinstall --save-dev

or

 yarn add patch-package postinstall-postinstall --dev

in package.json:

"scripts": {
       "postinstall": "patch-package"
     }

then put the patch file in a "patches" folder. (patches/@rnmapbox+maps+10.1.38.patch)

@rnmapbox+maps+10.1.38.patch

patch will be applied when you do an npm/yarn install

hope this get's merged soon.

The4star avatar May 03 '25 05:05 The4star

Patch works for Android. What do you think about iOS? I got this error for iOS build: Build failed: The "Run fastlane" step failed because of an error in the Xcode build process. We automatically detected following errors in your Xcode build logs: cannot convert return expression of type '[UIView : ViewAnnotationOptions]' to return type '[String : Any?]' Refer to "Xcode Logs" below for additional, more detailed logs.

โ€บ Packaging expo-json-utils Pods/EXJSONUtils ยป libEXJSONUtils.a

โŒ (/Users/expo/workingdir/build/packages/app/ios/Pods/MapboxMaps/Sources/MapboxMaps/Annotations/ViewAnnotationManager.swift:79:19)

77 | @available(*, deprecated, message: "Use ViewAnnotation") 78 | public var annotations: [UIView: ViewAnnotationOptions] {

79 | idsByView.compactMapValues { [mapboxMap] id in | ^ cannot convert return expression of type '[UIView : ViewAnnotationOptions]' to return type '[String : Any?]' 80 | try? mapboxMap.options(forViewAnnotationWithId: id) 81 | } 82 | }

UchihaVeha avatar May 14 '25 12:05 UchihaVeha

I have the same issue on version 10.1.36, but because of this crash , I can't use the version 10.1.38. Which patch should i use for the version 10.1.36? (10.1.37 version doesn't work either for me)

jleprinc avatar May 14 '25 14:05 jleprinc

Patch works for Android. What do you think about iOS? I got this error for iOS build: Build failed: The "Run fastlane" step failed because of an error in the Xcode build process. We automatically detected following errors in your Xcode build logs: cannot convert return expression of type '[UIView : ViewAnnotationOptions]' to return type '[String : Any?]' Refer to "Xcode Logs" below for additional, more detailed logs.

โ€บ Packaging expo-json-utils Pods/EXJSONUtils ยป libEXJSONUtils.a

โŒ (/Users/expo/workingdir/build/packages/app/ios/Pods/MapboxMaps/Sources/MapboxMaps/Annotations/ViewAnnotationManager.swift:79:19)

77 | @available(*, deprecated, message: "Use ViewAnnotation") 78 | public var annotations: [UIView: ViewAnnotationOptions] {

79 | idsByView.compactMapValues { [mapboxMap] id in | ^ cannot convert return expression of type '[UIView : ViewAnnotationOptions]' to return type '[String : Any?]' 80 | try? mapboxMap.options(forViewAnnotationWithId: id) 81 | } 82 | }

I am using this only for Android, I have not tested it for IOS.

baralmanish avatar May 14 '25 17:05 baralmanish

The patch version for 10.1.38.

// build.gradle
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 35
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
// package.json
"@rnmapbox/maps": "^10.1.38",
"react": "19.0.0",
"react-native": "0.79.0",

@rnmapbox+maps+10.1.38.patch

Thank you ๐Ÿ™๐Ÿผ

receptopalak avatar May 15 '25 09:05 receptopalak

 npm install patch-package postinstall-postinstall --save-dev

or

 yarn add patch-package postinstall-postinstall --dev

in package.json:

"scripts": {
       "postinstall": "patch-package"
     }

then put the patch file in a "patches" folder. (patches/@rnmapbox+maps+10.1.38.patch)

@rnmapbox+maps+10.1.38.patch

patch will be applied when you do an npm/yarn install

hope this get's merged soon.

it works, thanks ๐Ÿ™

fachryluid avatar May 15 '25 11:05 fachryluid

 npm install patch-package postinstall-postinstall --save-dev

or

 yarn add patch-package postinstall-postinstall --dev

in package.json:

"scripts": {
       "postinstall": "patch-package"
     }

then put the patch file in a "patches" folder. (patches/@rnmapbox+maps+10.1.38.patch) @rnmapbox+maps+10.1.38.patch patch will be applied when you do an npm/yarn install hope this get's merged soon.

it works, thanks ๐Ÿ™

  • What went wrong: Plugin [id: 'expo-module-gradle-plugin'] was not found in any of the following sources:
  • Gradle Core Plugins (not a core plugin. For more available plugins, please refer to https://docs.gradle.org/8.10.2/userguide/plugin_reference.html in the Gradle documentation.)
  • Included Builds (No included builds contain this plugin)
  • Plugin Repositories (plugin dependency must include a version number for this source)
  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

KiyoScript avatar May 16 '25 08:05 KiyoScript

@PierreMartin - I have ONE device in production that's hitting this crash - at least I think it's the same thing, all I have is the stack trace from the google play console. All of the rest of them are working fine, including my local test devices. The prod device that's breaking is a Samsumg a13x running android 13 (sdk 33). What device/api are you seeing it on? It'd be nice to narrow down what the incompatibility is so it could at least be reproduced in a simulator.

@bfd-paul-vicknair Hi, I'm facing the same issue on Samsung A13 running Android 14 (SDK 34). Have you found any solution or workaround for this problem yet?

fachryluid avatar May 17 '25 02:05 fachryluid

The patch version for 10.1.38.

// build.gradle
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 35
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
// package.json
"@rnmapbox/maps": "^10.1.38",
"react": "19.0.0",
"react-native": "0.79.0",

@rnmapbox+maps+10.1.38.patch

Hi I am still facing the same issue with the config: buildToolsVersion = "35.0.0" minSdkVersion = 24 compileSdkVersion = 35 targetSdkVersion = 35 ndkVersion = "27.1.12297006" kotlinVersion = "2.0.21"

"@rnmapbox/maps": "^10.1.38",
"react": "19.0.0",
"react-native": "0.78.2"

Ashishk-github avatar May 18 '25 12:05 Ashishk-github