Error on opening download file link on android "Domain: undefined Error code -1"
See original GitHub issue- Site was opened
- Trying to open file download link
- File downloaded successfully
- Webview crashed with the next error message “Error loading page. Domain: undefined. Error Code: -1. Description: net::ERR_FAILED” I tried it for 2 different app builds and for different download file links.
One of the tested urls http://sources.codenet.ru/file/609/example.rar
<WebView source={{ uri: 'http://sources.codenet.ru/file/609/example.rar' }} />
To AndroidManifest added
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Environment:
-
OS: Android
-
OS version: 7
-
react-native version: 0.61.3
-
react-native-webview version: 7.4.3
-
Working fine for Android 10 emulator
-
Working fine for Android 7 emulator
-
Crashing for Android 7 device
Issue Analytics
- State:
- Created 4 years ago
- Reactions:15
- Comments:34 (3 by maintainers)
Top Results From Across the Web
Error on opening download file link on android "Domain
Error on opening download file link on android "Domain: undefined Error code -1" ; Site was opened; Trying to open file download link;...
Read more >android - Error loading page Domain:undefined Error Code: -1 ...
I am still generating this error for an expo start command and to view a page with a leaflet map - -works fine...
Read more >Fix Social Club - Error Loading Page || Domain Undefined
Thank You Everyone So Much For Watch My Video On " Fix Social Club - Error Loading Page || Domain Undefined - Error...
Read more >How To Fix Web page not available Error in Android Mobile ...
Hello Everyone Today We Are Going To Talk About How To Fix Web Page Not Available Error On Android.On your Device, Click and...
Read more >Error loading page. Domain: Undefined. Error Code: 2 ...
Couldn't open a note on my android phone this morning, got that error. Anybody seen that before? 5.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I solved it by adding
proyect/android/src/AndroidManifest.xml
android:usesCleartextTraffic="true"
If it doesn’t work by adding
android:usesCleartextTraffic="true"
.You can also add
android:networkSecurityConfig="@xml/network_security_config"
in yourandroid/app/src/main/AndroidManifest.xml
file.Creating
network_security_config.xml
file inandroid/app/src/main/res/xml
It may ignore some cert error.
Tested in
And I am still looking for a way to ignore all certificate error. Especially self-signed certificate.