sentry-dart icon indicating copy to clipboard operation
sentry-dart copied to clipboard

Bump JNI to 0.15.0 to be compatible with other packages

Open fluttersiast opened this issue 1 month ago • 5 comments

Platform

Flutter Mobile iOS, Dart

Obfuscation

Enabled

Debug Info

Enabled

Doctor

Please plan to bump version of JNI to 0.15.x to be compatible with other packages.

Version

9.8.0

Steps to Reproduce

Use latest version and cronet_http(or any other package which is using latest jni)

Expected Result

flutter pub get works as expected

Actual Result

packages has incompatible jni versions

Are you willing to submit a PR?

None

fluttersiast avatar Nov 27 '25 18:11 fluttersiast

DART-274

linear[bot] avatar Nov 27 '25 18:11 linear[bot]

hey, we will bump the jni version soon

buenaflor avatar Nov 27 '25 19:11 buenaflor

@buenaflor Can this be done with objective_c too?

dickermoshe avatar Dec 04 '25 04:12 dickermoshe

Can this be done with objective_c too?

Unfortunately no because objc 9.0.0 has a much higher min Dart version than we support (and they update it quite frequently 😅 )

However, we are planning on reverting our FFI usage on iOS/macOS due to issues and therefore will also be removing the objective_c package - once that's released there won't be any conflicts anymore in that regard

buenaflor avatar Dec 04 '25 10:12 buenaflor

@buenaflor I also added ffi/jni to my app too early, had some nasty segfualts.

dickermoshe avatar Dec 04 '25 12:12 dickermoshe

Hi!

Soon new cronet version with some critical bugfixes will be released https://github.com/dart-lang/http/pull/1862 Don't want to push you guys, but do you have any timelines or beta?

fluttersiast avatar Dec 18 '25 12:12 fluttersiast

Don't want to push you guys, but do you have any timelines or beta?

all good! I'm doing a 9.9.1 release today and then the plan is to update JNI. I'll prepare a beta release for that JNI bump in 9.10.0-beta.0

buenaflor avatar Dec 18 '25 12:12 buenaflor

I just noticed that from 0.14.0 to 0.15.0 jni bumped the flutter version from >=2.2.11 to >=3.35.6 so bumping to 0.15.0 might be non-trivial since Sentry's min version is set to 3.28.0 😅

buenaflor avatar Dec 18 '25 15:12 buenaflor

I can add the JNI bump on a separate branch and keep it up to date with main, and you can point your Sentry Flutter dependency to that branch.

Until we cut a new major release, I don’t see another viable option to address this, aside from downgrading either Cronet or Sentry.

buenaflor avatar Dec 18 '25 16:12 buenaflor

That would be awesome! Thanks a lot for your support!

fluttersiast avatar Dec 18 '25 20:12 fluttersiast

you can try out deps/jni-0.15.x

buenaflor avatar Dec 19 '25 10:12 buenaflor