fluttercommunity / fluttercommunity/flutter_webview_plugin
Uncaught SyntaxError: Failed to set the 'href' property on 'Location'
- 主要语言
- Java
- 星标
- 1.5k
- 派生
- 938
- PR 合并指标
- 30 天内没有已合并 PR
描述
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'
```
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先使用报告中的 JavaScript 赋值和查询字符串值,在 Android WebView 中重现重定向,然后检查 flutterWebViewPlugin.onStateChanged.listen 如何响应。完成的标准是:重定向在 Android 上不再引发 Location href SyntaxError,listener 仍会继续触发,同时保留报告中的 iOS 行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android, flutter, ios, javascript
- 领域
- mobile
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100