Http only exception with local file in webview in wpf app
Environment
react-native-cli: 2.0.1 react: 16.3.1 react-native: 0.55.2 react-native-windows: 0.55.0-rc.0 rnpm-plugin-windows: 0.2.8 rnpm-plugin-wpf: 0.1.2 Node : v8.9.4 npm : 5.6.0
Target Platform: WPF Target Device: Desktop .NET 4.6 Visual Studio Version 2017 OS: Windows 7 Service pack 1
Steps to Reproduce
I an trying to open an html page from c:\ in wpf application. Refer below code.
<WebView source={{ uri: "file:///C:/test.html" }} />
It throws exception "only http and https schema are allowed". When i comment line "request.RequestUri = new Uri(uri);" in file \node_modules\react-native-windows\ReactWindows\ReactNative.Net46\Views\Web\ReactWebViewManager.cs at line number 118 then it works without any issue. Exactly what line "request.RequestUri = new Uri(uri);" does?
Is my uri scheme is incorrect?
This issue is fixed under - https://github.com/Microsoft/react-native-windows/pull/1830 @matthargett Please close this issue.
fixed by #1830