flutter/flutter

Webview Main Thread Checker: UI API called on a background thread

karmelcorn opened this issue · 19 comments

Steps to Reproduce

  1. Build the example app with webview_flutter 1.0.3 (https://pub.dev/packages/webview_flutter/example)
  2. Go to any url, eg: www.bravenewlook.com or www.yahoo.com

Expected results:
Webpage rendered properly without error.

Actual results:
Webpage is rendered but the follow error is throw in Xcode on a physical device. Error does not occur for simulator.
App hangs for 10sec when the error is thrown.

For www.bravenewlook.com, the error is thrown the first time the webview screen is closed.
For www.yahoo.com, the error is thrown on the third time the webview screen is closed.

App continue to work and error is not throw again after the first time.

=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView removeFromSuperview]
PID: 15100, TID: 4349740, Thread name: io.flutter.1.raster, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   Flutter                             0x0000000102bd5c70 _ZN7flutter30FlutterPlatformViewsController11SubmitFrameEP15GrDirectContextNSt3__110shared_ptrINS_10IOSContextEEENS3_10unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS8_EEEE + 4932
5   Flutter                             0x0000000102bef100 _ZN7flutter10IOSSurface11SubmitFrameEP15GrDirectContextNSt3__110unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS5_EEEE + 160
6   Flutter                             0x0000000102ec5764 _ZN7flutter10Rasterizer13DrawToSurfaceERNS_9LayerTreeE + 604
7   Flutter                             0x0000000102ec62a0 _ZNSt3__110__function6__funcIZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEEE3$_1NS_9allocatorISA_EEFvNS_10unique_ptrIS7_NS_14default_deleteIS7_EEEEEEclEOSG_ + 116
8   Flutter                             0x0000000102ec5a64 _ZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS_8PipelineINS_9LayerTreeEEEEE + 408
9   Flutter                             0x0000000102ecc2b0 _ZNSt3__110__function6__funcIZN7flutter5Shell14OnAnimatorDrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEENS4_9TimePointEE4$_30NS_9allocatorISB_EEFvvEEclEv + 100
10  Flutter                             0x0000000102bf9fe8 _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 1472
11  Flutter                             0x0000000102bfc714 _ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0_ + 32
12  CoreFoundation                      0x0000000191ac4274 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 692852
13  CoreFoundation                      0x0000000191ac3f90 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 692112
14  CoreFoundation                      0x0000000191ac366c 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 689772
15  CoreFoundation                      0x0000000191abe67c 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 669308
16  CoreFoundation                      0x0000000191abdce8 CFRunLoopRunSpecific + 424
17  Flutter                             0x0000000102bfc5f0 _ZN3fml17MessageLoopDarwin3RunEv + 88
18  Flutter                             0x0000000102bfb7cc _ZNSt3__114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN3fml6ThreadC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEE3$_0EEEEEPvSJ_ + 196
19  libsystem_pthread.dylib             0x000000019185bd98 _pthread_start + 156
20  libsystem_pthread.dylib             0x000000019185f74c thread_start + 8
2020-10-19 12:20:48.429518-0400 Runner[15100:4349740] [reports] Main Thread Checker: UI API called on a background thread: -[UIView removeFromSuperview]
PID: 15100, TID: 4349740, Thread name: io.flutter.1.raster, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   Flutter                             0x0000000102bd5c70 _ZN7flutter30FlutterPlatformViewsController11SubmitFrameEP15GrDirectContextNSt3__110shared_ptrINS_10IOSContextEEENS3_10unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS8_EEEE + 4932
5   Flutter                             0x0000000102bef100 _ZN7flutter10IOSSurface11SubmitFrameEP15GrDirectContextNSt3__110unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS5_EEEE + 160
6   Flutter                             0x0000000102ec5764 _ZN7flutter10Rasterizer13DrawToSurfaceERNS_9LayerTreeE + 604
7   Flutter                             0x0000000102ec62a0 _ZNSt3__110__function6__funcIZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEEE3$_1NS_9allocatorISA_EEFvNS_10unique_ptrIS7_NS_14default_deleteIS7_EEEEEEclEOSG_ + 116
8   Flutter                             0x0000000102ec5a64 _ZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS_8PipelineINS_9LayerTreeEEEEE + 408
9   Flutter                             0x0000000102ecc2b0 _ZNSt3__110__function6__funcIZN7flutter5Shell14OnAnimatorDrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEENS4_9TimePointEE4$_30NS_9allocatorISB_EEFvvEEclEv + 100
10  Flutter                             0x0000000102bf9fe8 _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 1472
11  Flutter                             0x0000000102bfc714 _ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0_ + 32
12  CoreFoundation                      0x0000000191ac4274 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 692852
13  CoreFoundation                      0x0000000191ac3f90 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 692112
14  CoreFoundation                      0x0000000191ac366c 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 689772
15  CoreFoundation                      0x0000000191abe67c 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 669308
16  CoreFoundation                      0x0000000191abdce8 CFRunLoopRunSpecific + 424
17  Flutter                             0x0000000102bfc5f0 _ZN3fml17MessageLoopDarwin3RunEv + 88
18  Flutter                             0x0000000102bfb7cc _ZNSt3__114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN3fml6ThreadC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEE3$_0EEEEEPvSJ_ + 196
19  libsystem_pthread.dylib             0x000000019185bd98 _pthread_start + 156
20  libsystem_pthread.dylib             0x000000019185f74c thread_start + 8
2020-10-19 12:20:57.149052-0400 Runner[15100:4349581] [ProcessSuspension] 0x11cee10b0 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-19 12:20:57.212890-0400 Runner[15100:4349739] flutter: allowing navigation to NavigationRequest(url: https://www.bravenewlook.com/, isForMainFrame: true)
2020-10-19 12:20:57.217222-0400 Runner[15100:4349739] flutter: Page started loading: https://www.bravenewlook.com/
2020-10-19 12:20:57.845044-0400 Runner[15100:4349739] flutter: allowing navigation to NavigationRequest(url: https://vars.hotjar.com/box-469cf41adb11dc78be68c1ae7f9457a4.html, isForMainFrame: false)
2020-10-19 12:20:57.945200-0400 Runner[15100:4349895] [assertion] Error acquiring assertion: <NSError: 0x2828814d0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x14ff3c5a0; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-19 12:20:57.945264-0400 Runner[15100:4349895] [ProcessSuspension]  0x11ced9a40 - ProcessAssertion() PID 15100 Unable to acquire assertion for process with PID 15107
2020-10-19 12:20:57.945305-0400 Runner[15100:4349581] [ProcessSuspension] 0x11ced9a40 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-19 12:20:57.946277-0400 Runner[15100:4349895] [assertion] Error acquiring assertion: <NSError: 0x282839830; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x14ff57680; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-19 12:20:57.946373-0400 Runner[15100:4349895] [ProcessSuspension]  0x11ced9a68 - ProcessAssertion() PID 15100 Unable to acquire assertion for process with PID 15100
2020-10-19 12:20:57.946413-0400 Runner[15100:4349581] [ProcessSuspension] 0x11ced9a68 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-19 12:20:57.947505-0400 Runner[15100:4349895] [assertion] Error acquiring assertion: <NSError: 0x282891680; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x1518a0510; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-19 12:20:57.947620-0400 Runner[15100:4349895] [ProcessSuspension]  0x11ced9a90 - ProcessAssertion() PID 15100 Unable to acquire assertion for process with PID 15106
2020-10-19 12:20:57.947712-0400 Runner[15100:4349581] [ProcessSuspension] 0x11ced9a90 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-19 12:20:57.966176-0400 Runner[15100:4349739] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-19 12:20:57.998462-0400 Runner[15100:4349739] flutter: allowing navigation to NavigationRequest(url: https://bnl.attn.tv/creative?v=1.0.903&r=&w=414&h=660&id=fb76c0ba76b249459fb6eacff78f39c5&l=https%3A%2F%2Fwww.bravenewlook.com%2F&ss_ref=ORGANIC&t=n&pv=5, isForMainFrame: false)
2020-10-19 12:20:58.075263-0400 Runner[15100:4349739] flutter: allowing navigation to NavigationRequest(url: https://gum.criteo.com/syncframe?topUrl=www.bravenewlook.com#%7B%22bundle%22:%7B%22origin%22:0,%22value%22:null%7D,%22cw%22:true,%22lwid%22:%7B%22origin%22:0,%22value%22:null%7D,%22optout%22:%7B%22origin%22:0,%22value%22:null%7D,%22origin%22:%22onetag%22,%22pm%22:0,%22sid%22:%7B%22origin%22:0,%22value%22:null%7D,%22tld%22:%22bravenewlook.com%22,%22topUrl%22:%22www.bravenewlook.com%22,%22uid%22:null,%22version%22:%225_6_2%22%7D, isForMainFrame: false)
2020-10-19 12:20:58.264607-0400 Runner[15100:4349739] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-19 12:20:58.292663-0400 Runner[15100:4349895] [assertion] Error acquiring assertion: <NSError: 0x282839fb0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x14ff523f0; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-19 12:20:58.292801-0400 Runner[15100:4349895] [ProcessSuspension]  0x11ceda6c0 - ProcessAssertion() PID 15100 Unable to acquire assertion for process with PID 15107
2020-10-19 12:20:58.292904-0400 Runner[15100:4349581] [ProcessSuspension] 0x11ceda6c0 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-19 12:20:58.293892-0400 Runner[15100:4349895] [assertion] Error acquiring assertion: <NSError: 0x282894d80; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x14ff20970; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-19 12:20:58.293941-0400 Runner[15100:4349895] [ProcessSuspension]  0x11ceda6e8 - ProcessAssertion() PID 15100 Unable to acquire assertion for process with PID 15100
2020-10-19 12:20:58.293981-0400 Runner[15100:4349581] [ProcessSuspension] 0x11ceda6e8 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-19 12:20:58.294805-0400 Runner[15100:4349895] [assertion] Error acquiring assertion: <NSError: 0x28288de30; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x14ff3e950; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-19 12:20:58.294841-0400 Runner[15100:4349895] [ProcessSuspension]  0x11ceda710 - ProcessAssertion() PID 15100 Unable to acquire assertion for process with PID 15106
2020-10-19 12:20:58.294875-0400 Runner[15100:4349581] [ProcessSuspension] 0x11ceda710 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-19 12:20:58.316560-0400 Runner[15100:4349739] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-19 12:20:58.319967-0400 Runner[15100:4349739] flutter: allowing navigation to NavigationRequest(url: https://tr.snapchat.com/p, isForMainFrame: false)
2020-10-19 12:20:58.322485-0400 Runner[15100:4349739] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-19 12:20:58.373353-0400 Runner[15100:4349739] flutter: allowing navigation to NavigationRequest(url: https://cdn.jst.ai/store_4.1.html?v=3.61#C9526EF5-6085-40D9-BA43-C16F464F31A9%7Cd92cd6dd-1171-11eb-bdb2-f7d1806af3a0%7C%7C%7C, isForMainFrame: false)
2020-10-19 12:20:58.581753-0400 Runner[15100:4349739] flutter: allowing navigation to NavigationRequest(url: https://cdn.jst.ai/store_4.1.html?v=3.61#C9526EF5-6085-40D9-BA43-C16F464F31A9%7Cd92cd6dd-1171-11eb-bdb2-f7d1806af3a0%7C%7C%7C, isForMainFrame: false)
2020-10-19 12:20:58.676817-0400 Runner[15100:4349739] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-19 12:20:58.681389-0400 Runner[15100:4349739] flutter: allowing navigation to NavigationRequest(url: https://www.facebook.com/v3.3/plugins/messenger_checkbox.php?allow_login=false&app_id=435291730178743&channel=https%3A%2F%2Fstaticxx.facebook.com%2Fx%2Fconnect%2Fxd_arbiter%2F%3Fversion%3D46%23cb%3Dfec5a23647e418%26domain%3Dwww.bravenewlook.com%26origin%3Dhttps%253A%252F%252Fwww.bravenewlook.com%252Ff2cd5799cd7894%26relation%3Dparent.parent&container_width=0&locale=en_US&messenger_app_id=435291730178743&origin=https%3A%2F%2Fwww.bravenewlook.com&page_id=1136781033034012&sdk=joey&user_ref=shopmsg-test-1603124458649, isForMainFrame: false)
2020-10-19 12:20:59.059736-0400 Runner[15100:4349739] flutter: Page finished loading: https://www.bravenewlook.com/
2020-10-19 12:21:05.729080-0400 Runner[15100:4349581] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
2020-10-19 12:21:05.729742-0400 Runner[15100:4349581] Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service
2020-10-19 12:21:16.447509-0400 Runner[15100:4349581] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
2020-10-19 12:21:16.452800-0400 Runner[15100:4349581] Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service

Logs
[✓] Flutter (Channel stable, 1.22.2, on Mac OS X 10.15.6 19G73, locale en-US)
    • Flutter version 1.22.2 at /Users/xxxx/Developer/flutter
    • Framework revision 84f3d28555 (4 days ago), 2020-10-15 16:26:19 -0700
    • Engine revision b8752bbfff
    • Dart version 2.10.2

 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/xxxx/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 49.0.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (2 available)
    • XXXX’s iPhone (mobile)     • d023e150d07d2cf5ac85e62df210f2f9585264cc • ios • iOS 13.5
    • iPhone 11 Pro Max (mobile) • D9A36B11-B881-41DF-B8BE-FDCB63A8F353     • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)

• No issues found!

@karmelcorn
Tried the official plugin example on latest stable using iphone 6s with iOS 14 and didn't see the issue you mentioned. Below is the log from Xcode.

log
2020-10-20 12:52:59.207797+0530 Runner[1698:371365] WF: _WebFilterIsActive returning: NO
2020-10-20 12:52:59.808278+0530 Runner[1698:371543] flutter: allowing navigation to NavigationRequest(url: https://www.bravenewlook.com/, isForMainFrame: true)
2020-10-20 12:52:59.827399+0530 Runner[1698:371543] flutter: Page started loading: https://www.bravenewlook.com/
2020-10-20 12:53:02.956075+0530 Runner[1698:371543] flutter: allowing navigation to NavigationRequest(url: https://vars.hotjar.com/box-469cf41adb11dc78be68c1ae7f9457a4.html, isForMainFrame: false)
2020-10-20 12:53:03.510640+0530 Runner[1698:371543] flutter: allowing navigation to NavigationRequest(url: https://gum.criteo.com/syncframe?topUrl=www.bravenewlook.com#%7B%22bundle%22:%7B%22origin%22:0,%22value%22:null%7D,%22cw%22:true,%22lwid%22:%7B%22origin%22:0,%22value%22:null%7D,%22optout%22:%7B%22origin%22:0,%22value%22:null%7D,%22origin%22:%22onetag%22,%22pm%22:0,%22sid%22:%7B%22origin%22:0,%22value%22:null%7D,%22tld%22:%22bravenewlook.com%22,%22topUrl%22:%22www.bravenewlook.com%22,%22uid%22:null,%22version%22:%225_6_2%22%7D, isForMainFrame: false)
2020-10-20 12:53:04.493347+0530 Runner[1698:371543] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-20 12:53:04.610957+0530 Runner[1698:371543] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-20 12:53:04.628011+0530 Runner[1698:371543] flutter: allowing navigation to NavigationRequest(url: https://tr.snapchat.com/p, isForMainFrame: false)
2020-10-20 12:53:04.716898+0530 Runner[1698:371543] flutter: allowing navigation to NavigationRequest(url: https://cdn.jst.ai/store_4.1.html?v=3.61#C9526EF5-6085-40D9-BA43-C16F464F31A9%7Ca2139c59-12a4-11eb-a532-35a303b89511%7C%7C%7C, isForMainFrame: false)
2020-10-20 12:53:04.976488+0530 Runner[1698:371543] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-20 12:53:05.244622+0530 Runner[1698:371365] [Loading] 0x1032e2a18 - [pageProxyID=6, webPageID=7, PID=1702] WebPageProxy::didFailLoadForFrame: frameID = 55, domain = NSURLErrorDomain, code = -999
2020-10-20 12:53:05.812713+0530 Runner[1698:371543] flutter: allowing navigation to NavigationRequest(url: https://cdn.jst.ai/store_4.1.html?v=3.61#C9526EF5-6085-40D9-BA43-C16F464F31A9%7Ca2139c59-12a4-11eb-a532-35a303b89511%7C%7C%7C, isForMainFrame: false)
2020-10-20 12:53:06.324191+0530 Runner[1698:371543] flutter: Page finished loading: https://www.bravenewlook.com/
2020-10-20 12:53:06.373582+0530 Runner[1698:371543] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-20 12:53:06.397804+0530 Runner[1698:371543] flutter: allowing navigation to NavigationRequest(url: https://www.facebook.com/v3.3/plugins/messenger_checkbox.php?allow_login=false&app_id=435291730178743&channel=https%3A%2F%2Fstaticxx.facebook.com%2Fx%2Fconnect%2Fxd_arbiter%2F%3Fversion%3D46%23cb%3Df3bae3329a83ba6%26domain%3Dwww.bravenewlook.com%26origin%3Dhttps%253A%252F%252Fwww.bravenewlook.com%252Ff2f82e48dbd92b8%26relation%3Dparent.parent&container_width=0&locale=en_US&messenger_app_id=435291730178743&origin=https%3A%2F%2Fwww.bravenewlook.com&page_id=1136781033034012&sdk=joey&user_ref=shopmsg-test-1603178586353, isForMainFrame: false)

Also was able to launch the www.bravenewlook.com url properly without any issues.

flutter doctor -v
[✓] Flutter (Channel stable, 1.22.2, on Mac OS X 10.15.4 19E2269, locale en-IN)
    • Flutter version 1.22.2 at /Users/dhs/documents/Fluttersdk/flutter
    • Framework revision 84f3d28555 (4 days ago), 2020-10-15 16:26:19 -0700
    • Engine revision b8752bbfff
    • Dart version 2.10.2

 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 46.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.50.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.11.0

[✓] Connected device (1 available)
    • Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 • ios
      • iOS 14.0

• No issues found!


Can you try using any other Flutter first party plugin and see if you get same error ? or is it only happening with webview_flutter ? Can you also try by creating a fresh project and run to see if you get same behavior ?

I am sorry, the error occurs when you close and re-open the webview within the app.

So I have a homepage, with just a raisedbutton to open the example webview like so. The error occurs if you open and close the webview a couple of times.

I am testing on an iPhone 8Plus, iOS 13.

Thank you.

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: Column(
          children: [
            RaisedButton(
                child: Text("open web view"),
                onPressed: (){
                  Navigator.push(context, MaterialPageRoute(builder: (context)=>WebViewExample()));
                }
            ),
          ],
        ),
      ),
    );
  }
}

Logs
2020-10-20 08:15:28.947353-0400 Runner[16955:4595781] Metal API Validation Enabled
2020-10-20 08:15:29.082181-0400 Runner[16955:4595970] flutter: Observatory listening on http://127.0.0.1:59451/P5A8Dk8fQQw=/
2020-10-20 08:15:35.009567-0400 Runner[16955:4595781] WF: === Starting WebFilter logging for process Runner
2020-10-20 08:15:35.009614-0400 Runner[16955:4595781] WF: _userSettingsForUser mobile: {
    filterBlacklist =     (
    );
    filterWhitelist =     (
    );
    restrictWeb = 1;
    useContentFilter = 0;
    useContentFilterOverrides = 0;
    whitelistEnabled = 0;
}
2020-10-20 08:15:35.009644-0400 Runner[16955:4595781] WF: _WebFilterIsActive returning: NO
2020-10-20 08:15:35.175268-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: https://www.bravenewlook.com/, isForMainFrame: true)
2020-10-20 08:15:35.315889-0400 Runner[16955:4595957] flutter: Page started loading: https://www.bravenewlook.com/
2020-10-20 08:15:36.595300-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: https://vars.hotjar.com/box-469cf41adb11dc78be68c1ae7f9457a4.html, isForMainFrame: false)
2020-10-20 08:15:36.770458-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: https://gum.criteo.com/syncframe?topUrl=www.bravenewlook.com#%7B%22bundle%22:%7B%22origin%22:0,%22value%22:null%7D,%22cw%22:true,%22lwid%22:%7B%22origin%22:0,%22value%22:null%7D,%22optout%22:%7B%22origin%22:0,%22value%22:null%7D,%22origin%22:%22onetag%22,%22pm%22:0,%22sid%22:%7B%22origin%22:0,%22value%22:null%7D,%22tld%22:%22bravenewlook.com%22,%22topUrl%22:%22www.bravenewlook.com%22,%22uid%22:null,%22version%22:%225_6_2%22%7D, isForMainFrame: false)
2020-10-20 08:15:36.800228-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-20 08:15:36.842784-0400 Runner[16955:4595946] [assertion] Error acquiring assertion: <NSError: 0x2833efed0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x1518699e0; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-20 08:15:36.842851-0400 Runner[16955:4595946] [ProcessSuspension]  0x11cada0a8 - ProcessAssertion() PID 16955 Unable to acquire assertion for process with PID 16958
2020-10-20 08:15:36.842897-0400 Runner[16955:4595781] [ProcessSuspension] 0x11cada0a8 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-20 08:15:36.844156-0400 Runner[16955:4595946] [assertion] Error acquiring assertion: <NSError: 0x2833ea0a0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x14fe503d0; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-20 08:15:36.844216-0400 Runner[16955:4595946] [ProcessSuspension]  0x11cada0d0 - ProcessAssertion() PID 16955 Unable to acquire assertion for process with PID 16955
2020-10-20 08:15:36.844261-0400 Runner[16955:4595781] [ProcessSuspension] 0x11cada0d0 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-20 08:15:36.845490-0400 Runner[16955:4595946] [assertion] Error acquiring assertion: <NSError: 0x283359920; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x1518699e0; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-20 08:15:36.845540-0400 Runner[16955:4595946] [ProcessSuspension]  0x11cada0f8 - ProcessAssertion() PID 16955 Unable to acquire assertion for process with PID 16957
2020-10-20 08:15:36.845580-0400 Runner[16955:4595781] [ProcessSuspension] 0x11cada0f8 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-20 08:15:36.876289-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: https://bnl.attn.tv/creative?v=1.0.903&r=&w=414&h=660&id=aef664dffb3f4437870d73e933109543&l=https%3A%2F%2Fwww.bravenewlook.com%2F&ss_ref=ORGANIC&t=n&pv=2, isForMainFrame: false)
2020-10-20 08:15:37.039479-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-20 08:15:37.066910-0400 Runner[16955:4595943] [assertion] Error acquiring assertion: <NSError: 0x2833f4cc0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x14ff7c540; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-20 08:15:37.066971-0400 Runner[16955:4595943] [ProcessSuspension]  0x11cadaff8 - ProcessAssertion() PID 16955 Unable to acquire assertion for process with PID 16958
2020-10-20 08:15:37.067008-0400 Runner[16955:4595781] [ProcessSuspension] 0x11cadaff8 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-20 08:15:37.068000-0400 Runner[16955:4595943] [assertion] Error acquiring assertion: <NSError: 0x2833e5110; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x14ff48f10; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-20 08:15:37.068043-0400 Runner[16955:4595943] [ProcessSuspension]  0x11cadb020 - ProcessAssertion() PID 16955 Unable to acquire assertion for process with PID 16955
2020-10-20 08:15:37.068079-0400 Runner[16955:4595781] [ProcessSuspension] 0x11cadb020 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-20 08:15:37.069070-0400 Runner[16955:4595943] [assertion] Error acquiring assertion: <NSError: 0x2833e4ba0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x14ff7c540; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-20 08:15:37.069173-0400 Runner[16955:4595943] [ProcessSuspension]  0x11cadb048 - ProcessAssertion() PID 16955 Unable to acquire assertion for process with PID 16957
2020-10-20 08:15:37.069266-0400 Runner[16955:4595781] [ProcessSuspension] 0x11cadb048 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-20 08:15:37.082093-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-20 08:15:37.092790-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: https://tr.snapchat.com/p, isForMainFrame: false)
2020-10-20 08:15:37.173424-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: https://cdn.jst.ai/store_4.1.html?v=3.61#C9526EF5-6085-40D9-BA43-C16F464F31A9%7C59a5abf8-12cd-11eb-8e4d-2d5e9b1f3e04%7C%7C%7C, isForMainFrame: false)
2020-10-20 08:15:37.176905-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-20 08:15:37.485485-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: https://cdn.jst.ai/store_4.1.html?v=3.61#C9526EF5-6085-40D9-BA43-C16F464F31A9%7C59a5abf8-12cd-11eb-8e4d-2d5e9b1f3e04%7C%7C%7C, isForMainFrame: false)
2020-10-20 08:15:37.569275-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-20 08:15:37.573416-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: https://www.facebook.com/v3.3/plugins/messenger_checkbox.php?allow_login=false&app_id=435291730178743&channel=https%3A%2F%2Fstaticxx.facebook.com%2Fx%2Fconnect%2Fxd_arbiter%2F%3Fversion%3D46%23cb%3Df10a346959fe5fe%26domain%3Dwww.bravenewlook.com%26origin%3Dhttps%253A%252F%252Fwww.bravenewlook.com%252Ff17069671722c02%26relation%3Dparent.parent&container_width=0&locale=en_US&messenger_app_id=435291730178743&origin=https%3A%2F%2Fwww.bravenewlook.com&page_id=1136781033034012&sdk=joey&user_ref=shopmsg-test-1603196137542, isForMainFrame: false)
2020-10-20 08:15:37.795720-0400 Runner[16955:4595957] flutter: Page finished loading: https://www.bravenewlook.com/
2020-10-20 08:15:39.972042-0400 Runner[16955:4595781] [ProcessSuspension] 0x11cae2280 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-20 08:15:39.988134-0400 Runner[16955:4595781] [ProcessSuspension] 0x11cae22e0 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-20 08:15:41.527732-0400 Runner[16955:4595781] WF: _userSettingsForUser mobile: {
    filterBlacklist =     (
    );
    filterWhitelist =     (
    );
    restrictWeb = 1;
    useContentFilter = 0;
    useContentFilterOverrides = 0;
    whitelistEnabled = 0;
}
2020-10-20 08:15:41.527960-0400 Runner[16955:4595781] WF: _WebFilterIsActive returning: NO
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView removeFromSuperview]
PID: 16955, TID: 4595958, Thread name: io.flutter.1.raster, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   Flutter                             0x00000001032adc70 _ZN7flutter30FlutterPlatformViewsController11SubmitFrameEP15GrDirectContextNSt3__110shared_ptrINS_10IOSContextEEENS3_10unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS8_EEEE + 4932
5   Flutter                             0x00000001032c7100 _ZN7flutter10IOSSurface11SubmitFrameEP15GrDirectContextNSt3__110unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS5_EEEE + 160
6   Flutter                             0x000000010359d764 _ZN7flutter10Rasterizer13DrawToSurfaceERNS_9LayerTreeE + 604
7   Flutter                             0x000000010359e2a0 _ZNSt3__110__function6__funcIZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEEE3$_1NS_9allocatorISA_EEFvNS_10unique_ptrIS7_NS_14default_deleteIS7_EEEEEEclEOSG_ + 116

8   Flutter                             0x000000010359da64 _ZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS_8PipelineINS_9LayerTreeEEEEE + 408
9   Flutter                             0x00000001035a42b0 _ZNSt3__110__function6__funcIZN7flutter5Shell14OnAnimatorDrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEENS4_9TimePointEE4$_30NS_9allocatorISB_EEFvvEEclEv + 100
10  Flutter                             0x00000001032d1fe8 _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 1472
11  Flutter                             0x00000001032d4714 _ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0_ + 32
12  CoreFoundation                      0x0000000191ac4274 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 692852
13  CoreFoundation                      0x0000000191ac3f90 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 692112
14  CoreFoundation                      0x0000000191ac366c 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 689772
15  CoreFoundation                      0x0000000191abe67c 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 669308
16  CoreFoundation                      0x0000000191abdce8 CFRunLoopRunSpecific + 424
17  Flutter                             0x00000001032d45f0 _ZN3fml17MessageLoopDarwin3RunEv + 88
18  Flutter                             0x00000001032d37cc _ZNSt3__114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN3fml6ThreadC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEE3$_0EEEEEPvSJ_ + 196
19  libsystem_pthread.dylib             0x000000019185bd98 _pthread_start + 156
20  libsystem_pthread.dylib             0x000000019185f74c thread_start + 8
2020-10-20 08:15:41.567193-0400 Runner[16955:4595958] [reports] Main Thread Checker: UI API called on a background thread: -[UIView removeFromSuperview]
PID: 16955, TID: 4595958, Thread name: io.flutter.1.raster, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   Flutter                             0x00000001032adc70 _ZN7flutter30FlutterPlatformViewsController11SubmitFrameEP15GrDirectContextNSt3__110shared_ptrINS_10IOSContextEEENS3_10unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS8_EEEE + 4932
5   Flutter                             0x00000001032c7100 _ZN7flutter10IOSSurface11SubmitFrameEP15GrDirectContextNSt3__110unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS5_EEEE + 160
6   Flutter                             0x000000010359d764 _ZN7flutter10Rasterizer13DrawToSurfaceERNS_9LayerTreeE + 604
7   Flutter                             0x000000010359e2a0 _ZNSt3__110__function6__funcIZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEEE3$_1NS_9allocatorISA_EEFvNS_10unique_ptrIS7_NS_14default_deleteIS7_EEEEEEclEOSG_ + 116
8   Flutter                             0x000000010359da64 _ZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS_8PipelineINS_9LayerTreeEEEEE + 408
9   Flutter                             0x00000001035a42b0 _ZNSt3__110__function6__funcIZN7flutter5Shell14OnAnimatorDrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEENS4_9TimePointEE4$_30NS_9allocatorISB_EEFvvEEclEv + 100
10  Flutter                             0x00000001032d1fe8 _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 1472
11  Flutter                             0x00000001032d4714 _ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0_ + 32
12  CoreFoundation                      0x0000000191ac4274 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 692852
13  CoreFoundation                      0x0000000191ac3f90 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 692112
14  CoreFoundation                      0x0000000191ac366c 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 689772
15  CoreFoundation                      0x0000000191abe67c 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 669308
16  CoreFoundation                      0x0000000191abdce8 CFRunLoopRunSpecific + 424
17  Flutter                             0x00000001032d45f0 _ZN3fml17MessageLoopDarwin3RunEv + 88
18  Flutter                             0x00000001032d37cc _ZNSt3__114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN3fml6ThreadC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEE3$_0EEEEEPvSJ_ + 196
19  libsystem_pthread.dylib             0x000000019185bd98 _pthread_start + 156
20  libsystem_pthread.dylib             0x000000019185f74c thread_start + 8
2020-10-20 08:15:50.775188-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: https://www.bravenewlook.com/, isForMainFrame: true)
2020-10-20 08:15:50.783035-0400 Runner[16955:4595957] flutter: Page started loading: https://www.bravenewlook.com/
2020-10-20 08:15:52.212683-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: https://vars.hotjar.com/box-469cf41adb11dc78be68c1ae7f9457a4.html, isForMainFrame: false)
2020-10-20 08:15:52.350139-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-20 08:15:52.396000-0400 Runner[16955:4595943] [assertion] Error acquiring assertion: <NSError: 0x2833f00f0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x14fe2b980; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-20 08:15:52.396058-0400 Runner[16955:4595943] [ProcessSuspension]  0x11cad94a0 - ProcessAssertion() PID 16955 Unable to acquire assertion for process with PID 16961
2020-10-20 08:15:52.396103-0400 Runner[16955:4595781] [ProcessSuspension] 0x11cad94a0 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-20 08:15:52.397082-0400 Runner[16955:4595943] [assertion] Error acquiring assertion: <NSError: 0x2833ea310; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x15187ec70; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-20 08:15:52.397183-0400 Runner[16955:4595943] [ProcessSuspension]  0x11cad94c8 - ProcessAssertion() PID 16955 Unable to acquire assertion for process with PID 16955
2020-10-20 08:15:52.397274-0400 Runner[16955:4595781] [ProcessSuspension] 0x11cad94c8 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-20 08:15:52.398113-0400 Runner[16955:4595943] [assertion] Error acquiring assertion: <NSError: 0x2833559e0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x151b6b3d0; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-20 08:15:52.398206-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: https://bnl.attn.tv/creative?v=1.0.903&r=&w=414&h=660&id=aef664dffb3f4437870d73e933109543&l=https%3A%2F%2Fwww.bravenewlook.com%2F&ss_ref=ORGANIC&t=n&pv=3, isForMainFrame: false)
2020-10-20 08:15:52.398210-0400 Runner[16955:4595943] [ProcessSuspension]  0x11cad94f0 - ProcessAssertion() PID 16955 Unable to acquire assertion for process with PID 16960
2020-10-20 08:15:52.398290-0400 Runner[16955:4595781] [ProcessSuspension] 0x11cad94f0 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-20 08:15:52.432070-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: https://gum.criteo.com/syncframe?topUrl=www.bravenewlook.com#%7B%22bundle%22:%7B%22origin%22:0,%22value%22:null%7D,%22cw%22:true,%22lwid%22:%7B%22origin%22:0,%22value%22:null%7D,%22optout%22:%7B%22origin%22:0,%22value%22:null%7D,%22origin%22:%22onetag%22,%22pm%22:0,%22sid%22:%7B%22origin%22:0,%22value%22:null%7D,%22tld%22:%22bravenewlook.com%22,%22topUrl%22:%22www.bravenewlook.com%22,%22uid%22:null,%22version%22:%225_6_2%22%7D, isForMainFrame: false)
2020-10-20 08:15:52.636385-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-20 08:15:52.663768-0400 Runner[16955:4596057] [assertion] Error acquiring assertion: <NSError: 0x2833d66a0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x14ff0d4f0; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-20 08:15:52.663831-0400 Runner[16955:4596057] [ProcessSuspension]  0x11cada9e0 - ProcessAssertion() PID 16955 Unable to acquire assertion for process with PID 16961
2020-10-20 08:15:52.663878-0400 Runner[16955:4595781] [ProcessSuspension] 0x11cada9e0 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-20 08:15:52.665002-0400 Runner[16955:4596057] [assertion] Error acquiring assertion: <NSError: 0x2833f36f0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x14fd3e3f0; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-20 08:15:52.665047-0400 Runner[16955:4596057] [ProcessSuspension]  0x11cadaa08 - ProcessAssertion() PID 16955 Unable to acquire assertion for process with PID 16955
2020-10-20 08:15:52.665081-0400 Runner[16955:4595781] [ProcessSuspension] 0x11cadaa08 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-20 08:15:52.665865-0400 Runner[16955:4596057] [assertion] Error acquiring assertion: <NSError: 0x2833d64c0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x14fd3e3f0; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-10-20 08:15:52.665901-0400 Runner[16955:4596057] [ProcessSuspension]  0x11cadaa30 - ProcessAssertion() PID 16955 Unable to acquire assertion for process with PID 16960
2020-10-20 08:15:52.665941-0400 Runner[16955:4595781] [ProcessSuspension] 0x11cadaa30 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-20 08:15:52.688362-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-20 08:15:52.692084-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: https://tr.snapchat.com/p, isForMainFrame: false)
2020-10-20 08:15:52.694454-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-20 08:15:52.755026-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: https://cdn.jst.ai/store_4.1.html?v=3.61#C9526EF5-6085-40D9-BA43-C16F464F31A9%7C59a5abf8-12cd-11eb-8e4d-2d5e9b1f3e04%7C%7C%7C, isForMainFrame: false)
2020-10-20 08:15:52.960443-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: https://cdn.jst.ai/store_4.1.html?v=3.61#C9526EF5-6085-40D9-BA43-C16F464F31A9%7C59a5abf8-12cd-11eb-8e4d-2d5e9b1f3e04%7C%7C%7C, isForMainFrame: false)
2020-10-20 08:15:53.055587-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: about:blank, isForMainFrame: false)
2020-10-20 08:15:53.060666-0400 Runner[16955:4595957] flutter: allowing navigation to NavigationRequest(url: https://www.facebook.com/v3.3/plugins/messenger_checkbox.php?allow_login=false&app_id=435291730178743&channel=https%3A%2F%2Fstaticxx.facebook.com%2Fx%2Fconnect%2Fxd_arbiter%2F%3Fversion%3D46%23cb%3Df1df0334dc963cc%26domain%3Dwww.bravenewlook.com%26origin%3Dhttps%253A%252F%252Fwww.bravenewlook.com%252Ff308b05a22af10a%26relation%3Dparent.parent&container_width=0&locale=en_US&messenger_app_id=435291730178743&origin=https%3A%2F%2Fwww.bravenewlook.com&page_id=1136781033034012&sdk=joey&user_ref=shopmsg-test-1603196153027, isForMainFrame: false)
2020-10-20 08:15:53.312758-0400 Runner[16955:4595957] flutter: Page finished loading: https://www.bravenewlook.com/
2020-10-20 08:16:09.854733-0400 Runner[16955:4595781] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
2020-10-20 08:16:09.859505-0400 Runner[16955:4595781] Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service

[✓] Flutter (Channel stable, 1.22.2, on Mac OS X 10.15.6 19G73, locale en-US)
    • Flutter version 1.22.2 at /Users/xxx/Developer/flutter
    • Framework revision 84f3d28555 (5 days ago), 2020-10-15 16:26:19 -0700
    • Engine revision b8752bbfff
    • Dart version 2.10.2

 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/xxx/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 49.0.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (2 available)
    • xxx’s iPhone (mobile)     • d023e150d07d2cf5ac85e62df210f2f9585264cc • ios • iOS 13.5
    • iPhone 11 Pro Max (mobile) • D9A36B11-B881-41DF-B8BE-FDCB63A8F353     • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)

• No issues found!

@karmelcorn
Tried per your steps but didn't see any issue. I was able to open and close the webview and navigate back and forth properly.

flutter: Page finished loading: https://flutter.dev/
flutter: allowing navigation to NavigationRequest(url: https://flutter.dev/, isForMainFrame: true)
flutter: Page started loading: https://flutter.dev/
flutter: blocking navigation to NavigationRequest(url: https://www.youtube.com/embed/W1pNjxmNHNQ, isForMainFrame: false)}
flutter: blocking navigation to NavigationRequest(url: https://www.youtube.com/embed/fq4N0hgOWzU?cc_lang_pref=en&cc_load_policy=1&enablejsapi=1, isForMainFrame: false)}
flutter: Page finished loading: https://flutter.dev/

Tested on iPhone 6s (OS 14).
Can you provide video of the issue and error.

@darshankawar . Here's a video of the error.

Thank you.

@karmelcorn
Thanks for the video. since you mentioned iOS 13, it could be related to that OS. Since I don't have that OS, I can't replicate it. Is it possible for you to upgrade to latest OS and try again to see if it works ?

I have the same error
Main Thread Checker: UI API called on a background thread: -[UIView removeFromSuperview] PID: 2332, TID: 61151, Thread name: io.flutter.1.raster, Queue name: com.apple.root.default-qos.overcommit, QoS: 0 Backtrace: 4 Flutter 0x000000010ee8bb32 _ZN7flutter30FlutterPlatformViewsController18RemoveUnusedLayersEv + 78 5 Flutter 0x000000010ee8b4b8 _ZN7flutter30FlutterPlatformViewsController11SubmitFrameEP15GrDirectContextNSt3__110shared_ptrINS_10IOSContextEEENS3_10unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS8_EEEE + 1234 6 Flutter 0x000000010eea8a40 _ZN7flutter10IOSSurface11SubmitFrameEP15GrDirectContextNSt3__110unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS5_EEEE + 160 7 Flutter 0x000000010f1e3db3 _ZN7flutter10Rasterizer13DrawToSurfaceERNS_9LayerTreeE + 493 8 Flutter 0x000000010f1e49fb _ZN7flutter10Rasterizer6DoDrawENSt3__110unique_ptrINS_9LayerTreeENS1_14default_deleteIS3_EEEE + 123 9 Flutter 0x000000010f1e56eb _ZNSt3__110__function6__funcIZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEEE3$_1NS_9allocatorISA_EEFvNS_10unique_ptrIS7_NS_14default_deleteIS7_EEEEEEclEOSG_ + 41 10 Flutter 0x000000010f1e420e _ZN7flutter8PipelineINS_9LayerTreeEE7ConsumeERKNSt3__18functionIFvNS3_10unique_ptrIS1_NS3_14default_deleteIS1_EEEEEEE + 222 11 Flutter 0x000000010f1e3f0a _ZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS_8PipelineINS_9LayerTreeEEEEE + 128 12 Flutter 0x000000010f1f56de _ZNSt3__110__function6__funcIZN7flutter5Shell14OnAnimatorDrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEENS4_9TimePointEE4$_30NS_9allocatorISB_EEFvvEEclEv + 82 13 Flutter 0x000000010eeb1d56 _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 160 14 Flutter 0x000000010eeb6ac6 _ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0_ + 26 15 CoreFoundation 0x000000010d99f112 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20 16 CoreFoundation 0x000000010d99ebe5 __CFRunLoopDoTimer + 926 17 CoreFoundation 0x000000010d99e198 __CFRunLoopDoTimers + 265 18 CoreFoundation 0x000000010d998826 __CFRunLoopRun + 1949 19 CoreFoundation 0x000000010d997b9e CFRunLoopRunSpecific + 567 20 Flutter 0x000000010eeb6bf1 _ZN3fml17MessageLoopDarwin3RunEv + 65 21 Flutter 0x000000010eeb1c6a _ZN3fml15MessageLoopImpl5DoRunEv + 22 22 Flutter 0x000000010eeb58f0 _ZNSt3__114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN3fml6ThreadC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEE3$_0EEEEEPvSJ_ + 170 23 libsystem_pthread.dylib 0x0000000118e61109 _pthread_start + 148 24 libsystem_pthread.dylib 0x0000000118e5cb8b thread_start + 15 2020-10-21 15:58:45.573667+0800 IMIN[2332:61151] [reports] Main Thread Checker: UI API called on a background thread: -[UIView removeFromSuperview] PID: 2332, TID: 61151, Thread name: io.flutter.1.raster, Queue name: com.apple.root.default-qos.overcommit, QoS: 0 Backtrace: 4 Flutter 0x000000010ee8bb32 _ZN7flutter30FlutterPlatformViewsController18RemoveUnusedLayersEv + 78 5 Flutter 0x000000010ee8b4b8 _ZN7flutter30FlutterPlatformViewsController11SubmitFrameEP15GrDirectContextNSt3__110shared_ptrINS_10IOSContextEEENS3_10unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS8_EEEE + 1234 6 Flutter 0x000000010eea8a40 _ZN7flutter10IOSSurface11SubmitFrameEP15GrDirectContextNSt3__110unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS5_EEEE + 160 7 Flutter 0x000000010f1e3db3 _ZN7flutter10Rasterizer13DrawToSurfaceERNS_9LayerTreeE + 493 8 Flutter 0x000000010f1e49fb _ZN7flutter10Rasterizer6DoDrawENSt3__110unique_ptrINS_9LayerTreeENS1_14default_deleteIS3_EEEE + 123 9 Flutter 0x000000010f1e56eb _ZNSt3__110__function6__funcIZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEEE3$_1NS_9allocatorISA_EEFvNS_10unique_ptrIS7_NS_14default_deleteIS7_EEEEEEclEOSG_ + 41 10 Flutter 0x000000010f1e420e _ZN7flutter8PipelineINS_9LayerTreeEE7ConsumeERKNSt3__18functionIFvNS3_10unique_ptrIS1_NS3_14default_deleteIS1_EEEEEEE + 222 11 Flutter 0x000000010f1e3f0a _ZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS_8PipelineINS_9LayerTreeEEEEE + 128 12 Flutter 0x000000010f1f56de _ZNSt3__110__function6__funcIZN7flutter5Shell14OnAnimatorDrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEENS4_9TimePointEE4$_30NS_9allocatorISB_EEFvvEEclEv + 82 13 Flutter 0x000000010eeb1d56 _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 160 14 Flutter 0x000000010eeb6ac6 _ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0_ + 26 15 CoreFoundation 0x000000010d99f112 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20 16 CoreFoundation 0x000000010d99ebe5 __CFRunLoopDoTimer + 926 17 CoreFoundation 0x000000010d99e198 __CFRunLoopDoTimers + 265 18 CoreFoundation 0x000000010d998826 __CFRunLoopRun + 1949 19 CoreFoundation 0x000000010d997b9e CFRunLoopRunSpecific + 567 20 Flutter 0x000000010eeb6bf1 _ZN3fml17MessageLoopDarwin3RunEv + 65 21 Flutter 0x000000010eeb1c6a _ZN3fml15MessageLoopImpl5DoRunEv + 22 22 Flutter 0x000000010eeb58f0 _ZNSt3__114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN3fml6ThreadC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEE3$_0EEEEEPvSJ_ + 170 23 libsystem_pthread.dylib 0x0000000118e61109 _pthread_start + 148 24 libsystem_pthread.dylib 0x0000000118e5cb8b thread_start + 15

yupi commented

@karmelcorn
Thanks for the video. since you mentioned iOS 13, it could be related to that OS. Since I don't have that OS, I can't replicate it. Is it possible for you to upgrade to latest OS and try again to see if it works ?

I have this issue on Xcode12 and iPhone8 with iOS 14.

I have this issue on Xcode12 (not android studio/VSCode) and iPhone11 with iOS 14.
The error occurs when navigating in the app and switching from screen to screen

My team is seeing the issue as well. My teammate saw it running Flutter 1.22.2, iOS 14.1, Xcode 12. I did not see it running Flutter 1.22.0, iOS 13.5.1, Xcode 12. So it was (likely) introduced in Flutter 1.22.2 and is not specific to what iOS version is being used?

I am getting the same problem, really getting in the way now
EDIT: Having given up on fixing this I ran in release mode to check if the problem persists, it doesn't.

Main Thread Checker: UI API called on a background thread: -[UIView removeFromSuperview]
PID: 512, TID: 47279, Thread name: io.flutter.1.raster, Queue name: com.apple.root.default-qos.overcommit, QoS: 0

同样的问题,不同的地方

Same issue with iOS 14 / iPhone 12 / 1.22.2

I am getting the same problem, really getting in the way now
EDIT: Having given up on fixing this I ran in release mode to check if the problem persists, it doesn't.

I can reproduce the bug on both debug and release modes

seems related to platformview, I have same problems with the google maps addons sometime when another view appears on top of the map

Main Thread Checker: UI API called on a background thread: -[UIView removeFromSuperview]
PID: 9118, TID: 8082462, Thread name: io.flutter.1.raster, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   Flutter                             0x0000000101c3cba0 _ZN7flutter30FlutterPlatformViewsController18RemoveUnusedLayersEv + 160
5   Flutter                             0x0000000101c3bbb4 _ZN7flutter30FlutterPlatformViewsController11SubmitFrameEP15GrDirectContextNSt3__110shared_ptrINS_10IOSContextEEENS3_10unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS8_EEEE + 1780
6   Flutter                             0x0000000101cc1174 _ZN7flutter23IOSExternalViewEmbedder11SubmitFrameEP15GrDirectContextNSt3__110unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS5_EEEE + 352
7   Flutter                             0x0000000102de8ad4 _ZN7flutter10Rasterizer13DrawToSurfaceERNS_9LayerTreeE + 1248
8   Flutter                             0x0000000102dea0b4 _ZN7flutter10Rasterizer6DoDrawENSt3__110unique_ptrINS_9LayerTreeENS1_14default_deleteIS3_EEEE + 512
9   Flutter                             0x0000000102df6e24 _ZZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS_8PipelineINS_9LayerTreeEEEEENSt3__18functionIFbRS4_EEEENK3$_1clENS7_10unique_ptrIS4_NS7_14default_deleteIS4_EEEE + 148
10  Flutter                             0x0000000102df6d68 _ZNSt3__1L8__invokeIRZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS1_8PipelineINS1_9LayerTreeEEEEENS_8functionIFbRS6_EEEE3$_1JNS_10unique_ptrIS6_NS_14default_deleteIS6_EEEEEEEDTclclsr3std3__1E7forwardIT_Efp_Espclsr3std3__1E7forwardIT0_Efp0_EEEOSJ_DpOSK_ + 88
11  Flutter                             0x0000000102df6ce0 _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS3_8PipelineINS3_9LayerTreeEEEEENS_8functionIFbRS8_EEEE3$_1NS_10unique_ptrIS8_NS_14default_deleteIS8_EEEEEEEvDpOT_ + 64
12  Flutter                             0x0000000102df6c80 _ZNSt3__110__function12__alloc_funcIZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEENS_8functionIFbRS7_EEEE3$_1NS_9allocatorISE_EEFvNS_10unique_ptrIS7_NS_14default_deleteIS7_EEEEEEclEOSK_ + 64
13  Flutter                             0x0000000102df5950 _ZNSt3__110__function6__funcIZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEENS_8functionIFbRS7_EEEE3$_1NS_9allocatorISE_EEFvNS_10unique_ptrIS7_NS_14default_deleteIS7_EEEEEEclEOSK_ + 64
14  Flutter                             0x0000000102df78f8 _ZNKSt3__110__function12__value_funcIFvNS_10unique_ptrIN7flutter9LayerTreeENS_14default_deleteIS4_EEEEEEclEOS7_ + 88
15  Flutter                             0x0000000102df7300 _ZNKSt3__18functionIFvNS_10unique_ptrIN7flutter9LayerTreeENS_14default_deleteIS3_EEEEEEclES6_ + 52
16  Flutter                             0x0000000102de91c4 _ZN7flutter8PipelineINS_9LayerTreeEE7ConsumeERKNSt3__18functionIFvNS3_10unique_ptrIS1_NS3_14default_deleteIS1_EEEEEEE + 368
17  Flutter                             0x0000000102de8da8 _ZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS_8PipelineINS_9LayerTreeEEEEENSt3__18functionIFbRS4_EEE + 428
18  Flutter                             0x0000000102e866f8 _ZZN7flutter5Shell14OnAnimatorDrawEN3fml6RefPtrINS_8PipelineINS_9LayerTreeEEEEENS1_9TimePointEENK4$_31clEv + 160
19  Flutter                             0x0000000102e86638 _ZNSt3__1L8__invokeIRZN7flutter5Shell14OnAnimatorDrawEN3fml6RefPtrINS1_8PipelineINS1_9LayerTreeEEEEENS3_9TimePointEE4$_31JEEEDTclclsr3std3__1E7forwardIT_Efp_Espclsr3std3__1E7forwardIT0_Efp0_EEEOSC_DpOSD_ + 28
20  Flutter                             0x0000000102e865ec _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZN7flutter5Shell14OnAnimatorDrawEN3fml6RefPtrINS3_8PipelineINS3_9LayerTreeEEEEENS5_9TimePointEE4$_31EEEvDpOT_ + 28
21  Flutter                             0x0000000102e865c4 _ZNSt3__110__function12__alloc_funcIZN7flutter5Shell14OnAnimatorDrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEENS4_9TimePointEE4$_31NS_9allocatorISB_EEFvvEEclEv + 28
22  Flutter                             0x0000000102e85054 _ZNSt3__110__function6__fu2020-10-28 09:40:12.882023+0100 Runner[9118:8082462] [reports] Main Thread Checker: UI API called on a background thread: -[UIView removeFromSuperview]
PID: 9118, TID: 8082462, Thread name: io.flutter.1.raster, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   Flutter                             0x0000000101c3cba0 _ZN7flutter30FlutterPlatformViewsController18RemoveUnusedLayersEv + 160
5   Flutter                             0x0000000101c3bbb4 _ZN7flutter30FlutterPlatformViewsController11SubmitFrameEP15GrDirectContextNSt3__110shared_ptrINS_10IOSContextEEENS3_10unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS8_EEEE + 1780
6   Flutter                             0x0000000101cc1174 _ZN7flutter23IOSExternalViewEmbedder11SubmitFrameEP15GrDirectContextNSt3__110unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS5_EEEE + 352
7   Flutter                             0x0000000102de8ad4 _ZN7flutter10Rasterizer13DrawToSurfaceERNS_9LayerTreeE + 1248
8   Flutter                             0x0000000102dea0b4 _ZN7flutter10Rasterizer6DoDrawENSt3__110unique_ptrINS_9LayerTreeENS1_14default_deleteIS3_EEEE + 512
9   Flutter                             0x0000000102df6e24 _ZZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS_8PipelineINS_9LayerTreeEEEEENSt3__18functionIFbRS4_EEEENK3$_1clENS7_10unique_ptrIS4_NS7_14default_deleteIS4_EEEE + 148
10  Flutter                             0x0000000102df6d68 _ZNSt3__1L8__invokeIRZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS1_8PipelineINS1_9LayerTreeEEEEENS_8functionIFbRS6_EEEE3$_1JNS_10unique_ptrIS6_NS_14default_deleteIS6_EEEEEEEDTclclsr3std3__1E7forwardIT_Efp_Espclsr3std3__1E7forwardIT0_Efp0_EEEOSJ_DpOSK_ + 88
11  Flutter                             0x0000000102df6ce0 _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS3_8PipelineINS3_9LayerTreeEEEEENS_8functionIFbRS8_EEEE3$_1NS_10unique_ptrIS8_NS_14default_deleteIS8_EEEEEEEvDpOT_ + 64
12  Flutter                             0x0000000102df6c80 _ZNSt3__110__function12__alloc_funcIZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEENS_8functionIFbRS7_EEEE3$_1NS_9allocatorISE_EEFvNS_10unique_ptrIS7_NS_14default_deleteIS7_EEEEEEclEOSK_ + 64
13  Flutter                             0x0000000102df5950 _ZNSt3__110__function6__funcIZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEENS_8functionIFbRS7_EEEE3$_1NS_9allocatorISE_EEFvNS_10unique_ptrIS7_NS_14default_deleteIS7_EEEEEEclEOSK_ + 64
14  Flutter                             0x0000000102df78f8 _ZNKSt3__110__function12__value_funcIFvNS_10unique_ptrIN7flutter9LayerTreeENS_14default_deleteIS4_EEEEEEclEOS7_ + 88
15  Flutter                             0x0000000102df7300 _ZNKSt3__18functionIFvNS_10unique_ptrIN7flutter9LayerTreeENS_14default_deleteIS3_EEEEEEclES6_ + 52
16  Flutter                             0x0000000102de91c4 _ZN7flutter8PipelineINS_9LayerTreeEE7ConsumeERKNSt3__18functionIFvNS3_10unique_ptrIS1_NS3_14default_deleteIS1_EEEEEEE + 368
17  Flutter                             0x0000000102de8da8 _ZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS_8PipelineINS_9LayerTreeEEEEENSt3__18functionIFbRS4_EEE + 428
18  Flutter                             0x0000000102e866f8 _ZZN7flutter5Shell14OnAnimatorDrawEN3fml6RefPtrINS_8PipelineINS_9LayerTreeEEEEENS1_9TimePointEENK4$_31clEv + 160
19  Flutter                             0x0000000102e86638 _ZNSt3__1L8__invokeIRZN7flutter5Shell14OnAnimatorDrawEN3fml6RefPtrINS1_8PipelineINS1_9LayerTreeEEEEENS3_9TimePointEE4$_31JEEEDTclclsr3std3__1E7forwardIT_Efp_Espclsr3std3__1E7forwardIT0_Efp0_EEEOSC_DpOSD_ + 28
20  Flutter                             0x0000000102e865ec _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZN7flutter5Shell14OnAnimatorDrawEN3fml6RefPtrINS3_8PipelineINS3_9LayerTreeEEEEENS5_9TimePointEE4$_31EEEvDpOT_ + 28
21  Flutter                             0x0000000102e865c4 _ZNSt3__110__function12__alloc_funcIZN7flutter5Shell14OnAnimatorDrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEENS4_9TimePointEE4$_31NS_9allocatorISB_EEFvvEEclEv + 28

iPhone XR, latest flutter master, built with flutter source code

I'm now experiencing this bug with other views, not only WebViews. See #69170

same issues on iPad2018, iOS14, Flutter 1.22.1, when open a new route or close the webview page, it happened

A similar issue is open and I'd suggest everyone to follow-up there for updates and any questions.
I am closing this as duplicate. If you disagree, write in comments and I'll reopen.
Thanks.

flutter/engine#22372 addresses this bug in 1.24.0-6.0.pre.

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.