Skip to content

[Bug]: Webviewで機内モード解除後のリロードで最初のページに戻る不具合を修正する #162

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

Open
1 task done
iseruuuuu opened this issue Mar 4, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@iseruuuuu
Copy link
Contributor

iseruuuuu commented Mar 4, 2024

これに関する既存の Issue はありますか?

  • 既存の Issue はありませんでした

現在の動作

1.WebView 内で遷移する
2.機内モードをオンにする
3.WebView で Pull-to-Refresh をする
4.エラー画面が表示される
5.機内モードをオフにする
6.エラー画面で再読み込みボタンを押下する
7.最初の画面が表示されてしまう(問題あり)

検証動画

untitled.webm

期待される動作

期待としては、エラーが発生した WebView のページが表示される

備考

環境

- Commit Hash: 0153501e8487f388e99243d36f56509ea98f9def
- App Version: 1.0.0
- Platform: iOS 17.2, Android 14 API level 34
@iseruuuuu iseruuuuu added the bug Something isn't working label Mar 4, 2024
@iseruuuuu iseruuuuu changed the title [Bug]: Webviewで機内モード解除後のリロードで最初のページに戻る不具合 [Bug]: Webviewで機内モード解除後のリロードで最初のページに戻る不具合を修正する Mar 5, 2024
@r0227n r0227n self-assigned this Apr 11, 2025
@r0227n
Copy link

r0227n commented Apr 11, 2025

[AndroidInAppWebViewWidget] (android) AndroidInAppWebViewWidget calling "dispose" using []

以下の検証を実施し、上記のログを確認した。
Android or InAppWebViewの仕様として機内モード(通信不可能な状態に陥った場合)になるとWebViewをdisposeするため、本Issueの問題が発生していると思われる。


【検証環境】
検証機: Android Pixel 7 Pro API 34 Emulator
前提条件: 検証開始時、、機内モードはオフであること

【検証手順】

  1. WebView上で「https://flutter.dev/」を表示
  2. 1の画面内で「https://flutter.dev/multi-platform」に遷移
  3. 機内モードをオンにする
  4. pull to refreshを実行

@r0227n
Copy link

r0227n commented Apr 14, 2025

[IOSInAppWebViewController] (iOS) WebView ID 0 calling "onReceivedError" using {error: {description: インターネット接続がオフラインのようです。, type: -1009}, request: {method: GET, url: https://flutter.dev/multi-platform, isRedirect: false, isForMainFrame: true, hasGesture: false, headers: null}}
[IOSInAppWebViewController] (iOS) WebView ID 0 calling "onProgressChanged" using {progress: 100}
[IOSInAppWebViewWidget] (iOS) IOSInAppWebViewWidget calling "dispose" using []

iOS or InAppWebViewの仕様として機内モード(通信不可能な状態に陥った場合)になるとWebViewをdisposeするため、本Issueの問題が発生していると思われる。


【検証環境】

  • 検証機: iPhone 16 iOS 18.3.2
  • 前提条件: 検証開始時、機内モードはオフであること

【検証手順】

  1. WebView上で「https://flutter.dev/」を表示
  2. 1の画面内で「https://flutter.dev/multi-platform」に遷移
  3. 機内モードをオンにする
  4. pull to refreshを実行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants