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.

App crashes on Samsung Galaxy S6 (Android 7.0+) with `opacity: 0.99`

See original GitHub issue

Bug description: Our app has a WebView wrapped in View, on which we set opacity: 0.99. On the Galaxy S6 (and a few other similar models, such as S6+, S6 Edge, etc…) with Android 7 or 8, the app will crash once the WebView renders.

If the OS is downgraded to Android 6, it stops crashing. If I change to opacity: 1, it also stops crashing. We’ve not seen crashes on any other devices.

To Reproduce: This is the commit which introduced the crash to our app: https://github.com/jd20/react-native-signature-pad/commit/46ae4459514e14ef4bdc1f1872bc727dad8b4c77

Generally though, the WebView code looks like:

    <View style={containerStyle} onLayout={onLayout}>
      {size && (
        <View style={size}>
          <WebView
            ref={setRef}
            automaticallyAdjustContentInsets={false}
            onMessage={onMessage}
            onLoadEnd={start}
            renderError={onError}
            renderLoading={loader}
            source={source}
            javaScriptEnabled={true}
            style={{
              ...StyleSheet.absoluteFillObject,
              backgroundColor,
              opacity: started ? 1 : 0,
            }}
          />
        </View>
      )}
    </View>

Expected behavior: Not to crash.

Environment:

  • OS: Android
  • OS version: 7.0
  • react-native version: Any react-native version
  • react-native-webview version: 11.3.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

2reactions
github-actions[bot]commented, Jul 26, 2021

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

0reactions
EricaLi123commented, Feb 21, 2022

Removing the opacity: 0.99 seems to work fine. I’ve not seen crashes on any other devices so far, after removing it.

While that’s a valid workaround, would be great to fix underlying issue, so if someone really did need to set opacity: 0.99, it wouldn’t crash the app.

Do you mean that setting opacity fix some crashes but sometimes cause crash? Or just can’t fix?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Galaxy S6 Edge - Apps Keep Crashing Fix - Fliptroniks.com
Kill all the running apps on your phone and then restart your galaxy s6 edge and try re opening the app up and...
Read more >
Crashing apps on your Samsung Galaxy device? This is the ...
Crashing apps on your Samsung Galaxy device? This is the solution · Navigate to Settings » Apps · Tap on the three dots...
Read more >
App Crashing on Android (SOLVED) - The Spotify Community
I have been having issues with the Spotify app on my Android devices since the last update (currently two hours ago). It crashes...
Read more >
Solved: PSA: Apps Crashing FIX, Android System Webview cra...
FYI I've been experiencing multiple apps crashing on my Galaxy S10 but others are reporting it on other Samsung and OnePlus devices.
Read more >
Samsung Galaxy S6 Edge Android 7 Host App freezes/crashes ...
Hey Guys, The Android Host App freezes/crashes every 24 hours on my Samsung Galaxy S6 Edge Android 7. Is that a bug or...
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