question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

KotlinNullPointerException

See original GitHub issue

Environment

“react-native-pager-view”: “^5.1.2” OnePlus 8T Android 11 (SDK 30)

Issue

com.reactnativepagerview.PagerViewViewManager.createViewInstance

kotlin.KotlinNullPointerException: 
  at com.reactnativepagerview.PagerViewViewManager.createViewInstance (PagerViewViewManager.kt:30)
  at com.reactnativepagerview.PagerViewViewManager.createViewInstance (PagerViewViewManager.kt:21)
  at com.facebook.react.uimanager.ViewManager.createViewInstance (ViewManager.java:139)
  at com.facebook.react.uimanager.ViewManager.createView (ViewManager.java:82)
  at com.facebook.react.uimanager.NativeViewHierarchyManager.createView (NativeViewHierarchyManager.java:269)
  at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute (UIViewOperationQueue.java:179)
  at com.facebook.react.uimanager.UIViewOperationQueue$1.run (UIViewOperationQueue.java:773)
  at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches (UIViewOperationQueue.java:888)
  at com.facebook.react.uimanager.UIViewOperationQueue.access$2200 (UIViewOperationQueue.java:42)
  at com.facebook.react.uimanager.UIViewOperationQueue$2.runGuarded (UIViewOperationQueue.java:846)
  at com.facebook.react.bridge.GuardedRunnable.run (GuardedRunnable.java:29)
  at android.os.Handler.handleCallback (Handler.java:883)
  at android.os.Handler.dispatchMessage (Handler.java:100)
  at android.os.Looper.loop (Looper.java:214)
  at android.app.ActivityThread.main (ActivityThread.java:7710)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:516)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:950)

This is the error I’m getting from the google play console

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:15
  • Comments:27 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
YanisKondakovcommented, Jun 23, 2021

We still have the crash on production.

Packages versions:

"react-native": "0.64.0"
"react-native-pager-view": "5.2.1"
"react-native-tab-view": "3.0.1"

Hermes: true

2021-06-23_14-17

2reactions
cojj90commented, Apr 21, 2021

@troZee I found one reliable way to replicate this bug.

Have the pager render behind the Android permission request popup.

For me, when I start my app, it requests for an Android permission immediately. Behind the popup, I see my app rendering and it crashes as soon as it tries to render the pager stuff. If I dismiss it (i.e. Allow or deny the permission) quick enough, it will not crash

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kotlin - why do I get a KotlinNullPointerException
Starting from Kotlin 1.4, the exception will be NullPointerException instead (a different type), see here. So if any code catches explicitly ...
Read more >
KotlinNullPointerException - Kotlin Programming Language
Returns an array of stack trace elements representing the stack trace pertaining to this throwable. val Throwable.stackTrace: Array<StackTraceElement> ...
Read more >
KotlinNullPointerException at LateinitLowering$lower$1 ...
Compose Complier exception on lateinit: KotlinNullPointerException at LateinitLowering$lower$1.visitProperty · Issue summary · Add comment · Issue metadata.
Read more >
java.lang.NullPointerException is thrown instead of kotlin. ...
NullPointerException is thrown instead of kotlin.KotlinNullPointerException in not-null assertions. Duplicates 1. Duplicates 1 issue (0 unresolved).
Read more >
Kotlin NullPointerException: Parameter specified as non- ...
Learn what happens when we store a null value into a non-null data type in Kotlin.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found