Catch 302 redirect on onNavigationStateChange method on Android
See original GitHub issueBug description:
On Android I’m not catch url with 302 status on onNavigationStateChange
method. On iOS it’s work is good.
To Reproduce: Expo Snack example
Expected behavior:
Get https://httpstat.us/302
on logs then I use Android.
Screenshots/Videos:
Environment:
- OS: Android
- OS version: 9
- react-native version: 0.59.9
- react-native-webview version: 5.12.1
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:7
Top Results From Across the Web
Catch 302 redirect on onNavigationStateChange method on ...
Bug description: On Android I'm not catch url with 302 status on onNavigationStateChange method. On iOS it's work is good.
Read more >How to prevent redirecting when using react-native-webview ...
Is it possible way to do this? In IOS, using stopLoading works fine but it is not working on Android, onNavigationStateChanged(navState) { if( ......
Read more >How to handle navigation with WebViews in a React Native app
Using the prop onNavigationStateChange that represents the navigation state of the component, you just need to pass the current URL and keep track...
Read more >onNavigationStateChange of WebView on android get url with ...
Changing source to uri from url was my fix. This was only happening to me on Android, onNavigationStateChange was returning url "about:blank". Cheers:...
Read more >Diff - 316b880c55..1b93c87e38 - chromium/src - Git at Google
+ +package org.chromium.android_webview; + +import android.content. ... bool visible) {} + + // Behavior of this function matches that of + ...
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’m having this same issue. on iOS, I see the 302 redirect happening in onNavigationStateChange(), so my custom code can catch the original url (before the redirect) and respond. in Android, I never see the 302:
iOS onNavigationStateChange:
Android onNavigationStateChange:
React Native version = 0.61.2 React native Webview version = 7.4.0
Exact same issue here, even adding the networkSecurityConfig to the Androidmanifest Any solution on this?