getsentry / sentry-react-native

Official Sentry SDK for React Native
https://sentry.io
MIT License
1.56k stars 330 forks source link

Task :react-native-sentry:compileDebugJavaWithJavac FAILED #610

Closed ldco2016 closed 4 years ago

ldco2016 commented 5 years ago

OS:

Platform:

Output of node -v && npm -v && npm ls --prod --depth=0

v11.10.1
6.7.0
NFIBEngage@1.0.7 /Users/danale/Projects/engage-application.mobile
├── appcenter@2.0.0
├── appcenter-analytics@2.0.0
├── appcenter-crashes@2.0.0
├── axios@0.16.2
├── date-fns@1.30.1
├── lodash@4.17.4
├── moment@2.20.1
├── payment@2.3.0
├── prop-types@15.6.0
├── react@16.8.3
├── react-native@0.59.9
├── react-native-autoheight-webview@0.6.1
├── react-native-calendar-events@1.6.1
├── react-native-device-info@0.21.5
├── react-native-exception-handler@2.8.9
├── react-native-image-progress@1.0.1
├── react-native-immediate-phone-call@1.0.0
├── react-native-input-scroll-view@1.6.7
├── react-native-keyboard-aware-scroll-view@0.4.4
├── react-native-keyboard-manager@4.0.13-7
├── react-native-material-buttons@0.5.0
├── react-native-material-dropdown@0.5.2
├── react-native-material-tabs@3.5.0
├── react-native-material-textfield@0.10.0
├── react-native-onesignal@3.0.7
├── react-native-popup-menu@0.8.3
├── react-native-sentry@0.32.0
├── react-native-size-matters@0.1.0
├── react-native-splash-screen@3.0.6
├── react-native-svg@6.3.1
├── react-native-swipe-view@3.0.1 (git+https://github.com/jjd314/react-native-swipe-view.git#123120431aaba5fddccc1eeea2903c6ca0029550)
├── react-native-tab-view@1.3.2
├── react-native-vector-icons@6.1.0
├── react-native-xcode-packager@0.1.0
├── react-navigation@1.5.11
├── react-redux@5.0.6
├── reactotron-react-native@3.5.0
├── reactotron-redux@3.1.0
├── recompose@0.26.0
├── UNMET PEER DEPENDENCY redux@4.0.1
├── redux-thunk@2.2.0
└── replace-in-file@3.1.1

npm ERR! peer dep missing: redux@^2.0.0 || ^3.0.0, required by react-redux@5.0.6
npm ERR! invalid: react-native-tab-view@0.0.74 /Users/danale/Projects/engage-application.mobile/node_modules/react-navigation/node_modules/react-native-tab-view

Config:

Sentry.config("__DSN__").install();

I have following issue:

I try to run react-native run-android and I get the following error:

> Task :react-native-sentry:compileDebugJavaWithJavac FAILED
/Users/danale/Projects/engage-application.mobile/node_modules/react-native-sentry/android/src/main/java/io/sentry/RNSentryModule.java:252: error: incompatible types: ReadableArray cannot be converted to ReadableNativeArray
            addExceptionInterface(eventBuilder, exception.getString("type"), exception.getString("value"), stacktrace.getArray("frames"));
                                                                                                                              ^
Note: /Users/danale/Projects/engage-application.mobile/node_modules/react-native-sentry/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 ':react-native-sentry:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

Steps to reproduce: I run gradle :app:installDevDebug from within `./android'

Actual result: I continue to get the above error.

Expected result:

javi10823 commented 5 years ago

same issue RN 0.59.5

aimadnet commented 5 years ago

same issue in RN 0.60.5

garfiaslopez commented 5 years ago

same issue in RN 0.60.5 x2

aimadnet commented 5 years ago

worked in RN 0.59.8

HazAT commented 5 years ago

Can you please try the new SDK @sentry/react-native if the issue still exists there?

Senhordim commented 4 years ago

worked in RN 0.59.10

SMJ93 commented 4 years ago

I'm getting this issue with @sentry/react-native:

BUILD FAILED in 16s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Note: /Users/a/Documents/work/b/a-light-ui/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.
KowalskiP commented 4 years ago

Same issue with RN 0.61

matt-dalton commented 4 years ago

This is happening to me on the latest Sentry version v1.0.8 with react native 0.60.6

> Task :@sentry_react-native:compileReleaseJavaWithJavac FAILED
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"));
santiagomartinez commented 4 years ago

Same as @matt-dalton

enieber commented 4 years ago

I comment this line is work... :smile:

peymancyb commented 4 years ago

same issue!

JorgeVV commented 4 years ago

Same error as matt-dalton. It was all good until I upgraded to v1.0.8.

vitormomberg commented 4 years ago

same issue! :(

ericksoncst commented 4 years ago

same issue

vitormomberg commented 4 years ago

I just found a solution, downgrade @sentry/react-native to 1.0.6.

Titozzz commented 4 years ago

https://gist.github.com/Titozzz/837da990bcc0ec9f43cc272b10288671 (patch package for 1.0.8) if needed. I'll PR

HazAT commented 4 years ago

This should be fixed in the latest version.

beshur commented 3 years ago

Happens again for me with @sentry/react-native 2.1.1 and React Native 0.63.3

abouzeyd commented 3 years ago

same issue

amravazzi commented 3 years ago

same issue