Skip to content
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

[webview_flutter] video not visible #109939

Open
woutervanwijk opened this issue Aug 21, 2022 · 8 comments
Open

[webview_flutter] video not visible #109939

woutervanwijk opened this issue Aug 21, 2022 · 8 comments
Labels
found in release: 3.0 Found to occur in 3.0 found in release: 3.1 Found to occur in 3.1 has reproducible steps The issue has been confirmed reproducible and is ready to work on p: webview The WebView plugin P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. team-ecosystem Owned by Ecosystem team triaged-ecosystem Triaged by Ecosystem team

Comments

@woutervanwijk
Copy link

woutervanwijk commented Aug 21, 2022

Steps to Reproduce

  1. Execute flutter run on the code sample
  2. tap on one of the buttons on the bottom
  3. video not correctly loaded
    Expected results:
    video correctly loaded
    Actual results:
    no video

I know it can be a special situation with this site, but in other apps using the sfsafaribrowser view, it works normally. But not in this plugin and the flutter_inappwebview plugin. (also filed there pichillilorenzo/flutter_inappwebview#1289 )

import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  late WebViewController webViewController;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        home: Scaffold(
            bottomSheet: Row(children: [
              TextButton(
                child: const Text('rtl b'),
                onPressed: () => webViewController.loadUrl(
                    'https://www.rtlboulevard.nl/video/tv-fragmenten/video/5328092/snelle-reageert-koeltjes-op-verrassing-komt-misschien-niet'),
              ),
              TextButton(
                child: const Text('rtl nieuws'),
                onPressed: () => webViewController.loadUrl(
                    'https://www.rtlnieuws.nl/nieuws/video/video/5328094/spannende-minuten-kinderen-vast-attractie-hellendoorn'),
              ),
            ]),
            body: WebView(
              navigationDelegate: (NavigationRequest navigation) async {
                debugPrint('Nav ${navigation.url}');
                return NavigationDecision.navigate;
              },
              key: const Key('webviewkey'),
              javascriptMode: JavascriptMode.unrestricted,
              onWebViewCreated: (WebViewController controller) {
                webViewController = controller;
              },
              onPageStarted: (url) {
                debugPrint('Page started $url');
              },
              onPageFinished: (url) {
                debugPrint('Page finished $url');
              },
              onWebResourceError: (error) async {
                debugPrint(
                    'Webview load error: ${error.description} ${error.failingUrl}  ${error.domain}');
              },
              backgroundColor:
                  Colors.white, //needed for some websites in dark mode
              initialMediaPlaybackPolicy: AutoMediaPlaybackPolicy
                  .require_user_action_for_all_media_types,
              allowsInlineMediaPlayback: true,
              gestureNavigationEnabled: true,
            )));
  }
}
Logs
[+5253 ms] flutter: Nav https://www.rtlboulevard.nl/video/tv-fragmenten/video/5328092/snelle-reageert-koeltjes-op-verrassing-komt-misschien-niet
[  +16 ms] flutter: Page started
https://www.rtlboulevard.nl/video/tv-fragmenten/video/5328092/snelle-reageert-koeltjes-op-verrassing-komt-misschien-niet
[+1229 ms] flutter: Nav about:blank
[  +12 ms] flutter: Nav
https://cdns.eu1.gigya.com/gs/webSdk/Api.aspx?apiKey=3_uD6jITpXLkZQgCFiaRDhmZvnkv2C5aLNWnDRcr0Fqj0-9INW8oAo6qCVjPEHAW2c&version=latest&build=13318#origi
n=https://www.rtlboulevard.nl/video/tv-fragmenten/video/5328092/snelle-reageert-koeltjes-op-verrassing-komt-misschien-niet&gig_loggerConfig=%7B%22logLev
el%22%3A0%2C%22clientMuteLevel%22%3A0%2C%22logTheme%22%3A1%7D
[+1199 ms] flutter: Page finished
https://www.rtlboulevard.nl/video/tv-fragmenten/video/5328092/snelle-reageert-koeltjes-op-verrassing-komt-misschien-niet
[ +180 ms] flutter: Nav about:blank
[   +2 ms] flutter: Nav about:blank
[ +497 ms] flutter: Nav https://cdns.gigya.com/
[   +2 ms] flutter: Nav https://cdns1.gigya.com/
[ +224 ms] flutter: Nav
https://cdns.eu1.gigya.com/gs/sso.htm?APIKey=3_2DkoMEf_EV5WebSJIZGSGVG9RaqbBC1Q7_DWdHL3Z1y_5y1vQaMAIhjDA2K7HDAy&ssoSegment=&version=latest&build=13318#i
sCanary=false&canaryVersion=13363-3-27684645&m=syncCanaryIndication&d=https%3A%2F%2Fwww.rtlboulevard.nl&callbackID=gig_sso_cb1661081579409_0&sAPIKey=3_u
D6jITpXLkZQgCFiaRDhmZvnkv2C5aLNWnDRcr0Fqj0-9INW8oAo6qCVjPEHAW2c&gig_loggerConfig=%7B%22logLevel%22%3A0%2C%22clientMuteLevel%22%3A0%2C%22logTheme%22%3A1%
7D
[   +2 ms] flutter: Nav
https://cdns.eu1.gigya.com/gs/sso.htm?APIKey=3_2DkoMEf_EV5WebSJIZGSGVG9RaqbBC1Q7_DWdHL3Z1y_5y1vQaMAIhjDA2K7HDAy&ssoSegment=&version=latest&build=13318#m
=getToken&d=https%3A%2F%2Fwww.rtlboulevard.nl&callbackID=gig_sso_cb1661081579411_1&sAPIKey=3_uD6jITpXLkZQgCFiaRDhmZvnkv2C5aLNWnDRcr0Fqj0-9INW8oAo6qCVjPE
HAW2c&gig_loggerConfig=%7B%22logLevel%22%3A0%2C%22clientMuteLevel%22%3A0%2C%22logTheme%22%3A1%7D
[ +316 ms] flutter: Nav https://cdns2.gigya.com/
[  +29 ms] flutter: Nav
https://cdns.eu1.gigya.com/gs/sso.htm?APIKey=3_2DkoMEf_EV5WebSJIZGSGVG9RaqbBC1Q7_DWdHL3Z1y_5y1vQaMAIhjDA2K7HDAy&ssoSegment=&version=latest&build=13318#m
=removeToken&d=https%3A%2F%2Fwww.rtlboulevard.nl&callbackID=gig_sso_cb1661081579954_2&sAPIKey=3_uD6jITpXLkZQgCFiaRDhmZvnkv2C5aLNWnDRcr0Fqj0-9INW8oAo6qCV
jPEHAW2c&gig_loggerConfig=%7B%22logLevel%22%3A0%2C%22clientMuteLevel%22%3A0%2C%22logTheme%22%3A1%7D
[ +321 ms] flutter: Nav
https://rtl.demdex.net/dest5.html?d_nsid=undefined#https%3A%2F%2Fwww.rtlboulevard.nl%2Fvideo%2Ftv-fragmenten%2Fvideo%2F5328092%2Fsnelle-reageert-koeltje
s-op-verrassing-komt-misschien-niet
laptopWouter:webviewtest wouter$ flutter doctor -v
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.5.1 21G83 darwin-arm, locale nl-NL)
    • Flutter version 3.0.5 at /Users/wouter/Library/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (6 weeks ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/wouter/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_SDK_ROOT = /Users/wouter/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • 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 11.0.11+0-b60-7772763)

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

[✓] Connected device (3 available)
    • iPhone 5s (mobile) • 7D250FF1-F440-4510-AC13-46E9634B33C7 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-12-4 (simulator)
    • macOS (desktop)    • macos                                • darwin-arm64   • macOS 12.5.1 21G83 darwin-arm
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 104.0.5112.101

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
@stuartmorgan
Copy link
Contributor

but in other apps using the sfsafaribrowser view, it works normally. But not in this plugin and the flutter_inappwebview plugin

WKWebView and SFSafariController are not the same thing; does it work in a simple non-Flutter test app using WKWebView?

@huycozy huycozy added the in triage Presently being triaged by the triage team label Aug 22, 2022
@huycozy
Copy link
Member

huycozy commented Aug 22, 2022

Hi @woutervanwijk
I did some tests. When opening two test urls (url 1 and url 2) on Safari browser, the result is different between physical device and emulator device:

✅: No Issue ❌: Issue reproduced

  • Safari browser:
Emulator ❌ Physical device ✅
  • Flutter app (only showing video thumbnail, can not play):
Emulator ❌ Physical device ❌

Could you please clarify what stuartmorgan mentioned in #109939 (comment)?

@huycozy huycozy added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 22, 2022
@woutervanwijk
Copy link
Author

WKWebView and SFSafariController are not the same thing; does it work in a simple non-Flutter test app using WKWebView?

Yes, sorry, it's WKWebview of course!

I tried it with a native swift app (grabbed this demo
https://github.com/mmafrar/swift-ios-wkwebview-demo )

Both video's play on the physical device, and not on the simulator.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 22, 2022
@woutervanwijk
Copy link
Author

woutervanwijk commented Aug 22, 2022

Hi @woutervanwijk I did some tests. When opening two test urls (url 1 and url 2) on Safari browser, the result is different between physical device and emulator device:

✅: No Issue ❌: Issue reproduced

* Safari browser:

Emulator ❌ Physical device ✅

* Flutter app (only showing video thumbnail, can not play):

Emulator ❌ Physical device ❌

Could you please clarify what stuartmorgan mentioned in #109939 (comment)?

For me, both video's never play. Not on the device and not on the simulator! (real: iphone XS, ios 15.6.1 and 5SE 15.0)

@huycozy
Copy link
Member

huycozy commented Aug 23, 2022

Hi @woutervanwijk
I tried running your iOS native sample code in #109939 (comment) (actually the URL in your sample code is https://www.google.com, I replaced it with url test) and see that the video didn't play on Simulator but it played on Physical device, see in the demo for the detail.

Demo (Simulator)
Screen.Recording.2022-08-23.at.10.16.05.mp4
Demo (Physical device)
RPReplay_Final1661225438.MP4
Logs (Simulator)
2022-08-23 10:37:54.787937+0700 wkwebview[63876:567673] [Process] 0x1140944e0 - GPUProcessProxy::didClose:
2022-08-23 10:37:54.788414+0700 wkwebview[63876:567673] [Process] 0x1140944e0 - GPUProcessProxy::gpuProcessExited: reason=crash
2022-08-23 10:37:54.788563+0700 wkwebview[63876:567673] [Process] 0x11405c180 - [PID=63881] WebProcessProxy::gpuProcessExited: reason=0
2022-08-23 10:37:54.792233+0700 wkwebview[63876:567864] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
2022-08-23 10:37:54.792524+0700 wkwebview[63876:567864] [ProcessSuspension] 0x1140008b0 - ProcessAssertion: Failed to acquire RBS assertion 'GPUProcess Background Assertion' for process with PID=63885, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
2022-08-23 10:37:55.151834+0700 wkwebview[63876:567673] [Process] 0x1140944e0 - GPUProcessProxy::didClose:
2022-08-23 10:37:55.152329+0700 wkwebview[63876:567673] [Process] 0x1140944e0 - GPUProcessProxy::gpuProcessExited: reason=crash
2022-08-23 10:37:55.152496+0700 wkwebview[63876:567673] [Process] 0x11405c180 - [PID=63881] WebProcessProxy::gpuProcessExited: reason=0
2022-08-23 10:37:55.162759+0700 wkwebview[63876:567857] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
2022-08-23 10:37:55.163043+0700 wkwebview[63876:567857] [ProcessSuspension] 0x114000950 - ProcessAssertion: Failed to acquire RBS assertion 'GPUProcess Background Assertion' for process with PID=63891, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
2022-08-23 10:37:55.423836+0700 wkwebview[63876:567673] [Process] 0x114094a60 - GPUProcessProxy::didClose:
2022-08-23 10:37:55.424018+0700 wkwebview[63876:567673] [Process] 0x114094a60 - GPUProcessProxy::gpuProcessExited: reason=crash
2022-08-23 10:37:55.424420+0700 wkwebview[63876:567673] [Process] 0x11405c180 - [PID=63881] WebProcessProxy::gpuProcessExited: reason=0
2022-08-23 10:37:55.424705+0700 wkwebview[63876:567673] [Process] 0x7f918bb04088 - WebProcessPool::gpuProcessDidExit: GPU Process has crashed more than 2 times in the last 30 seconds, terminating all WebProcesses
2022-08-23 10:37:55.424837+0700 wkwebview[63876:567673] [Process] 0x7f918bb04088 - WebProcessPool::terminateAllWebContentProcesses
2022-08-23 10:37:55.430069+0700 wkwebview[63876:567673] [Process] 0x11405c180 - [PID=63881] WebProcessProxy::didClose: (web process 0 crash)
2022-08-23 10:37:55.430568+0700 wkwebview[63876:567673] [Process] 0x11405c180 - [PID=63881] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=4
2022-08-23 10:37:55.430709+0700 wkwebview[63876:567861] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
2022-08-23 10:37:55.431449+0700 wkwebview[63876:567673] [ProcessSuspension] 0x1140042a0 - ProcessAssertion: Failed to acquire RBS Background assertion 'ConnectionTerminationWatchdog' for process because PID 0 is invalid
2022-08-23 10:37:55.432539+0700 wkwebview[63876:567673] [Process] 0x7f918a813220 - [pageProxyID=6, webPageID=7, PID=63881] WebPageProxy::processDidTerminate: (pid 63881), reason 4
2022-08-23 10:37:55.439151+0700 wkwebview[63876:567861] [ProcessSuspension] 0x1140007c0 - ProcessAssertion: Failed to acquire RBS assertion 'GPUProcess Background Assertion' for process with PID=63892, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
2022-08-23 10:37:55.439927+0700 wkwebview[63876:567673] [Loading] 0x7f918a813220 - [pageProxyID=6, webPageID=7, PID=63881] WebPageProxy::dispatchProcessDidTerminate: reason=Crash
2022-08-23 10:37:55.445007+0700 wkwebview[63876:567861] [ProcessSuspension] 0x1140042a0 - ProcessAssertion: Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=0, error: (null)
2022-08-23 10:37:55.493254+0700 wkwebview[63876:567861] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
2022-08-23 10:37:55.493433+0700 wkwebview[63876:567861] [ProcessSuspension] 0x114004300 - ProcessAssertion: Failed to acquire RBS assertion 'WebProcess Background Assertion' for process with PID=63881, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
2022-08-23 10:37:58.355539+0700 wkwebview[63876:567673] [Process] 0x1140c84e0 - GPUProcessProxy::didClose:
2022-08-23 10:37:58.356021+0700 wkwebview[63876:567673] [Process] 0x1140c84e0 - GPUProcessProxy::gpuProcessExited: reason=crash
2022-08-23 10:37:58.356179+0700 wkwebview[63876:567673] [Process] 0x11405c4a0 - [PID=63894] WebProcessProxy::gpuProcessExited: reason=0
2022-08-23 10:37:58.367341+0700 wkwebview[63876:567862] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
2022-08-23 10:37:58.369474+0700 wkwebview[63876:567862] [ProcessSuspension] 0x11409c400 - ProcessAssertion: Failed to acquire RBS assertion 'GPUProcess Background Assertion' for process with PID=63893, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
2022-08-23 10:37:58.605547+0700 wkwebview[63876:567673] [Process] 0x1140940c0 - GPUProcessProxy::didClose:
2022-08-23 10:37:58.606485+0700 wkwebview[63876:567673] [Process] 0x1140940c0 - GPUProcessProxy::gpuProcessExited: reason=crash
2022-08-23 10:37:58.606669+0700 wkwebview[63876:567673] [Process] 0x11405c4a0 - [PID=63894] WebProcessProxy::gpuProcessExited: reason=0
2022-08-23 10:37:58.618756+0700 wkwebview[63876:567862] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
2022-08-23 10:37:58.619216+0700 wkwebview[63876:567862] [ProcessSuspension] 0x11409c400 - ProcessAssertion: Failed to acquire RBS assertion 'GPUProcess Background Assertion' for process with PID=63898, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
2022-08-23 10:37:58.895897+0700 wkwebview[63876:567673] [Process] 0x114094900 - GPUProcessProxy::didClose:
2022-08-23 10:37:58.896385+0700 wkwebview[63876:567673] [Process] 0x114094900 - GPUProcessProxy::gpuProcessExited: reason=crash
2022-08-23 10:37:58.896528+0700 wkwebview[63876:567673] [Process] 0x11405c4a0 - [PID=63894] WebProcessProxy::gpuProcessExited: reason=0
2022-08-23 10:37:58.896848+0700 wkwebview[63876:567673] [Process] 0x7f918bb04088 - WebProcessPool::gpuProcessDidExit: GPU Process has crashed more than 2 times in the last 30 seconds, terminating all WebProcesses
2022-08-23 10:37:58.897037+0700 wkwebview[63876:567673] [Process] 0x7f918bb04088 - WebProcessPool::terminateAllWebContentProcesses
2022-08-23 10:37:58.902814+0700 wkwebview[63876:567673] [Process] 0x11405c4a0 - [PID=63894] WebProcessProxy::didClose: (web process 0 crash)
2022-08-23 10:37:58.902988+0700 wkwebview[63876:567673] [Process] 0x11405c4a0 - [PID=63894] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=4
2022-08-23 10:37:58.903820+0700 wkwebview[63876:567673] [ProcessSuspension] 0x1140041e0 - ProcessAssertion: Failed to acquire RBS Background assertion 'ConnectionTerminationWatchdog' for process because PID 0 is invalid
2022-08-23 10:37:58.904698+0700 wkwebview[63876:567673] [Process] 0x7f918a813220 - [pageProxyID=6, webPageID=7, PID=63894] WebPageProxy::processDidTerminate: (pid 63894), reason 4
2022-08-23 10:37:58.911139+0700 wkwebview[63876:567673] [Loading] 0x7f918a813220 - [pageProxyID=6, webPageID=7, PID=63894] WebPageProxy::dispatchProcessDidTerminate: reason=Crash
2022-08-23 10:37:58.911323+0700 wkwebview[63876:567673] [Process] 0x7f918a813220 - [pageProxyID=6, webPageID=7, PID=63894] WebPageProxy::tryReloadAfterProcessTermination: process crashed and the client did not handle it, not reloading the page because we reached the maximum number of attempts
2022-08-23 10:37:58.908539+0700 wkwebview[63876:567862] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
2022-08-23 10:37:58.914033+0700 wkwebview[63876:567862] [ProcessSuspension] 0x11409c860 - ProcessAssertion: Failed to acquire RBS assertion 'GPUProcess Background Assertion' for process with PID=63899, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
2022-08-23 10:37:58.914674+0700 wkwebview[63876:567862] [ProcessSuspension] 0x1140041e0 - ProcessAssertion: Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=0, error: (null)
2022-08-23 10:37:58.966928+0700 wkwebview[63876:567862] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
2022-08-23 10:37:58.967115+0700 wkwebview[63876:567862] [ProcessSuspension] 0x114004240 - ProcessAssertion: Failed to acquire RBS assertion 'WebProcess Background Assertion' for process with PID=63894, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
2022-08-23 10:37:58.985333+0700 wkwebview[63876:567862] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
2022-08-23 10:37:58.985553+0700 wkwebview[63876:567862] [ProcessSuspension] 0x114004360 - ProcessAssertion: Failed to acquire RBS assertion 'WebProcess Background Assertion' for process with PID=63894, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
2022-08-23 10:37:58.988387+0700 wkwebview[63876:567862] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
2022-08-23 10:37:58.988565+0700 wkwebview[63876:567862] [ProcessSuspension] 0x114004420 - ProcessAssertion: Failed to acquire RBS assertion 'WebProcess Suspended Assertion' for process with PID=63894, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
Logs (Physical device)
2022-08-23 10:33:51.429513+0700 wkwebview[7550:337542] [ViewportSizing] maximumViewportInset cannot be larger than frame
2022-08-23 10:33:51.429627+0700 wkwebview[7550:337542] [ViewportSizing] minimumViewportInset cannot be larger than frame
2022-08-23 10:34:01.604113+0700 wkwebview[7550:337599] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}>
2022-08-23 10:34:01.606588+0700 wkwebview[7550:337599] [ProcessSuspension] 0x10d000680 - ProcessAssertion: Failed to acquire RBS assertion 'WebKit Media Playback' for process with PID=7551, error: Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}
2022-08-23 10:34:01.648575+0700 wkwebview[7550:337599] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}>
2022-08-23 10:34:01.722579+0700 wkwebview[7550:337599] [ProcessSuspension] 0x10d0009f0 - ProcessAssertion: Failed to acquire RBS assertion 'WebKit Media Playback' for process with PID=7550, error: Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}
2022-08-23 10:34:01.788042+0700 wkwebview[7550:337599] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}>
2022-08-23 10:34:01.789714+0700 wkwebview[7550:337599] [ProcessSuspension] 0x10d000a40 - ProcessAssertion: Failed to acquire RBS assertion 'WebKit Media Playback' for process with PID=7554, error: Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}
2022-08-23 10:34:02.335238+0700 wkwebview[7550:337542] <CATransformLayer: 0x28015f860> - changing property masksToBounds in transform-only layer, will have no effect
2022-08-23 10:34:02.335898+0700 wkwebview[7550:337542] <CATransformLayer: 0x28015fac0> - changing property masksToBounds in transform-only layer, will have no effect
2022-08-23 10:34:02.341836+0700 wkwebview[7550:337542] <CATransformLayer: 0x280159080> - changing property masksToBounds in transform-only layer, will have no effect
2022-08-23 10:34:02.360851+0700 wkwebview[7550:337542] <CATransformLayer: 0x28015bee0> - changing property masksToBounds in transform-only layer, will have no effect
2022-08-23 10:34:02.362474+0700 wkwebview[7550:337542] <CATransformLayer: 0x280150280> - changing property masksToBounds in transform-only layer, will have no effect
2022-08-23 10:34:02.375490+0700 wkwebview[7550:337542] <CATransformLayer: 0x280159080> - changing property allowsGroupBlending in transform-only layer, will have no effect
2022-08-23 10:34:02.375784+0700 wkwebview[7550:337542] <CATransformLayer: 0x28015bee0> - changing property allowsGroupBlending in transform-only layer, will have no effect
2022-08-23 10:34:05.889309+0700 wkwebview[7550:337635] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}>
2022-08-23 10:34:05.889415+0700 wkwebview[7550:337635] [ProcessSuspension] 0x10d0009a0 - ProcessAssertion: Failed to acquire RBS assertion 'WebKit Media Playback' for process with PID=7551, error: Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}
2022-08-23 10:34:05.932442+0700 wkwebview[7550:337635] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}>
2022-08-23 10:34:05.938123+0700 wkwebview[7550:337635] [ProcessSuspension] 0x10d000680 - ProcessAssertion: Failed to acquire RBS assertion 'WebKit Media Playback' for process with PID=7550, error: Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}
2022-08-23 10:34:05.946507+0700 wkwebview[7550:337635] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}>
2022-08-23 10:34:05.947430+0700 wkwebview[7550:337635] [ProcessSuspension] 0x10d000950 - ProcessAssertion: Failed to acquire RBS assertion 'WebKit Media Playback' for process with PID=7554, error: Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}
flutter doctor -v
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.2.1 21D62 darwin-x64, locale en-VN)
    • Flutter version 3.0.5 at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (9 hours ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • 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 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • 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

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
    • 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

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

[✓] Connected device (3 available)
    • SM T225 (mobile) • R9JT3004VRJ • android-arm64  • Android 11 (API 30)
    • macOS (desktop)  • macos       • darwin-x64     • macOS 12.2.1 21D62 darwin-x64
    • Chrome (web)     • chrome      • web-javascript • Google Chrome 103.0.5060.114

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
[✓] Flutter (Channel master, 3.1.0-0.0.pre.2428, on macOS 12.5 21G72 darwin-x64, locale en-EE)
    • Flutter version 3.1.0-0.0.pre.2428 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 328545e5af (40 minutes ago), 2022-08-22 22:31:06 -0400
    • Engine revision ca48808d06
    • Dart version 2.19.0 (build 2.19.0-124.0.dev)
    • DevTools version 2.16.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13E113
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • 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 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • 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

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
    • 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

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

[✓] Connected device (3 available)
    • iPhone 13 (mobile) • 2526BC1A-435D-4B08-B99C-44B928F2517B • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-4 (simulator)
    • macOS (desktop)    • macos                                • darwin-x64     • macOS 12.5 21G72 darwin-x64
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 104.0.5112.101

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Labeling this issue for further investigation from the team.
The demo for Flutter app can be found in #109939 (comment)

@huycozy huycozy added plugin p: webview The WebView plugin has reproducible steps The issue has been confirmed reproducible and is ready to work on found in release: 3.0 Found to occur in 3.0 found in release: 3.1 Found to occur in 3.1 and removed in triage Presently being triaged by the triage team labels Aug 23, 2022
@stuartmorgan stuartmorgan added the P2 Important issues not at the top of the work list label Aug 25, 2022
@woutervanwijk
Copy link
Author

woutervanwijk commented Sep 26, 2022

By the way, this also happens with Twitter embeds on websites. That's quite something. No video in Flutter Webview for this url: https://www.vrt.be/vrtnws/nl/2022/09/26/protest-dagestan/
In the Swift app, it just works
also on techcrunch:
https://techcrunch.com/2022/09/16/ios-16-users-are-getting-creative-with-the-new-background-removal-feature-for-photos/

@flutter-clutter
Copy link

I am experiencing the same behavior with YouTube videos both in the simulator and on a real device (iPhone 12 Mini). The video shows a loading indicator in the embedded container but the video never starts playing.
If I use the very same URL (https://www.youtube.com/embed/-r2FX7E_b-Q?controls=1&loop=0&showinfo=0&modestbranding=1&rel=0&modestbranding=1&disablekb=1&autoplay=1&playsinline=0) as the initialUrl of a new WebView widget, it works. It only seems to be an issue when the playback is started by Javascript within the website.
The console prints the following messages. I don't know if there is a connection between the above mentioned behavior and the log messages:

[Security] This method should not be called on the main thread as it may lead to UI unresponsiveness.

@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
@Hixie Hixie removed the plugin label Jul 6, 2023
@flutter-triage-bot flutter-triage-bot bot added team-ecosystem Owned by Ecosystem team triaged-ecosystem Triaged by Ecosystem team labels Jul 8, 2023
@DiegoGW
Copy link

DiegoGW commented Nov 15, 2023

Hi @huycozy ! Same issue is still happening in latest version of Wonderous app(https://github.com/gskinnerTeam/flutter-wonderous-app.git). Youtube videos cannot be played in a simulator but they can be played in physical devices, but in both cases some errors are logged.

Log
Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}>
0x143051e90 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebKit Media Playback' for process with PID=473, error: Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}
flutter doctor -v
[✓] Flutter (Channel master, 3.17.0-9.0.pre.34, on macOS 14.1 23B74 darwin-arm64, locale en-US)
    • Flutter version 3.17.0-9.0.pre.34 on channel master at /Users/diegogawenda/fvm/versions/master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ca31aa17b2 (38 minutes ago), 2023-11-15 14:48:18 -0500
    • Engine revision 30327eae08
    • Dart version 3.3.0 (build 3.3.0-135.0.dev)
    • DevTools version 2.30.0-dev.4

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/diegogawenda/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/diegogawenda/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/diegogawenda/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 15.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A507
    • CocoaPods version 1.12.1

[✓] 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)

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

[✓] Connected device (3 available)
    • Somnio’s iPhone (mobile) • 00008120-001168D83C87C01E • ios            • iOS 17.1.1 21B91
    • macOS (desktop)          • macos                     • darwin-arm64   • macOS 14.1 23B74 darwin-arm64
    • Chrome (web)             • chrome                    • web-javascript • Google Chrome 119.0.6045.159

[✓] Network resources
    • All expected network resources are available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
found in release: 3.0 Found to occur in 3.0 found in release: 3.1 Found to occur in 3.1 has reproducible steps The issue has been confirmed reproducible and is ready to work on p: webview The WebView plugin P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. team-ecosystem Owned by Ecosystem team triaged-ecosystem Triaged by Ecosystem team
Projects
None yet
Development

No branches or pull requests

6 participants