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

[ANDROID] Crashes appeared around March 13th (Chrome 73) #429

Closed
dlindstrm opened this issue Mar 18, 2019 · 67 comments
Closed

[ANDROID] Crashes appeared around March 13th (Chrome 73) #429

dlindstrm opened this issue Mar 18, 2019 · 67 comments

Comments

@dlindstrm
Copy link

dlindstrm commented Mar 18, 2019

We have encountered an issue when using Android 9 in combination with Chrome 73. When wrapping a WebView within a View styled with overflow: hidden the entire app crashes. I solved it by setting opacity: 0.99 on the WebView, and keep the overflow: hidden style on the wrapper. I found the solution here.

This problem will most likely be more and more common since more and more people are getting Chrome 73 each day.

I hope this issue will be useful to some people that are experiencing the same problem. However, this is not an elegant solution and I would be very happy if someone with more Android knowledge could give it a shot and try to fix the real problem.

Thanks!

@Titozzz
Copy link
Collaborator

Titozzz commented Mar 18, 2019

Can you either provide a clear repro // or tell me what's happening inside the device logs (using logcat or pidcat)?

@dlindstrm
Copy link
Author

@Titozzz The device logs didn't give us that much:

Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
...
backtrace:
#00  pc 00000000016341cc  /data/app/com.android.chrome-EkPqPbaUdv_NQr_2fMTO4A==/base.apk

To reproduce it you have to:

  1. Have an Android 9 device.
  2. Use Chrome 73.0.3683.75. I installed Chrome Beta from Play Store and switched webview implementation in android dev settings.
  3. Render this:
<View style={{ flex: 1, overflow: "hidden" }}>
  <WebView source={{ uri: "https://facebook.github.io/react-native/" }} />
</View>

@Titozzz Titozzz changed the title [ANDROID] Android 9 in combination with Chrome 73 makes the app crash [ANDROID] Crashes appeared around march 13th Mar 19, 2019
@Titozzz Titozzz added bug Help wanted Extra attention is needed labels Mar 19, 2019
@Salakar
Copy link
Collaborator

Salakar commented Mar 19, 2019

@lukebaker: @Titozzz and I tried to reproduce with a Samsung S10+ with Chrome version 73.0.3683.75 and couldn't reproduce this with the following snippet:

        <View style={{ flex: 1,  overflow: 'hidden' }}>
          <WebView source={{ uri: 'https://google.com' }}/>
        </View>

Please could you help/advise more on how to reproduce?

Thanks

@lukebaker
Copy link

@Salakar @Titozzz I've created a sample app that crashes on the following device: Android 9; Nokia 6.1 with Chrome 73.0.3683.75.

https://github.com/lukebaker/WebViewScrollBug

Steps to reproduce should be:

  1. clone repo
  2. yarn install
  3. react-native run-android
  4. scroll past WebView content (the white area).

@Titozzz
Copy link
Collaborator

Titozzz commented Mar 19, 2019

FYI: Does not crash on chrome 73.0.3683.75 android 8.0 Oneplus 3T

@Titozzz
Copy link
Collaborator

Titozzz commented Mar 19, 2019

@nfischer would you have an idea about what's happening? Looks like webview crashes on android P when it gets out of screen and probably unmounted.

Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 11172 (RenderThread) is not very explicit

@nfischer
Copy link

Could someone file a report at https://goo.gl/9qkbdn? If you can include a compiled APK (and a link to source code), my teammate and I can repro (and can likely get some more information).

@Titozzz
Copy link
Collaborator

Titozzz commented Mar 20, 2019

I'll do that asap.

@Titozzz
Copy link
Collaborator

Titozzz commented Mar 20, 2019

@tijs
Copy link
Contributor

tijs commented Mar 21, 2019

Just to add some more context; we too experienced this issue once Chrome 73 started rolling out last thursday. We had about 150.000 crashes before we applied the opacity: 0.99 hack which fixed it in most cases. We did however run into an issue with that fix where it prevents the webview content from rendering correctly (scroll actions behave erratically, taps are registered in different location from the actual tap) with the fix applied. Seems to be limited to large webviews e.g. 5000px high embedded in a ScrollView. For those specific webview we now open them in a Modal which seems to 'fix' the crash even without needing the opacity: 0.99 fix. We are still in the middle of researching this so i don't have much more specific info than that but perhaps this extra info will help someone out who is running into the same issue.

@Titozzz
Copy link
Collaborator

Titozzz commented Mar 21, 2019

@tijs this is so sad to read. Sadly this is out of my hands and we are waiting for more info from the Chromium team. You can read here all the comments https://bugs.chromium.org/p/chromium/issues/detail?id=944020#c11 until it went moved to internal threads we can't see. This also affects my app in production 😠.
Fingers crossed

@Salakar Salakar changed the title [ANDROID] Crashes appeared around march 13th [ANDROID] Crashes appeared around March 13th (Chrome 73) Mar 21, 2019
@Salakar Salakar pinned this issue Mar 21, 2019
@tijs
Copy link
Contributor

tijs commented Mar 21, 2019

@Titozzz don't be sad. I think this package has seen some great improvement since it has been extracted from react-native. Love where it's going and this sort of bug is not something you can prepare for.

Since webviews do not crash when loaded inside a react-native Modal component on Android 9 with Chrome 73 i still have some hope there is a fix beyond waiting for Chromium to do something though. I'd rather not wait for that :) Still think there is something in the interaction between the webview and the type of component it's embedded in specifically in react-native that is triggering this render crash.

@Titozzz
Copy link
Collaborator

Titozzz commented Mar 21, 2019

@tijs Thanks, you made my day. 😃

@nfischer
Copy link

until it went moved to internal threads we can't see

We aren't trying to hide the fix from you. We merged this into an auto-reported crash report, which we hide from the public by default to protect user security (the report has detailed crash stacks, which might potentially help a malicious actor trigger crashes or exploit user security). Fixes are landing (commit, commit). The public issue should still be comment-able, and you can ask on that ticket to hear status updates (I've pinged the thread to ask what state the bug is in).

This also affects my app in production

We recognize this bug affects real apps/users. Please understand this is not an intentional change, and bugs slip into every release (chromium is a relatively complex project, making it hard to verify every use case).

still have some hope there is a fix beyond waiting for Chromium to do something though

My team considers this to be a bug in WebView, and we're working hard to solve it. If you want to try workarounds, well, that's a decision you could make. I'd recommend you consider waiting until we release a fix (you can see we triaged this for M73, so that should be a matter of days rather than a 6-week release cycle). You can help us by telling us your app's package name and how to repro, so we can verify our fix is correct. Again, please do so on the public crbug.

As a final plug: Android WebView has a beta channel, which allows your team to get WebView updates 6 weeks before users. You can use this as an opportunity to smoke test your app to make sure our team hasn't accidentally broken it (and if we have, please file bugs against us).


Please take all of my comments with a grain of salt: I'm not promising what my team will push to production, I'm only trying to improve visibility and provide advice (based purely on the publicly available information).

@Titozzz
Copy link
Collaborator

Titozzz commented Mar 22, 2019

@nfischer I did not mean anything bad, just described the current situation so that users don't panic. I well aware you guys are probably handling this right now 💪.

@Salakar this made me think, would it be possible to write a test for detox with different chrome versions?

@github-actions github-actions bot removed the Stale label Aug 1, 2021
@SleeplessByte
Copy link

I can confirm that it still happens and that the 0.99 hack still works.

@sergeymild
Copy link

app is crashing when i am trying to open any page, Samsung Galaxy Fold 3
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x20 in tid 20060 (RenderThread), pid 19003

@gp3gp3gp3
Copy link

Another workaround is to hide and show the html view after transition animations are complete, I made another comment about it in the other issue here

@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

@github-actions github-actions bot added the Stale label Dec 26, 2021
@SleeplessByte
Copy link

I can confirm that it still happens and that the 0.99 hack still works.

@github-actions github-actions bot removed the Stale label Dec 27, 2021
@isinha-onefc
Copy link

Still happening for me. I have small webviews embedded inside a scrollview for rendering iframe data, like social media embeds. The crash happens when the screen is already displaying the content at the top of the scrollview and the user tries to scroll up, or if the scrollview is already at the bottom and the user tries to scroll down. I cannot turn android hardware acceleration to false because then the videos on the app won't play. I tried the opacity hack, the overflow hack and multiple other things, but nothing seems to work. Tested on Samsung Galaxy S10+ (Android 12) and Samsung Galaxy Z Flip 3 (Android 11). Please someone help me with a fix because my app is a Samsung exclusive and all of my target audience is experiencing crashes.

@github-actions
Copy link

github-actions bot commented Apr 9, 2022

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

@github-actions github-actions bot added the Stale label Apr 9, 2022
@SleeplessByte
Copy link

This is not stale

@github-actions github-actions bot removed the Stale label Apr 10, 2022
@isinha-onefc
Copy link

I added overScrollMode="never" to my container ScrollView and that seems to have fixed the problem for me.

@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

@github-actions github-actions bot added the Stale label Jun 10, 2022
@SleeplessByte
Copy link

It's not stale.

@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

@SleeplessByte
Copy link

This was probably not stale, but I'm also no longer interested in having to keep this open by some horrible bot that does nothing but generate more noise. Good luck everyone!

@mym0404
Copy link

mym0404 commented Jan 16, 2023

Still alive problem should be reopened

@emintatli
Copy link

This problem still exists.

@andreialecu
Copy link

This is fixed by #2874 - not yet merged, but you can use it via patch-package or similar meanwhile.

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