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

[WebViewExample] Bundled HTML does not work #6004

Closed
lu-ko opened this issue Feb 18, 2016 · 18 comments
Closed

[WebViewExample] Bundled HTML does not work #6004

lu-ko opened this issue Feb 18, 2016 · 18 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@lu-ko
Copy link

lu-ko commented Feb 18, 2016

I cannot render bundled HTML file in WebView. I suppose it is a bug in React Native because it does not work also in your WebViewExample and UIExplorer.

Error in Android emulator:

  • E/ReactNativeJS: Requiring unknown module "./helloworld.html". If you are sure the module is there, try restarting the packager.
  • Restart of packager did not help.
  • React Native version: 0.19

Error in your online UIExplorer:

  • Error loading page. Domain: NSURLErrorDomain. Error Code: -1100. Description: The requested URL was not found on this server.
  • See screenshot.

uiexplorer-webview-bundledhtml-error

@lu-ko
Copy link
Author

lu-ko commented Feb 25, 2016

It's fixed in React Native v.0.20, but there is still the same error in UIExplorer. Maybe it was not upgraded to latest version yet. Thank you guys!

@letsila
Copy link

letsila commented Mar 18, 2016

+1 have encountered the same issues

@slootzky
Copy link

I have the same error and behavior , can't present local html in webView in both ios and Android.
here's a sample RN app to demonstrate the behavior.

sample app

any idea? I'm on 0.23.1 and now testing on 0.24 and it also don't wokr.

@comiclee
Copy link

+1 It doesn't work on the latest 0.25.1

@slootzky
Copy link

@comiclee one solution is to load the html with require , I still haven't upgraded to 0.25 but it works for 0.23

@comiclee
Copy link

@rotemsloo, require html files can work in develope mode, but fails in release apk file

@ramilushev
Copy link

+1. I'm seeing this on latest version. Debug build is fine, but release shows blank page.

@nicklockwood
Copy link
Contributor

cc: @dmmiller

@dmmiller
Copy link

Looking at release build now. Thanks for the heads up.

@lacker
Copy link
Contributor

lacker commented Oct 26, 2016

As far as I can tell this got fixed. I'm going to close this issue but if people see it recur with recent builds of React Native please feel free to open a new issue.

@lacker lacker closed this as completed Oct 26, 2016
@saumya
Copy link

saumya commented Nov 8, 2016

Its still not working, I mean its not fixed.

RN 0.36 on Android. Assets need to be manually placed as suggested above.

@eggli
Copy link

eggli commented Nov 10, 2016

Not working on RN 0.37 as well.

@xsstomy
Copy link

xsstomy commented Jan 5, 2017

Not working on RN 0.39.2 as well.

@Lxxyx
Copy link
Contributor

Lxxyx commented Jan 24, 2017

Not working on RN 0.40 as well.

@raymall
Copy link

raymall commented Feb 9, 2017

Not working on RN 0.41 as well.

@wkw
Copy link

wkw commented Mar 6, 2017

on RN 0.40, require('./file.html') is failing for me in Build release variant. as others have mentioned above.
As workaround, I was able to put the file in android assets dir, and { uri: file:///android_asset/file.html } it in from there. Unfortunately for my situation, the html file loads remote third-party libs which internally reference protocol-agnostic resources: e.g., //domain.com/file.json. So those all got turned into file://domain.com/file.json links and of course failed.
I monkey patched XMLHttpRequest to change //... to https://... which solved that problem, but none of the images those libs attempt to load, will load. all broken. And I've been unable to find a way to determine what the requests look like for those images, to see why they break/fail-to-load.

@saumya
Copy link

saumya commented Mar 31, 2017

As @lacker was saying we should open a new issue, has anyone opened a new issue for this? Or should we continue in this thread? For me, it seems we should continue here only and re-open this one.

@FuadBalashov
Copy link

It looks like this is being tracked in this issue now: #7924

Scriptonita pushed a commit to Scriptonita/qa-react-native-technical-test that referenced this issue Jun 25, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Jul 20, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests