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

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

Closed
jd20 opened this issue Mar 24, 2021 · 7 comments
Closed

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

jd20 opened this issue Mar 24, 2021 · 7 comments

Comments

@jd20
Copy link

jd20 commented Mar 24, 2021

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: jd20/react-native-signature-pad@46ae445

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
@superandrew213
Copy link

@jd20 when did you start seeing this? We started seeing this error on 22 March.

Do you have overflow: 'hidden' on parent View?

@jd20
Copy link
Author

jd20 commented Mar 24, 2021

We are not using overflow: 'hidden' on the parent View (or anywhere else). We've been seeing the issue (only ever on S6 devices running Android 7 or higher) every since we added the opacity: 0.99 fix (about 6 months ago).

@sr7354476
Copy link

I also faced same issue on Samsung Galaxy S7 series. Any solution you got @jd20 ?

@jd20
Copy link
Author

jd20 commented Apr 8, 2021

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.

@avonipenti
Copy link

Has removing opacity caused any issues on Android 8+ as I see another issue in Here
I don't want to fix for Samsung while causing additional crashes for others.

@github-actions
Copy link

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

@EricaLi123
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants