Skip to content

fix(android): support RN 0.77 #3749

Closed
efstathiosntonas wants to merge 6 commits into
rnmapbox:mainfrom
efstathiosntonas:chore/react_native_0_77_0_support
Closed

fix(android): support RN 0.77 #3749
efstathiosntonas wants to merge 6 commits into
rnmapbox:mainfrom
efstathiosntonas:chore/react_native_0_77_0_support

Conversation

@efstathiosntonas

@efstathiosntonas efstathiosntonas commented Jan 23, 2025

Copy link
Copy Markdown

Description

adds support for react-native@0.77 on Android, iOS builds fine.

LayoutShadowNode was introduced on rn@0.72.x

fixes #3753

Checklist

  • I've read CONTRIBUTING.md
  • I updated the doc/other generated code with running yarn generate in the root folder
  • [] I have tested the new feature on /example app.
    • In V11 mode/ios
    • In New Architecture mode/ios
    • In V11 mode/android
    • In New Architecture mode/android
  • I added/updated a sample - if a new feature was implemented (/example)

@efstathiosntonas

efstathiosntonas commented Jan 23, 2025

Copy link
Copy Markdown
Author

@mfazekas since ReadableArray is now optional: https://reactnative.dev/blog/2025/01/21/version-0.77#android several changes needs to take place. How we should proceed from here?

On package.json the minimum version "react-native": ">=0.59.9", is this still possible 🤔 ? What is the minimum react-native version supported? Asking because LayoutShadowNode was introduced on rn@0.72.x and it's a requirement on 0.77.

@mfazekas

Copy link
Copy Markdown
Contributor

@mfazekas since ReadableArray is now optional: https://reactnative.dev/blog/2025/01/21/version-0.77#android several changes needs to take place. How we should proceed from here?

On package.json the minimum version "react-native": ">=0.59.9", is this still possible 🤔 ? What is the minimum react-native version supported? Asking because LayoutShadowNode was introduced on rn@0.72.x and it's a requirement on 0.77.

@efstathiosntonas thanks much for looking into it. We can bump and should bump min version to 0.72.

@mfazekas

Copy link
Copy Markdown
Contributor

@efstathiosntonas question, have you reread those generated code with 0.77? Or you've modified the code by hand?

@efstathiosntonas

Copy link
Copy Markdown
Author

Yes, I've modified by hand and tested them on my app while running 0.77.

The logs from them linked issue are half way there, if you get past these errors then the errors about BaseViewManagerInterface start to kick in.

@efstathiosntonas

Copy link
Copy Markdown
Author

@mfazekas I would like your help in fixing the optional ReadableArray, the logs from the linked issue got all the info we need. Can you pleaaaaaaase pick up from here?

@efstathiosntonas

efstathiosntonas commented Jan 27, 2025

Copy link
Copy Markdown
Author

@mfazekas if you're wondering where the delegators changes came from, all major libraries have applied them to support 0.77, eg. svg

@efstathiosntonas efstathiosntonas marked this pull request as ready for review February 6, 2025 09:05
@Dosbodoke

Copy link
Copy Markdown

Any updates on this? I have tried to apply a patch package as mentioned on #3753 (comment) but didn't worked as well.

Thx in advance

@anandtatva

Copy link
Copy Markdown

Any updates on this? I have tried to apply a patch package as mentioned on #3753 (comment) but didn't worked as well.

Thx in advance

same for me
Any update?

@robonaut

Copy link
Copy Markdown

Also blocked by this. Someone actually got the patch to work? Thx!

@iffa

iffa commented Feb 25, 2025

Copy link
Copy Markdown

Also blocked by this. Someone actually got the patch to work? Thx!

I uploaded our patch on the issue that contains the changes from this PR but rebased to the latest published version, along with a Kotlin/AppCompat build error fix: #3753 (comment)

It is working for our use case (details in my comment).

@robonaut

Copy link
Copy Markdown

I can confirm the patch is working: #3753 (comment)

@flessard

Copy link
Copy Markdown

@efstathiosntonas or @mfazekas Any update for this PR....🙏

@cixio

cixio commented Apr 4, 2025

Copy link
Copy Markdown
Contributor

can confirm patch is working as expected.

Since rnmapbox doesn't work without this patch, it would make sense to merge this pull request as soon as possible.

@Dosbodoke

Copy link
Copy Markdown

can confirm patch is working as expected.

Since rnmapbox doesn't work without this patch, it would make sense to merge this pull request as soon as possible.

Can you confirm if it works in production? I remember that some guy told that it worked on development build but not in production.

@cixio

cixio commented Apr 4, 2025

Copy link
Copy Markdown
Contributor

Can you confirm if it works in production?

already using it in production

@Sechorda

Sechorda commented Apr 6, 2025

Copy link
Copy Markdown
Contributor

can confirm patch is working as expected.

Since rnmapbox doesn't work without this patch, it would make sense to merge this pull request as soon as possible.

This broke my project :( Please merge

@efstathiosntonas ty for patch

@baralmanish

Copy link
Copy Markdown

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

#3753 (comment)

@umardev500

Copy link
Copy Markdown

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

#3753 (comment)

How to install that patch?

@danielfamiyeh

Copy link
Copy Markdown

@umardev500 - Putting at the patch root RN project directory and running
patch -p1 < "@rnmapbox+maps+10.1.38.patch"
worked for me. I'm using a Mac so I think patch is a unix util.

@RyanTG

RyanTG commented May 11, 2025

Copy link
Copy Markdown
Contributor

Can you confirm if it works in production? I remember that some guy told that it worked on development build but not in production.

My internal testers report that it is working in Production. My device is actually crashing at launch, though.

@baralmanish

Copy link
Copy Markdown

Can you confirm if it works in production? I remember that some guy told that it worked on development build but not in production.

My internal testers report that it is working in Production. My device is actually crashing at launch, but there's nothing I see in the logcat that points to this issue... so it's probably unrelated.

Its working perfectly in my production build.

@LukakHR

LukakHR commented May 15, 2025

Copy link
Copy Markdown

Can you confirm if it works in production? I remember that some guy told that it worked on development build but not in production.

My internal testers report that it is working in Production. My device is actually crashing at launch, but there's nothing I see in the logcat that points to this issue... so it's probably unrelated.

same thing happening to me

@RyanTG

RyanTG commented May 30, 2025

Copy link
Copy Markdown
Contributor

Maybe it's not consistent across devices. Only in a production build (not expo development build), experiencing a consistent crash on some devices, while others do not experience any issues. There seem to be a lot of people in here, across a few different issues and PRs, experiencing this production-only crash.

I tried looking at logcat, but it wasn't clear to me what the issue was.

@efstathiosntonas

Copy link
Copy Markdown
Author

this was fixed in this PR: #3855

Closing

@zegenerative

Copy link
Copy Markdown

#3855 crashes ios

@efstathiosntonas

Copy link
Copy Markdown
Author

@zegenerative have you tried/patched this PR and it won’t crash on iOS or you’re just saying generally that it crashes on iOS?

@zegenerative

Copy link
Copy Markdown

@zegenerative have you tried/patched this PR and it won’t crash on iOS or you’re just saying generally that it crashes on iOS?

Sorry was something on my side! Works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RN 0.77 support