fluttercommunity / fluttercommunity/flutter_webview_plugin
Uncaught SyntaxError: Failed to set the 'href' property on 'Location'
- Lingua principale
- Java
- Stelle
- 1.5k
- Fork
- 938
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
We have a webpage that does a redirect with js. It works fine on ios, but we are getting this error when trying it on android:
```
Uncaught SyntaxError: Failed to set the 'href' property on 'Location'
```
This is causing the flutterWebViewPlugin.onStateChanged.listen listener to stop firing.
The js line that does the redirect looks like this:
```
window.location = e.data.url + (e.data.url.indexOf('?') == -1 ? '?' : '&') + (params || {});
```
The location value is:
```
?notifyApp=success&SiteCode=SPA-SPA-006&TransactionId=73143e1d-e64b-44d1-9a6f-23d35a92618c&TransactionReference=044ZVxHUJ1vBfVGtf8B2opaqiuV8qu0d&Amount=25.00&Status=Complete&Optional1=&Optional2=&Optional3=&Optional4=&Optional5=&CurrencyCode=ZAR&IsTest=True&StatusMessage=Test%20transaction%20completed&Hash=19e304e53f23d5c6b4329af9757e4ede0457b5f573bd8a17bf01eeb01ef283fd1129dc670ec8508b17ac6f579f2fbde0311f0928a670c42c8a161a621d6d5640'
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia riproducendo il redirect in Android WebView usando l’assegnazione JavaScript e il valore della stringa di query riportati, quindi esamina come risponde flutterWebViewPlugin.onStateChanged.listen. Il lavoro è completato quando il redirect non genera più il Location href SyntaxError su Android e il listener continua a essere attivato, preservando al contempo il comportamento iOS segnalato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- android, flutter, ios, javascript
- Ambito
- mobile
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100