Closed Noitidart closed 3 months ago
I think this might be related to improperly upgrading to Expo 50.
Correct, I upgraded improperly, closing.
Actually I'm wrong, it's not due to Expo 50 upgrade. Here's the error, will edit it up in the first post:
Execution failed for task ':stripe_stripe-terminal-react-native:compileDebugKotlin'.
> 'compileDebugJavaWithJavac' task (current target is 17) and 'compileDebugKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain
* 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.
BUILD FAILED in 5m 31s
Re-opening, I tried everything, and can't get this to build on Expo 50.
I have exactly the same problem. No solution found.
I had the same problem, the only solution that i found is downgrading to Expo 49. Do not hesitate to test my projet, i created a simpler Tap to Pay React Native app in order to test the stripe terminal SDK. https://github.com/RambokDev/stripe-tap-to-pay-react-native
I had the same problem, the only solution that i found is downgrading to Expo 49. Do not hesitate to test my projet, i created a simpler Tap to Pay React Native app in order to test the stripe terminal SDK. https://github.com/RambokDev/stripe-tap-to-pay-react-native
Thanks very much I will try that. I had downgraded expo to 49 but it wasn't building on expo pipeline. Did you try that? You used beta 15 of lib I see which is very interesting. I thought I tried expo 49 and beta 15 but expo build cloud wouldn't work.
I think the problem I had was a bunch of libs weren't ready for Java 17 like flash list. I might have to try expo 49, terminal beta 14, and use a non 17 image for Expo build.
I had the same problem, the only solution that i found is downgrading to Expo 49. Do not hesitate to test my projet, i created a simpler Tap to Pay React Native app in order to test the stripe terminal SDK. https://github.com/RambokDev/stripe-tap-to-pay-react-native
Thanks very much I will try that. I had downgraded expo to 49 but it wasn't building on expo pipeline. Did you try that? You used beta 15 of lib I see which is very interesting. I thought I tried expo 49 and beta 15 but expo build cloud wouldn't work.
I think the problem I had was a bunch of libs weren't ready for Java 17 like flash list. I might have to try expo 49, terminal beta 14, and use a non 17 image for Expo build.
I managed to build on expo server with this image : ubuntu-22.04-jdk-17-ndk-r21e.
You can change the image in eas.json by adding the following in a profile :
"android": { "image": "ubuntu-22.04-jdk-17-ndk-r21e" }
I had the same problem, the only solution that i found is downgrading to Expo 49. Do not hesitate to test my projet, i created a simpler Tap to Pay React Native app in order to test the stripe terminal SDK. https://github.com/RambokDev/stripe-tap-to-pay-react-native
Thanks very much I will try that. I had downgraded expo to 49 but it wasn't building on expo pipeline. Did you try that? You used beta 15 of lib I see which is very interesting. I thought I tried expo 49 and beta 15 but expo build cloud wouldn't work. I think the problem I had was a bunch of libs weren't ready for Java 17 like flash list. I might have to try expo 49, terminal beta 14, and use a non 17 image for Expo build.
I managed to build on expo server with this image : ubuntu-22.04-jdk-17-ndk-r21e.
You can change the image in eas.json by adding the following in a profile :
"android": { "image": "ubuntu-22.04-jdk-17-ndk-r21e" }
Yes, this worked for me also :)
Hey ! the build.gradle file needs some updates in order to follow Expo 50 migration directions. In the changelog they say :
If you maintain any Expo Modules:
For Android: update your library build.gradle to match the changes in [this diff](https://gist.github.com/brentvatne/61cd1a938fb4ba8869bc490647aa52e8). You may also now remove the JVM target version configuration, [as explained in this FYI page](https://expo.fyi/expo-modules-gradle8-migration#error-task-current-target-is-17-and-compilereleasekotlin-task-current-target-is-11-jvm-target-compatibility-should-be-set-to-the-same-java-version).
For iOS: update the platform deployment target field from '13.0' to '13.4', matching the changes in [this diff](https://gist.github.com/brentvatne/87ac1b2c402be415972231a73ba3a695).
For those who are interested, in the meantime, here is the patch file :
patches/@stripe+stripe-terminal-react-native+0.0.1-beta.15.patch
diff --git a/node_modules/@stripe/stripe-terminal-react-native/android/build.gradle b/node_modules/@stripe/stripe-terminal-react-native/android/build.gradle
index eacd4f6..f31dc04 100644
--- a/node_modules/@stripe/stripe-terminal-react-native/android/build.gradle
+++ b/node_modules/@stripe/stripe-terminal-react-native/android/build.gradle
@@ -50,12 +50,16 @@ android {
lintOptions {
disable 'GradleCompatible'
}
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = "1.8"
+ def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
+ if (agpVersion.tokenize('.')[0].toInteger() < 8) {
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
+ }
+
+ kotlinOptions {
+ jvmTarget = JavaVersion.VERSION_11.majorVersion
+ }
}
}
Thank you for that! I downgraded to 49 for now as I was getting a crash on initialize on ios. But will try this out if I can get past that, thank you!
@nazli-stripe Could you please take a look and give some advice on how to handle this issue?
This issue is currently blocking our org. Hoping for a quick resolution.
If you're blocked I recommend downgrading to Expo 49, but I understand it's a problem. When downgrade many libs don't build anymore. I created a new project and removed things like FlashList.
Obviously downgrading to Expo v49 is an option, but Stripe is a for-profit company and it seems like a small ask to support Java 17. The patch diff is very small and this fix should frankly be released ASAP. cc @nazli-stripe
I understand. Expo v49 isn't an option for everyone. I had to sacrifice other libraries, and lost stuff I needed, but Stripe was core functionality so I made the trade off.
@ianlin-bbpos Can we get an official response?
We recently merged https://github.com/stripe/stripe-terminal-react-native/pull/616 to address compatibility issues for Java 17. We are trying to get a new release out as soon as possible, and will address the Expo issues in that. I will update this issue with any new information.
@nazli-stripe Thanks!
@nazli-stripe Hi.
Are there any updates on new release date?
Thanks.
Hello @nazli-stripe,
any update?
Thanks!
So, "as soon as possible" means more than three weeks?
Any update on the next release. Running into the issue (non-Expo project). Tried downgrading to 13 and get different error
hey everyone, we just released a new version that should address compatibility issues for Java 17: https://github.com/stripe/stripe-terminal-react-native/releases/tag/v0.0.1-beta.16
let us know if you are still running into issues
Hey @nazli-stripe!
I'm not an expert in maintaining 3rd party packages but after bumping to v0.0.1-beta.16
I'm getting error:
TS2307: Cannot find module @stripe/stripe-terminal-react-native or its corresponding type declarations.
I noticed that the new version is missing the lib
folder which contains the typescript configuration. (Checked it also in a new fresh project and the result is the same.)
Any thoughts?
Best
I had same issue as @dakkor71
@nazli-stripe Can we please get a response?
Two users reported feedback – that the build you released is broken – and we've had no response in five days. Even if you are not able to action the issue immediately, an acknowledgement would be a good place to start.
Many of us in this thread have been waiting months.
hey @isaachinman sorry i missed the discussion on this post, repeating the response on the new issue for specific Expo bug on beta.16
https://github.com/stripe/stripe-terminal-react-native/issues/650:
we are aware of this issue and have merged https://github.com/stripe/stripe-terminal-react-native/pull/652 to address it. We are targeting a release this week to fully resolve it
we just released https://github.com/stripe/stripe-terminal-react-native/releases/tag/v0.0.1-beta.17 to address this issue
closing this as Expo 50 now works with beta.17, feel free to open a new one if people are still running into issues
@nazli-stripe I can confirm that beta.17 works well with EXPO50. Thanks!
Describe the bug Building Android with Java 17 (default build envrionment on Expo for 50), is giving this error when using Expo 50:
To Reproduce Steps to reproduce the behavior:
Expected behavior Android build should work
I already used expo-build-properties to up the minSdkVersion to 26 and tried the solution shared here - https://github.com/stripe/stripe-terminal-react-native/issues/584#issuecomment-1848922273 so my plugin is like this:
Screenshots Please see error logs
Stripe Terminal React Native SDK version
"@stripe/stripe-terminal-react-native": "^0.0.1-beta.15",
Smartphone (please complete the following information):
Not applicable
Additional context
No