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

webview not working on Android 10 #1196

Closed
hanifmhd opened this issue Feb 10, 2020 · 33 comments
Closed

webview not working on Android 10 #1196

hanifmhd opened this issue Feb 10, 2020 · 33 comments

Comments

@hanifmhd
Copy link

Since the new update of API 29 Android 10 in December 2019, react-native-webview is not working on Android 10.

Bug description:
White screen on the view

To Reproduce:
<View style={{flex: 1}}> <WebView style={{flex: 1}} startInLoadingState scalesPageToFit javaScriptEnabled source={{ uri: RestConstant.grafanaLink + this.state.username, headers: { Authorization: 'Bearer ' + this.state.token, }, }} originWhitelist={['*']} domStorageEnabled={true} ignoreSslError={true} renderError={e => { return this.renderError(); }} /> </View>

Expected behavior:
Show the webview from url
on iOS
Screen Shot 2020-02-10 at 10 58 03

Screenshots/Videos:
White screen and loop loading
on Android Nexus 5 API 29
Screen Shot 2020-02-10 at 11 04 30

Environment:

  • OS: Android
  • OS version: 10
  • react-native version: 0.61.2
  • react-native-webview version: ^7.4.3
@mghozyn
Copy link

mghozyn commented Feb 10, 2020

Same problem, need solution for this bugs. Happen in Samsung Galaxy Note 10

@imamkodei889
Copy link

same problem.. need solution..

@mahavirvataliya
Copy link
Contributor

+1

@mghozyn
Copy link

mghozyn commented Mar 10, 2020

Any update on this bugs ?

@ryanpatk
Copy link

same problem

1 similar comment
@njthulung
Copy link

same problem

@kimpoy04
Copy link

Encountered this in expo. Fixed it by executing: yarn react-native link react-native-webview

@maxlxq
Copy link

maxlxq commented Mar 24, 2020

same problem +1

@xinfang
Copy link

xinfang commented Apr 1, 2020

+1

1 similar comment
@andraz-at
Copy link

+1

@sebqq
Copy link

sebqq commented Apr 17, 2020

Hmm so there is currently no solution for this one? I'm encountering same issue but only in production release (using Android App Bundle)

@sebqq
Copy link

sebqq commented Apr 17, 2020

Oh, my problem was that I didn't explicitely prepend "https://" to the URL address.

@oailloud
Copy link

oailloud commented May 29, 2020

Same here, our users report crashes with Android 10 (amongst devices there's a S9).

Sadly, I can't reproduce it on the emulator and I don't have any physical device.
Does anyone have a clue of what's going on? Maybe an exception trace?

Could it be related with Google stopping using Chrome as the WebView handler in Android 10 and switching back to Android System WebView?

For info, I've tried updating to 10.1.1 without success.

@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

@jatin9996
Copy link

facing the same issue

@KyawSoeHein
Copy link

is anyone able to workaround this? I am also facing the same issue.

@oailloud
Copy link

For me, disabling the hardware acceleration was enough to fix it, see #1069 (comment) if that's acceptable in your case.

@KyawSoeHein
Copy link

@oailloud, disabling hardware acceleration does not work in my case.

@halocedark
Copy link

Same problem with me, it is showing a blank sceen when I load a url, I have android 10, I am using Android Studio.

@f11-tech
Copy link

+1

@MarioKrstevski
Copy link

MarioKrstevski commented Nov 12, 2020

+1 But except this happens to me on Android Studio + Java. I think it's something to do with the WebView implementation itself ( a guess at best ). The issue appears for only Android 10+ devices and for only the one website I'm trying to access. The website opens on Android 8 devices and other sites (URLs) open on both Android 10 & 8. So I don't know if that's helpful for this thread

@Raphaelinyang
Copy link

Raphaelinyang commented Nov 30, 2020

plus 1 ( android 10)

@vitorverasm
Copy link

+1 any updates?

@Raphaelinyang
Copy link

No update

@coolswood
Copy link

+1

@Rakshith658
Copy link

+1

@monkeyK1n9
Copy link

+1 any update?

@mainguyenhoi
Copy link

+1

1 similar comment
@IlyaTaidi
Copy link

+1

@ThanhKhiem2k
Copy link

I have fixed this issue.. You need to uninstall 'Android System WebView' on your Android 10 device then update it. done

@solimanian
Copy link

same problem +1

@kundakcii
Copy link

+1

1 similar comment
@Elliott-Chong
Copy link

+1

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