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.

ScrollView crashing the app in release variant.

See original GitHub issue

Is this a bug report?

Yes!

Have you read the Contributing Guidelines?

Yes.

Environment

OS: Windows 10 Node: 9.3.0 Yarn: 0.24.5 npm: 5.6.0 Watchman: Not Found Xcode: N/A Android Studio: Version 3.0.0.0 AI-171.4443003

Packages: (wanted => installed) react: 16.0.0 => 16.0.0 react-native: 0.50.4 => 0.50.4

Target Platform:

  • Android (7.1.1)
  • Android (6.0)

Steps to Reproduce

  • Start a fresh react native project. Run react-native init Test --version 0.50.4
  • Edit the App.js file with following changes
...

<View style={styles.container}>
   <ScrollView contentContainerStyle={{ flexGrow: 1 }}>
      <Text style={styles.welcome}>
         Welcome to React Native!
      </Text>
      <Text style={styles.instructions}>
         To get started, edit App.js
      </Text>
      <Text style={styles.instructions}>
            {instructions}
       </Text>

       ...

   </ScrollView>
</View>

...

Expected Behavior

Expected the app to work normal in release version like in dev.

ezgif com-video-to-gif

Actual Behavior

  • App crashes on startup.
  • Confirmed the issue on 2 different computers.
  • Same issue persist on react-native version 51.0
  • App works as expected on react-native version 49.5

ezgif com-video-to-gif 2

Reproducible Demo

Download the project. Run npm install Run react-native run-android --variant=release

https://github.com/Aleksandar-FFWD/react-native-test

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
Aleksandar-FFWDcommented, Dec 29, 2017

@aspidvip Its connected to #17348 as I can see.

There is an issue with ..\node_modules\react-native\Libraries\Components\Subscribable.js on componentWillUnmount function.

The workaround I did was to change this:

componentWillUnmount: function() {
    this._subscribableSubscriptions.forEach(
      (subscription) => subscription.remove()
    );
    this._subscribableSubscriptions = null;
},

To this:

componentWillUnmount: function() {
    this._subscribableSubscriptions && this._subscribableSubscriptions.forEach(
      (subscription) => subscription.remove()
    );
    this._subscribableSubscriptions = null;
},
0reactions
bridgewaterlabscommented, Mar 16, 2018

I have huge issue with ScrollView not running properly in release mode … WTF in debug all works fine

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native ScrollView Crashes on Android APK
react-native run-android --variant=release. The app launches fine and I can navigate to all the pages, but whenever I try to scroll or press ......
Read more >
iOS 16.1 Crashes when scroll (LazyVStack and LazyVGrid)
Start scrolling to top. It blinks and show incorrect count: you see that it shows 1 item in line, but it is impossible....
Read more >
Slow rendering - Android Developers
Run a release (or at least non-debuggable) version of your app. · Enable Profile GPU Rendering. · There are certain components, such as ......
Read more >
Wrap content inside a scroll view - Unity - Manual
Wrap content inside a scroll view. Version: 2021.3+. This example demonstrates how to use styles to wrap content inside a scroll view.
Read more >
Crash/Issue on snackbar swipe [37087964] - Visible to Public
I just checked with the com.android.support:design:23.3.0 library, and it doesn't crash any more but the bug is still there, resulting the UI issue...
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