Repository: flutter
Issue: Non-null onNavigationRequest causes back behavior issues when webcontent contains redirects
Labels: platform-android,p: webview,package,team-ecosystem,has reproducible steps,P2,triaged-ecosystem,found in release: 3.13,found in release: 3.17

### Is there an existing issue for this?

- [X] I have searched the [existing package issues](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3Apackage)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### What package does this bug report belong to?

webview_flutter

### What target platforms are you seeing this bug on?

Android

### Have you already upgraded your packages?

Yes

### Dependency versions

<details><summary>pubspec.lock</summary>

```lock
  webview_flutter:
    dependency: "direct main"
    description:
      name: webview_flutter
      sha256: c1ab9b81090705c6069197d9fdc1625e587b52b8d70cdde2339d177ad0dbb98e
      url: "https://pub.dev"
    source: hosted
    version: "4.4.1"
  webview_flutter_android:
    dependency: "direct main"
    description:
      name: webview_flutter_android
      sha256: b0cd33dd7d3dd8e5f664e11a19e17ba12c352647269921a3b568406b001f1dff
      url: "https://pub.dev"
    source: hosted
    version: "3.12.0"
  webview_flutter_platform_interface:
    dependency: transitive
    description:
      name: webview_flutter_platform_interface
      sha256: "6d9213c65f1060116757a7c473247c60f3f7f332cac33dc417c9e362a9a13e4f"
      url: "https://pub.dev"
    source: hosted
    version: "2.6.0"
  webview_flutter_wkwebview:
    dependency: "direct main"
    description:
      name: webview_flutter_wkwebview
      sha256: b4b42295b3aa91ed22ba6d3dd7de56efbb8f3ab3d6e41d8b1615d13537c7801d
      url: "https://pub.dev"
    source: hosted
    version: "3.9.2"
sdks:
  dart: ">=3.1.0 <4.0.0"
  flutter: ">=3.13.0"

```

</details>


### Steps to reproduce

With WebPages like:
A: a simple page with a link to page "B"
B: A loading page. after a short delay it calls `window.location.replace(...)` to navigate to "C"
C: A simple screen with only text (or whatever)

This should reproduce in the demo app:
1. Load the webview to page "A" and click the link
2. Wait for Page "C" to become fully loaded
3. call controller.goBack()

### Expected results

Should return the user to Page "A"

### Actual results

User is sent to Page "B" and immediately redirected back to page "C".


However, leaving `onNavigationRequest` null/unimplemented causes the webview to behave as expected.
Any non-null implementation of `onNavigationRequest` causes the bug to be reproduced, even the trivial `onNavigationRequest: (NavigationRequest request) => NavigationDecision.navigate`.

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

void main() {
  runApp(const MyApp());
}

const String pageWithAutoRedirect = '''
<!DOCTYPE html>
<html>
<head>
<title>Back button demo</title>
<script>
function myFunction() {
  setTimeout(function() { location.replace("https://developer.mozilla.org/en-US/docs/Web/API/Location/replace"); }, 1000);
}
</script>
</head>
<body onload=myFunction()>

<h1>This will auto-navigate in 1 second!</h1>
<p>If the webview functions correctly, this page should be removed from history</p>

</body>
</html>
''';

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const Column(
        children: [
          Expanded(child: WebViewExample()),
          Divider(),
          Expanded(child: WebViewExample(implementOnNavigationRequest: true)),
        ],
      ),
    );
  }
}

class WebViewExample extends StatefulWidget {
  const WebViewExample({super.key, this.implementOnNavigationRequest = false});

  final bool implementOnNavigationRequest;

  @override
  State<WebViewExample> createState() => _WebViewExampleState();
}

class _WebViewExampleState extends State<WebViewExample> {
  late final WebViewController _controller;

  @override
  void initState() {
    super.initState();
    final WebViewController controller = WebViewController();

    controller
      ..setJavaScriptMode(JavaScriptMode.unrestricted)
      ..setNavigationDelegate(
        NavigationDelegate(
          onPageStarted: (String url) {
            debugPrint('Page started loading: $url');
          },
          onPageFinished: (String url) {
            debugPrint('Page finished loading: $url');
          },
          onNavigationRequest: widget.implementOnNavigationRequest ? (NavigationRequest request) {
            debugPrint('allowing navigation to ${request.url}');
            return NavigationDecision.navigate;
          } : null,
        ),
      )
      // I don't have good webpage to share at the moment.
      ..loadHtmlString(pageWithAutoRedirect);
    _controller = controller;
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.green,
      appBar: AppBar(
        title: Text(widget.implementOnNavigationRequest ? 'Incorrect' : 'Correct'),
      ),
      body: WebViewWidget(controller: _controller),
      floatingActionButton: backButton(),
    );
  }

  Widget backButton() {
    return FloatingActionButton(
      onPressed: () async {
        if (!await _controller.canGoBack()) {
          debugPrint('Cannot navigate back!');
        } else {
          _controller.goBack();
        }
      },
      child: const Icon(Icons.navigate_before),
    );
  }
}


```

</details>


### Screenshots or Videos

<details>
<summary>Recording of Demo App. Two webviews on the same page running the same code. A parameter has been used to null-out the onNavigationRequest callback in the upper webview. When the back button is pressed the button logs that it cannot go back (see logs below); The bottom webview does have onNavigationRequest trivially implemnted, and can go back, but automatically redirects forward again (incorrectly)</summary>

[Upload media here]

https://github.com/flutter/flutter/assets/149631770/14d1387e-a430-4b9a-a24f-e1cfcb1c9ca4



</details>


### Logs

<details><summary>Logs</summary>

```console
Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
Running Gradle task 'assembleDebug'...
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app-debug.apk...
Debug service listening on ws://127.0.0.1:54415/ytTDk15VoPU=/ws
Syncing files to device sdk gphone64 arm64...
I/WebViewFactory(20986): Loading com.google.android.webview version 113.0.5672.136 (code 567263634)
W/ziparchive(20986): Unable to open '/data/app/~~nHOVH2YhdpNvjh0NKnZJEQ==/com.google.android.trichromelibrary_567263634-D76nMZ_YZ6M_jM6ZRCaN7g==/TrichromeLibrary.dm': No such file or directory
W/ziparchive(20986): Unable to open '/data/app/~~nHOVH2YhdpNvjh0NKnZJEQ==/com.google.android.trichromelibrary_567263634-D76nMZ_YZ6M_jM6ZRCaN7g==/TrichromeLibrary.dm': No such file or directory
W/com.example.bug(20986): Entry not found
D/nativeloader(20986): Configuring clns-7 for other apk /data/app/~~nHOVH2YhdpNvjh0NKnZJEQ==/com.google.android.trichromelibrary_567263634-D76nMZ_YZ6M_jM6ZRCaN7g==/TrichromeLibrary.apk. target_sdk_version=34, uses_libraries=ALL, library_path=/data/app/~~l-8KOcxAi9krt93VbNRCiw==/com.google.android.webview-Rk-Se-PEeZDRg6QfiZgFMQ==/lib/arm64:/data/app/~~l-8KOcxAi9krt93VbNRCiw==/com.google.android.webview-Rk-Se-PEeZDRg6QfiZgFMQ==/WebViewGoogle.apk!/lib/arm64-v8a:/data/app/~~nHOVH2YhdpNvjh0NKnZJEQ==/com.google.android.trichromelibrary_567263634-D76nMZ_YZ6M_jM6ZRCaN7g==/TrichromeLibrary.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand
D/nativeloader(20986): Configuring clns-8 for other apk /data/app/~~l-8KOcxAi9krt93VbNRCiw==/com.google.android.webview-Rk-Se-PEeZDRg6QfiZgFMQ==/WebViewGoogle.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~l-8KOcxAi9krt93VbNRCiw==/com.google.android.webview-Rk-Se-PEeZDRg6QfiZgFMQ==/lib/arm64:/data/app/~~l-8KOcxAi9krt93VbNRCiw==/com.google.android.webview-Rk-Se-PEeZDRg6QfiZgFMQ==/WebViewGoogle.apk!/lib/arm64-v8a:/data/app/~~nHOVH2YhdpNvjh0NKnZJEQ==/com.google.android.trichromelibrary_567263634-D76nMZ_YZ6M_jM6ZRCaN7g==/TrichromeLibrary.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand
W/com.example.bug(20986): Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (unsupported, reflection, allowed)
W/com.example.bug(20986): Accessing hidden method Landroid/os/Trace;->traceBegin(JLjava/lang/String;)V (unsupported, reflection, allowed)
W/com.example.bug(20986): Accessing hidden method Landroid/os/Trace;->traceEnd(J)V (unsupported, reflection, allowed)
W/com.example.bug(20986): Accessing hidden method Landroid/os/Trace;->asyncTraceBegin(JLjava/lang/String;I)V (unsupported, reflection, allowed)
W/com.example.bug(20986): Accessing hidden method Landroid/os/Trace;->asyncTraceEnd(JLjava/lang/String;I)V (unsupported, reflection, allowed)
I/cr_WVCFactoryProvider(20986): Loaded version=113.0.5672.136 minSdkVersion=29 isBundle=false multiprocess=true packageId=2
I/cr_VariationsUtils(20986): Failed reading seed file "/data/user/0/com.example.bug/app_webview/variations_seed_new"
I/cr_VariationsUtils(20986): Failed reading seed file "/data/user/0/com.example.bug/app_webview/variations_seed"
I/cr_VariationsUtils(20986): Requesting new seed from IVariationsSeedServer
I/cr_LibraryLoader(20986): Successfully loaded native library
I/cr_CachingUmaRecorder(20986): Flushed 8 samples from 8 histograms.
D/CompatibilityChangeReporter(20986): Compat change id reported: 183155436; UID 10191; state: ENABLED
D/AutofillManager(20986): Fill dialog is enabled:false, hints=[password, passwordAuto, creditCardNumber, creditCardSecurityCode, creditCardExpirationDate]
W/chromium(20986): [WARNING:dns_config_service_android.cc(115)] Failed to read DnsConfig.
D/CompatibilityChangeReporter(20986): Compat change id reported: 214741472; UID 10191; state: ENABLED
D/CompatibilityChangeReporter(20986): Compat change id reported: 171228096; UID 10191; state: ENABLED
W/cr_media(20986): BLUETOOTH_CONNECT permission is missing.
W/cr_media(20986): registerBluetoothIntentsIfNeeded: Requires BLUETOOTH permission
I/PlatformViewsController(20986): Hosting view in view hierarchy for platform view: 0
D/CompatibilityChangeReporter(20986): Compat change id reported: 193247900; UID 10191; state: ENABLED
I/PlatformViewsController(20986): Hosting view in view hierarchy for platform view: 1
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
I/flutter (20986): Page started loading: about:blank
I/flutter (20986): Page started loading: about:blank
I/flutter (20986): Page finished loading: about:blank
I/flutter (20986): Page finished loading: about:blank
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
I/flutter (20986): allowing navigation to https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
I/flutter (20986): Page started loading: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
I/flutter (20986): Page started loading: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
D/EGL_emulation(20986): app_time_stats: avg=301.11ms min=20.45ms max=1022.55ms count=4
D/EGL_emulation(20986): app_time_stats: avg=367.12ms min=11.05ms max=1018.16ms count=3
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
D/EGL_emulation(20986): app_time_stats: avg=302.89ms min=17.19ms max=1025.56ms count=4
D/EGL_emulation(20986): app_time_stats: avg=199.14ms min=1.85ms max=996.25ms count=6
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
I/flutter (20986): Page finished loading: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
I/flutter (20986): Page finished loading: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.metrics.String) navigator.user_agent: Value length 171 exceeds maximum of 100.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.metrics.String) navigator.user_agent: Value length 171 exceeds maximum of 100.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
I/flutter (20986): Page finished loading: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
I/flutter (20986): Page finished loading: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
D/CompatibilityChangeReporter(20986): Compat change id reported: 289878283; UID 10191; state: DISABLED
D/EGL_emulation(20986): app_time_stats: avg=109.85ms min=12.16ms max=1694.22ms count=18
I/flutter (20986): Cannot navigate back!
D/EGL_emulation(20986): app_time_stats: avg=24.81ms min=1.35ms max=451.42ms count=36
I/flutter (20986): Cannot navigate back!
D/EGL_emulation(20986): app_time_stats: avg=18.51ms min=1.23ms max=540.39ms count=38
I/flutter (20986): Page started loading: about:blank
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.metrics.String) navigator.user_agent: Value length 171 exceeds maximum of 100.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
I/flutter (20986): Page finished loading: about:blank
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
D/EGL_emulation(20986): app_time_stats: avg=245.36ms min=8.82ms max=4133.94ms count=18
D/EGL_emulation(20986): app_time_stats: avg=232.91ms min=7.06ms max=4134.34ms count=19
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.metrics.String) navigator.user_agent: Value length 171 exceeds maximum of 100.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
I/flutter (20986): allowing navigation to https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
I/flutter (20986): Page started loading: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
I/flutter (20986): Page finished loading: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.Upload.PingUploadManager) Ping 2a8d45fe-5ac0-4f78-b4b9-3cd31b390e4b successfully sent 200.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.metrics.String) navigator.user_agent: Value length 171 exceeds maximum of 100.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
I/flutter (20986): Page finished loading: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
D/EGL_emulation(20986): app_time_stats: avg=1063.86ms min=1063.86ms max=1063.86ms count=1
D/EGL_emulation(20986): app_time_stats: avg=1063.07ms min=1063.07ms max=1063.07ms count=1
D/EGL_emulation(20986): app_time_stats: avg=20.20ms min=1.34ms max=619.15ms count=38
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.metrics.String) navigator.user_agent: Value length 171 exceeds maximum of 100.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.Upload.PingUploadManager) Ping e1abe1fc-01ad-4797-a287-f27cae13cd4c successfully sent 200.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.Upload.PingUploadManager) Ping 23e212de-79b5-4d9a-97d7-c650b09fc299 successfully sent 200.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.Upload.PingUploadManager) Ping 79d53c49-d096-4c22-83d0-68a5cda02176 successfully sent 200.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.Upload.PingUploadManager) Ping bfbff21c-80bf-450e-bf97-cbdd2e54adf7 successfully sent 200.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.Upload.PingUploadManager) Ping 1a8154f8-5f69-4820-bc21-47a9fcfd38d2 successfully sent 200.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
I/flutter (20986): Page started loading: about:blank
I/flutter (20986): Page finished loading: about:blank
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
D/EGL_emulation(20986): app_time_stats: avg=23.13ms min=1.28ms max=386.08ms count=31
I/flutter (20986): allowing navigation to https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
I/flutter (20986): Page started loading: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
I/flutter (20986): Page finished loading: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.metrics.String) navigator.user_agent: Value length 171 exceeds maximum of 100.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
D/EGL_emulation(20986): app_time_stats: avg=353.29ms min=14.54ms max=1048.42ms count=5
D/EGL_emulation(20986): app_time_stats: avg=353.32ms min=14.52ms max=1048.55ms count=5
I/flutter (20986): Page finished loading: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.metrics.String) navigator.user_agent: Value length 171 exceeds maximum of 100.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.Upload.PingUploadManager) Ping f1848d49-d874-4cd9-8e2d-83ee095e125c successfully sent 200.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.Upload.PingUploadManager) Ping bbe47443-7405-49cc-ad6e-466d5ba5139e successfully sent 200.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.Upload.PingUploadManager) Ping 533b5d7c-05d1-436f-b136-3a87986acdce successfully sent 200.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
D/EGL_emulation(20986): app_time_stats: avg=66.89ms min=1.32ms max=584.64ms count=14
I/flutter (20986): Page started loading: about:blank
I/flutter (20986): Page finished loading: about:blank
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
I/flutter (20986): allowing navigation to https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
I/flutter (20986): Page started loading: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
D/EGL_emulation(20986): app_time_stats: avg=314.50ms min=16.10ms max=1052.78ms count=5
D/EGL_emulation(20986): app_time_stats: avg=314.57ms min=16.12ms max=1053.20ms count=5
I/flutter (20986): Page finished loading: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
D/EGL_emulation(20986): app_time_stats: avg=19.14ms min=1.29ms max=584.53ms count=38
I/flutter (20986): Page finished loading: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.metrics.String) navigator.user_agent: Value length 171 exceeds maximum of 100.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.metrics.String) navigator.user_agent: Value length 171 exceeds maximum of 100.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.Upload.PingUploadManager) Ping 02ff60d6-7e72-4cff-83b3-792fb5deea0a successfully sent 200.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.Upload.PingUploadManager) Ping 3d36d62b-70d0-46f0-8b86-834f3b6b521d successfully sent 200.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
I/chromium(20986): [INFO:CONSOLE(2)] "(Glean.core.Upload.PingUploadManager) Ping ee7e92c5-1a20-4737-9475-50983052fbc1 successfully sent 200.", source: https://developer.mozilla.org/static/js/main.ba4733c3.js (2)
W/com.example.bug(20986): Accessing hidden method Landroid/view/MotionEvent;->getEventTimeNano()J (unsupported, reflection, allowed)
E/FrameEvents(20986): updateAcquireFence: Did not find frame.
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.13.2, on macOS 13.6.1 22G313 darwin-arm64, locale
    en-US)
    • Flutter version 3.13.2 on channel stable at
      /Users/tyandl/fvm/versions/3.13.2
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ff5b5b5fa6 (10 weeks ago), 2023-08-24 08:12:28 -0500
    • Engine revision b20183e040
    • Dart version 3.1.0
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/tyandl/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/tyandl/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode-14.2.0.app/Contents/Developer
    • Build 14C18
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] Connected device (3 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64  • Android 14 (API 34) (emulator)
    • macOS (desktop)             • macos         • darwin-arm64   • macOS 13.6.1 22G313 darwin-arm64
    • Chrome (web)                • chrome        • web-javascript • Google Chrome 118.0.5993.117

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

```

</details>