Closed
Description
I'm trying to load this URL https://gitter.im/login
in my web view component, but it doesn't loads.
I've tried to load it in a default android browser and it had loaded successfully.
Some code:
<View style={{flex: 1}}>
<WebView
ref='webview'
style={{height: 400}}
url={'https://gitter.im/login/'}
javaScriptEnabled={true}
domStorageEnabled={true}
onNavigationStateChange={this.onNavigationStateChange}
/>
</View>
I'm on 0.18.0-rc.
Also tried other URLs, and it works perfectly works well only if there is no js. It seems like a bug with enabling javascript.
Also tried to use javaScriptEnabledAndroid
, but nothing was change.
Activity
[-][Android WebView] can't load ulr[/-][+][Android WebView] can't load url[/+]facebook-github-bot commentedon Jan 9, 2016
Hey terrysahaidak, thanks for reporting this issue!
React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
react-native
or for more real time interactions, ask on Discord in the #react-native channel.satya164 commentedon Jan 10, 2016
Do other pages load? Can you open
chrome://inspect
and see if you can debug the issue?terrysahaidak commentedon Jan 10, 2016
@satya164 yup, it does. But I still cant load gitter.im site. It loads welcome screen, then I'm login through GitHub and redirecting back, but it doesn't loads. And when I'm trying to visit it again with my cookies, it won't load.
I think it isn't the problem with Gitter because there is an app for android called Developer Talks where the user should login through webview.
I'll try to inspect it later and let you know.
And sorry for my English :)
terrysahaidak commentedon Jan 11, 2016
@satya164 I've debugged the issue and I assume that it doesn't render the HTML.

I can also submit the form with this code:
terrysahaidak commentedon Jan 11, 2016
Also tried to load this URL with this app (github) and it works.
tomauty commentedon Jan 11, 2016
No console errors?
terrysahaidak commentedon Jan 11, 2016
@tomauty no. BTW I'm running it in 5.1.1 on my sgs4 i9505.
It seems like a magic 😄
terrysahaidak commentedon Jan 28, 2016
Just tried it with 0.19.0-rc and got the same result. 😟
terrysahaidak commentedon Jan 31, 2016
Just got it working by deleting some css code. But still can't realize why it does not work like native webview?
I've disabled

height: 100%
html tag's rule (the best result i've got because of that). And got it:kevinejohn commentedon Feb 8, 2016
+1 I'm running into the same issue with certain websites.
kevinejohn commentedon Feb 8, 2016
I figured it out. If you make the WebView as the parent instead of being nested in the View it loads the websites fine. Not exactly sure why.
terrysahaidak commentedon Feb 8, 2016
@kevinejohn now it nested only inside some containers -- Navigator and Root
I've fixed that by injection this js code:
27 remaining items
spicylobster commentedon Jun 16, 2016
@ncnlinh You are quite right. I finally solved this problem using your method. some other reference https://bugzilla.xamarin.com/show_bug.cgi?id=25932
ncnlinh commentedon Jun 16, 2016
@spicylobster I was using a custom webview component for a while now. I think Webview itself in Android is very customizable, and one may want to add JavascriptInterface, override URL loading, and change other settings. So I feel that it's hard to ask RN to accommodate everything in one component...
Webview: Fix broken fullscreen modals due to zero body height.
tyao1 commentedon Aug 11, 2016
I've spent several hours and managed to make all WebView pages to display on Android.
I'm using version 0.30.
Hope it helps!
fnd009 commentedon Aug 24, 2016
Hi, I had this problem too but when I specify the width in the style then the page is now displayed/rendered.
Webview: Fix broken fullscreen modals due to zero body height.
nfabian13 commentedon Aug 31, 2016
@fnd009 That solved my issue. Thanks
matthewvincent commentedon Sep 29, 2016
@fnd009 this solved my issue, no clue why but thanks!
tioback commentedon Oct 22, 2016
I keep randomly getting a blank page. I noticed the following in logcat: