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 Encountered an error loading page canGoForward: false, code: -1, canGoBack: false, description: "net::ERR_ACCESS_DENIED", loading: false, …} #21104

Closed
3 tasks done
mohamed-sultan opened this issue Sep 13, 2018 · 10 comments
Labels
Component: WebView Related to the WebView component. Platform: Linux Building on Linux. Resolution: Locked This issue was locked by the bot.

Comments

@mohamed-sultan
Copy link

mohamed-sultan commented Sep 13, 2018

Environment

React Native Environment Info:
System:
OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
CPU: x64 Intel(R) Core(TM) i5 CPU M 460 @ 2.53GHz
Memory: 122.76 MB / 5.62 GB
Shell: 4.4.19 - /bin/bash
Binaries:
Node: 8.10.0 - /usr/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 3.5.2 - /usr/bin/npm
npmPackages:
react: 16.4.1 => 16.4.1
react-native: 0.56.1 => 0.56.1
npmGlobalPackages:
react-native-cli: 2.0.1

dependencies:
axios": "^0.18.0",
"react": "16.4.1",
"react-native": "0.56.1",
"react-native-file-viewer": "^1.0.5",
"react-native-fs": "^2.11.15",
"react-native-image-placeholder": "^1.0.14",
"react-native-vector-icons": "^5.0.0",
"react-native-zip-archive": "^2.2.6",
"rn-fetch-blob": "^0.10.13"
}

Description

failed to load internal html file from android emulator In WebView

Reproducible Demo

here is my source code
<WebView

          style={{width:'100%',height:'100%'}}
          source={{ uri: `file://${RNFS.DocumentDirectoryPath}/fake/Elements/index.html`}}
/>
@react-native-bot react-native-bot added the Component: WebView Related to the WebView component. label Sep 13, 2018
@react-native-bot
Copy link
Collaborator

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write [skip envinfo] under Environment to let us know.

@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists.

The ":rewind:Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.

@maxammann
Copy link

maxammann commented Sep 17, 2018

I'm experiencing a similar problem when trying to show an image:

                  <WebView
                    source={{
                      baseUrl: RNFetchblob.fs.dirs.DocumentDir,
                      // html: '<html><body><a href="file:///data/user/0/com.app/files/red.png">asdf</a></body></html>'
                    }}
                    allowFileAccess={true}
                    scalesPageToFit={true}
                    originWhitelist={['*']}
                  />

I'm using version 0.57.0.

It works on ios.

@maxammann
Copy link

@maxammann
Copy link

I got it working with react-native-webview. Will look into it why it works only with this.

@maxammann
Copy link

The reason is that this commit is missing in react native 0.57.0.

@Titozzz
Copy link
Collaborator

Titozzz commented Sep 26, 2018

Closing here. If the issue is still present on the new repository please open an issue there as @maxammann said ❤️

@Titozzz Titozzz closed this as completed Sep 26, 2018
@zhllucky
Copy link

@react-native-bot I have the same question in 0.57.3

@mnoandh
Copy link

mnoandh commented Dec 6, 2018

it happened to me also in android only when I use WebView from react-native .. but when I use WebView from react-native-webview I get another error for both ios and android ! is there any solution!

OS: Windows 7
Node: 8.11.1
Yarn: 1.9.4
npm: 6.2.0
"dependencies": {
"axios": "^0.16.2",
"expo": "^25.0.0",
"html-entities": "^1.2.1",
"moment": "^2.18.1",
"native-base": "^2.8.1",
"prop-types": "^15.6.0",
"react": "16.2.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-25.0.0.tar.gz",
"react-native-htmlview": "^0.13.0",
"react-native-render-html": "^3.10.0",
"react-native-video": "^3.2.1",
"react-native-webview": "^2.14.0",
"react-navigation": "^1.0.0-beta.27",
"react-redux": "^5.0.5",
"redux": "^3.7.2",
"redux-persist": "^4.8.2",
"redux-thunk": "^2.2.0",
"sanitize-html": "1.15.0"
},

1079339668
1419591602

@maxammann
Copy link

@mnoandh Please open an issue in the react-native-webview github repo. Also add a code example.

@facebook facebook locked as resolved and limited conversation to collaborators Sep 26, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Sep 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: WebView Related to the WebView component. Platform: Linux Building on Linux. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

7 participants