Skip to content

testDebugUnitTest tests failing when building with gradle in android #214

Description

@WhiskeyKev

Dependencies

"react": "19.1.0",
"react-native": "0.81.4",
"@react-native/new-app-screen": "0.81.4",
"react-native-safe-area-context": "^5.5.2",
"rollbar": "^2.26.4",
"rollbar-react-native": "^1.0.0"

Platforms

Android (I haven't tested yet on iOS)

Steps to reproduce

  1. Created a bare React-Native project (without expo framework) with the latest react-native stable release
  2. Added rollbar support to the React Native new app (following https://docs.rollbar.com/docs/react-native)
  3. Build app on android with gradle (./gradlew build)

Build fail caused by the task rollbar-react-native:testDebugUnitTest

> Task :rollbar-react-native:testDebugUnitTest

RollbarReactNativeTest > configUpdateDoNothingWhenNativeNotifierIsNotInitialized FAILED
    org.mockito.exceptions.base.MockitoException at RollbarReactNativeTest.java:28
        Caused by: org.mockito.exceptions.base.MockitoException at RollbarReactNativeTest.java:28
            Caused by: java.lang.IllegalStateException at RollbarReactNativeTest.java:28
                Caused by: java.lang.IllegalArgumentException at RollbarReactNativeTest.java:28

RollbarReactNativeTest > configUpdateSuccessfulWhenNativeNotifierIsInitialized FAILED
    org.mockito.exceptions.base.MockitoException at RollbarReactNativeTest.java:28
        Caused by: org.mockito.exceptions.base.MockitoException at RollbarReactNativeTest.java:28
            Caused by: java.lang.IllegalStateException at RollbarReactNativeTest.java:28
                Caused by: java.lang.IllegalArgumentException at RollbarReactNativeTest.java:28

2 tests completed, 2 failed

> Task :rollbar-react-native:testDebugUnitTest FAILED

Here is the test summary file from gradle: index.html

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions