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.

Which OS ?

android

Version

Which versions are you using:

  • react-native-swiper v1.5.10
  • react-native v0.47.1

Expected behaviour

no crash!

Actual behaviour

the app crashes due to this line:

  const state = this.state
  let index = state.index
  const diff = offset[dir] - this.internals.offset[dir]
  const step = dir === 'x' ? state.width : state.height
  let loopJump = false
...

because this.internals.offset is undefined

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:10

github_iconTop GitHub Comments

5reactions
valinagacommented, Sep 15, 2017

I found the issue. In the initState method, to the end, you need to change: this.internals = { …this.internals, isScrolling: false }; to this.internals = { …initState, isScrolling: false }; It looks like the internals is initiated there and there’s no other reference of it. Whoever need to give it a ride can test the fork here: https://github.com/valinaga/react-native-swiper Hope it helped.

0reactions
elraphacommented, May 15, 2021

I have the same problem. Anyone got a solution to this? “react-native-swiper”: “^1.6.0”, react-native": “~0.63.4”,

After a few swipes…my app just closes

Read more comments on GitHub >

github_iconTop Results From Across the Web

Detect and diagnose crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >
Fix an Android device that's restarting or crashing
Restart your phone. One by one, remove recently downloaded apps. Learn how to delete apps. After each removal, restart your phone normally. See...
Read more >
Why are my Android phone apps crashing or closing & how to ...
Another reason for Android apps crashing can be a lack of storage space in your device. This can occur when you overload your...
Read more >
Why do my apps keep crashing on Android, How to fix it
How to fix apps that keep crashing on Android · 1. Force stop the app · 2. Restart the device · 4. Reinstall...
Read more >
How to Stop Apps From Crashing on Android - AVG
Freezing apps can be caused by the apps themselves, due to programming bugs, or by the way they're used — if you try...
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