Skip to content

chore: Upgrade to Nitro 0.35.0#4849

Merged
fnwk merged 11 commits intoTheWidlarzGroup:masterfrom
mrousavy:fix/upgrade-nitro-35
Mar 18, 2026
Merged

chore: Upgrade to Nitro 0.35.0#4849
fnwk merged 11 commits intoTheWidlarzGroup:masterfrom
mrousavy:fix/upgrade-nitro-35

Conversation

@mrousavy
Copy link
Contributor

@mrousavy mrousavy commented Mar 4, 2026

Upgrades to Nitro 0.35.0, which contains a BREAKING CHANGE related to Kotlin HybridObjects (it fixes a critical memory leak, so it is advised everyone upgrades)

Steps I did (you can follow):

  1. Upgrade react-native-nitro-modules and nitrogen to 0.35.0
  2. Run bun install & pod install
  3. Replace all usages of bigint with Int64/UInt64 (in this repo; duration and fileSize *1)
  4. Re-generate specs using bun nitrogen
  5. (Optionally) replaced the cpp-adapter.cpp call from initialize(vm) with registerAllNatives() - this just allows you to register custom JNI natives in your libs, if needed.

Also, I removed the nitrogen and react-native-nitro-modules patches since I don't think they are necessary anymore. The boolean/number thing in Swift has been fixed upstream, and the exception handling is fixed in react-native core :)

  • *1: Shouldn't duration be a number (double)? Right now, it can't have commas. It's documented as "The duration of the video in seconds.", and seconds definitely has commas.

@mrousavy mrousavy marked this pull request as ready for review March 4, 2026 13:49
Copy link
Contributor

@KrzysztofMoch KrzysztofMoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I removed the nitrogen and react-native-nitro-modules patches since I don't think they are necessary anymore. The boolean/number thing in Swift has been fixed upstream, and the exception handling is fixed in react-native core :)

I agree. latest React Native is already 0.84, so it shoud be safe to remove that.

*1: Shouldn't duration be a number (double)? Right now, it can't have commas. It's documented as "The duration of the video in seconds.", and seconds definitely has commas.

Yes, nice find — we need to change it to ms or leave as it is and change type to a number.

cc @moskalakamil

@mrousavy
Copy link
Contributor Author

mrousavy commented Mar 4, 2026

I think seconds is good, and double. I do the same in VisionCamera

@fnwk fnwk requested a review from moskalakamil March 18, 2026 15:51
Copy link
Collaborator

@moskalakamil moskalakamil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks a lot @mrousavy @KrzysztofMoch and @fnwk. last thing - docs, could you @fnwk please update requirements?

@fnwk fnwk merged commit a01d203 into TheWidlarzGroup:master Mar 18, 2026
1 check passed
@SGamrekelashvili
Copy link

Could you release package with this commit included?
Thanks.

@zoriya
Copy link
Contributor

zoriya commented Mar 21, 2026

Building with this PR causes a build error on android:

e: file:///home/expo/workingdir/build/front/node_modules/react-native-video/android/src/main/java/com/twg/video/core/utils/VideoInformationUtils.kt:58:18 Argument type mismatch: actual type is 'Long', but 'Double' was expected.

This can be fixed by da91f4f (i pushed it in my branch #4724)

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

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

6 participants