DataDog / dd-sdk-reactnative

Datadog SDK for ReactNative
Apache License 2.0
121 stars 42 forks source link

Crash app on android caused by 'Can't find variable: BigInt' #725

Open quocbinhof97 opened 3 days ago

quocbinhof97 commented 3 days ago

Stack trace

Android build is crash when setting config.firstPartyHosts = ['example.com'];, but it work well on IOS.

In my gradle.properties

newArchEnabled=false
hermesEnabled=false

If I enable hermesEnabled=true it works fine, but I want to use the JS engine. Can anyone help me about it.

Image

Reproduction steps

Run android build via react-native run-android

Volume

100%

Affected SDK versions

2.4.3

Latest working SDK version

2.4.3

Does the crash manifest in the latest SDK version?

Yes

React Native Version

0.74.3

Package.json Contents

No response

iOS Setup

No response

Android Setup

android/app/build.gradle

dependencies {
    // The version of react-native is set by the React Native Gradle Plugin
    implementation("com.facebook.react:react-android")

    if (hermesEnabled.toBoolean()) {
        implementation("com.facebook.react:hermes-android")
    } else {
        implementation jscFlavor
    }
}

Device Information

No response

Other relevant information

No response

marco-saia-datadog commented 18 hours ago

Hello @quocbinhof97 👋

Thank you for reaching out!

Could you please share your package.json?

quocbinhof97 commented 18 hours ago

Hello @marco-saia-datadog, Thank you for your attention. Here is my package.json

{ "name": "example", "version": "0.0.1", "private": true, "dependencies": { "@datadog/mobile-react-native": "^2.4.3", "@datadog/mobile-react-navigation": "^2.4.3", "@react-navigation/bottom-tabs": "^6.6.0", "@react-navigation/material-top-tabs": "^6.6.13", "@react-navigation/native": "^6.1.18", "@react-navigation/stack": "^6.4.0", "axios": "^1.7.2", "react": "18.2.0", "react-native": "0.74.3", "react-native-config": "^1.5.2", "react-native-fs": "^2.20.0", "react-native-safe-area-context": "^4.10.8", "react-native-screens": "^3.32.0", "rxjs": "^7.8.1", "uuid": "^10.0.0", "yup": "^1.4.0", ............. }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/babel-preset": "0.74.85", "@react-native/eslint-config": "0.74.85", "@react-native/metro-config": "0.74.85", "@react-native/typescript-config": "0.74.85", "@types/react": "^18.2.6", "@types/react-test-renderer": "^18.0.0", "@types/uuid": "^10.0.0", "babel-jest": "^29.6.3", "eslint": "^8.19.0", "jest": "^29.6.3", "prettier": "2.8.8", "react-test-renderer": "18.2.0", "typescript": "5.0.4" }, "jest": { "preset": "react-native" }, "engines": { "node": ">=18" }, }

quocbinhof97 commented 59 minutes ago

The following details may be helpful:

async httpGet( url: string, config?: AxiosRequestConfig | undefined, ): Promise<AxiosResponse> { return this.axiosInstance.get(url, config); //An error occurred when this line was called }


- Logs from AxiosError, I have this information:

export const errorInterceptor = (error: AxiosError) => { const { response, request } = error; console.log('request', error); //[TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[1], "./TracingIdentifier").TracingIdentifier')] console.log('response', response); //undefined };