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

Crash in older version of analytics-react-native #857

Closed
sushilr opened this issue Jul 11, 2023 · 1 comment
Closed

Crash in older version of analytics-react-native #857

sushilr opened this issue Jul 11, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@sushilr
Copy link

sushilr commented Jul 11, 2023

  • analytics-react-native version: 1.5.3
  • Integrations versions (if used): Amplitude (3.1.0 transitive dep)
  • Android only (also forcing analytics-android to 4.10.4 to fix an ANR)

Steps to reproduce
We've started seeing this crash intermittently:

java.lang.NullPointerException · Attempt to invoke interface method 'int java.lang.CharSequence.length()' on a null object reference
Utils.java:208 com.segment.analytics.internal.Utils.isEmptyOrBlank
Analytics.java:1101 com.segment.analytics.Analytics$Builder.<init>
Analytics.java:178 com.segment.analytics.Analytics.with
RNAnalyticsModule.kt:44 com.segment.analytics.reactnative.core.RNAnalyticsModule.getAnalytics
RNAnalyticsModule.kt:216 com.segment.analytics.reactnative.core.RNAnalyticsModule.setup
Method.java:-2 java.lang.reflect.Method.invoke
JavaMethodWrapper.java:372 com.facebook.react.bridge.JavaMethodWrapper.invoke
JavaModuleWrapper.java:188 com.facebook.react.bridge.JavaModuleWrapper.invoke
NativeRunnable.java:-2 com.facebook.jni.NativeRunnable.run
Handler.java:980 android.os.Handler.handleCallback
Handler.java:104 android.os.Handler.dispatchMessage

I've seen posts about this in analytics-android repo and the recommendation was to create an issue here.

We are not ready yet to migrate to 2.x. I was wondering if there's a workaround to fix this crash since it is impacting our stability numbers. Does updating the android native dependency to 4.11.3 help?

Expected behavior
Does not crash

Actual behavior

@sushilr sushilr added the bug Something isn't working label Jul 11, 2023
@sushilr sushilr changed the title Crash in older version Crash in older version of analytics-react-native Jul 11, 2023
@sushilr
Copy link
Author

sushilr commented Jul 26, 2023

Closing since we decided to migrate to 2.x

@sushilr sushilr closed this as completed Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant