Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error with version 1.0.8 #690

Closed
3 of 7 tasks
Mitch528 opened this issue Oct 10, 2019 · 9 comments · Fixed by #693
Closed
3 of 7 tasks

Compilation error with version 1.0.8 #690

Mitch528 opened this issue Oct 10, 2019 · 9 comments · Fixed by #693

Comments

@Mitch528
Copy link

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native
  • react-native-sentry

react-native version: 0.61.2


I have following issue:

Upgrading to @sentry/react-native version 1.0.8 results in a compilation error:

> Task :@sentry_react-native:compileDebugJavaWithJavac FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
902 actionable tasks: 16 executed, 886 up-to-date
/Users/mitch528/repos/Project/node_modules/@sentry/react-native/android/src/main/java/io/sentry/RNSentryModule.java:190: error: incompatible types: String cannot be converted to Type
                    breadcrumbBuilder.setType(breadcrumb.getString("type"));
                                                                  ^
Note: /Users/mitch528/repos/Project/node_modules/@sentry/react-native/android/src/main/java/io/sentry/RNSentryModule.java uses or overrides a deprecated API.

Steps to reproduce:

  • Upgrade to version 1.0.8
  • Build

Actual result:

  • Compile fails

Expected result:

  • Compile succeeds
@fungilation
Copy link

Same here. Used to build up to 1.0.7. A little more log for debug:

/Users/gfung/Documents/code/WonderSwipe/node_modules/@sentry/react-native/android/src/main/java/io/sentry/RNSentryModule.java:190: error: incompatible types: String can
not be converted to Type
                    breadcrumbBuilder.setType(breadcrumb.getString("type"));
                                                                  ^
Note: /Users/gfung/Documents/code/WonderSwipe/node_modules/@sentry/react-native/android/src/main/java/io/sentry/RNSentryModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':@sentry_react-native:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

@lukebars
Copy link
Contributor

Same is happening here. Looks like String is being cast to type without being converted

@Titozzz
Copy link
Contributor

Titozzz commented Oct 11, 2019

https://gist.github.com/Titozzz/837da990bcc0ec9f43cc272b10288671 if anyone needs it. I'll submit a PR in the meantime

@lobsterkatie
Copy link
Member

Sorry, all - we're aware of this and are working on a fix.

@lobsterkatie
Copy link
Member

lobsterkatie commented Oct 11, 2019

Thanks for @Titozzz for the fix, which we've merged, and released as 1.0.9.

@acollazomayer
Copy link

I have the same problem with version 1.0.9

@lobsterkatie
Copy link
Member

@acollazomayer - same exact error message? Can you please post whatever output you're seeing if it's different from the OP's?

@bruscantini
Copy link

I have the same problem with version 1.0.9

Try using Jetify after using the Android Studio migration tool.
Make sure your app is AndroidX
npm install --save-dev jetifier
npx jetify

@lobsterkatie
Copy link
Member

Also, @acollazomayer - please try updating the the latest @sentry/react-native (1.3.3 as of this writing) - we moved our android dependency from sentry-java to the new sentry-android SDK, which should hopefully eliminate any number of previous problems.

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 a pull request may close this issue.

7 participants