Bug 172450

Summary: [GTK] Flash crashes after reload of Spotify, SiriuxXM and other streaming websites
Product: WebKit Reporter: Jiří Janoušek <janousek.jiri>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: aperez, bugs-noreply, mcatanzaro
Priority: P3 Keywords: Gtk
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   

Description Jiří Janoušek 2017-05-22 08:16:17 PDT
I've received a bug report from an user who runs Spotify in my WebKitGTK+-based app. The website initially works perfectly but the PluginProcess2 with Flash (25.0.0.148) crashes when page is reloaded. He can reproduce the issue also with WebKitGTK+ 2.16.2 MiniBrowser `/usr/libexec/webkit2gtk-4.0/MiniBrowser https://play.spotify.com/browse` with following stderr warnings:


(WebKitPluginProcess2:82): GLib-GObject-WARNING **: cannot register existing type 'CustomSignalsUnix'
(WebKitPluginProcess2:82): GLib-GObject-CRITICAL **: g_object_new: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
(WebKitPluginProcess2:82): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(WebKitPluginProcess2:82): GLib-GObject-CRITICAL **: g_signal_emit_by_name: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

Do you have any clue what went wrong? If you need any more information, don't hesitate to ask. I cannot reproduce the issue but the user is responsive. Thank you.
Comment 1 Jiří Janoušek 2017-06-18 03:09:57 PDT
The issue is still present with 2.16.3. I can reproduce this issue also with SiriusXM [1]. There also is a report on Stack overflow [2] which mentions YouTube and Youku [3].

[1]: https://www.siriusxm.com/
[2]: https://stackoverflow.com/questions/43289910/flashplayer23-24-25-can-only-play-once-in-webkitgtk-2-142-16
[3]: http://www.youku.com
Comment 2 Jiří Janoušek 2017-07-24 23:20:04 PDT
An ugly workaround is to kill WebKitPluginProcess2 on WebKit.LoadEvent.COMMITTED.

https://github.com/tiliado/nuvolaruntime/commit/8582ca6dab5ae043144d089187a73e7df1b02d3a
Comment 3 Adrian Perez 2018-05-02 16:52:16 PDT
(In reply to Jiří Janoušek from comment #1)
> The issue is still present with 2.16.3. I can reproduce this issue also with
> SiriusXM [1]. There also is a report on Stack overflow [2] which mentions
> YouTube and Youku [3].

Hi Jiří! Did you have any chance of trying whether this issue is still
present with WebKitGTK+ 2.20.1? Thanks!

(Also, as a side note: I wonder if some of these services might have
been moving away from Flash—hopefully!—, because in the long term
—no worries, we're talking *years*— we might want to disable and/or
remove support for NPAPI plug-ins anyway...)
Comment 4 Jiří Janoušek 2018-05-03 01:13:11 PDT
> Did you have any chance of trying whether this issue is still
present with WebKitGTK+ 2.20.1?

No, I've switched to Chromium Embedded Framework (CEF) since then because of the "works best in Google Chrome" status quo.

> I wonder if some of these services might have
been moving away from Flash—hopefully!

Most of them use HTML5 Audio with MSE when available (e.g., in Google Chrome), but it didn't work in WebKitGTK (with MSE enabled at both build & run time). BBC iPlayer (sports broadcasts) and Amazon Prime Music still require Flash (even in Chrome). In addition, Spotify requires Widevine DRM plugin.
Comment 5 Adrian Perez 2018-05-03 03:49:43 PDT
(In reply to Jiří Janoušek from comment #4)
> > Did you have any chance of trying whether this issue is still
> > present with WebKitGTK+ 2.20.1?
> 
> No, I've switched to Chromium Embedded Framework (CEF) since then because of
> the "works best in Google Chrome" status quo.

While it makes me feel a bit bad that we didn't manage to keep you on
WebKitGTK+, your decision of switching to CEF is understandable. Thanks
a lot for stopping by to comment in this old bug report :-)

> > I wonder if some of these services might have
> > been moving away from Flash—hopefully!
> 
> Most of them use HTML5 Audio with MSE when available (e.g., in Google
> Chrome), but it didn't work in WebKitGTK (with MSE enabled at both build &
> run time). BBC iPlayer (sports broadcasts) and Amazon Prime Music still
> require Flash (even in Chrome). In addition, Spotify requires Widevine DRM
> plugin.

While we are getting the state of MSE better with each release, we do not
still have upstream support for EME (so no Widevine).
Comment 6 Adrian Perez 2018-05-03 03:58:11 PDT
Going back to the topic of the bug report: I think this is still
happening. After installing freshplayerplugin (which allows using
the latest PPAPI-based Flash plugin on browsers with NPAPI support,
see: https://github.com/i-rinat/freshplayerplugin) I could get
SiriusXM to load and play music, and then pressing Ctrl+R in
Epiphany caused a crash of WebKitPluginProcess. Unfortunately I
did not get a meaningful stack trace from coredumpctl:

           PID: 14269 (WebKitPluginPro)
           UID: 1000 (aperez)
           GID: 1000 (aperez)
        Signal: 11 (SEGV)
     Timestamp: Thu 2018-05-03 11:46:58 BST (7min ago)
  Command Line: /home/aperez/.prefix/wkgtk-trunk/libexec/webkit2gtk-4.0/WebKitPluginProcess 6 25 /usr/lib/mozilla/plugins/libfreshwrapper-flashplayer.so
    Executable: /home/aperez/.prefix/wkgtk-trunk/libexec/webkit2gtk-4.0/WebKitPluginProcess
 Control Group: /user.slice/user-1000.slice/session-2.scope
          Unit: session-2.scope
         Slice: user-1000.slice
       Session: 2
     Owner UID: 1000 (aperez)
       Boot ID: 4c3478648bc04a65b1f8b43952a69981
    Machine ID: 847be69e434d4e61893d43a1e33c1194
      Hostname: momiji
       Storage: none
       Message: Process 14269 (WebKitPluginPro) of user 1000 dumped core.

                Stack trace of thread 14285:
                #0  0x00007fc9008fbb90 n/a (n/a)
                #1  0x0000000000000001 n/a (n/a)

Right now I don't have the time to make a debug build and try to get
a good stack trace, but the issue is definitely still around.
Comment 7 Adrian Perez 2018-05-03 04:02:15 PDT
(FTR, SiriusXM won't load with the existing NPAPI Flash plugin, that's
why I ended up trying the freshplayerplugin wrapper, and I don't have
accounts for testing the other streaming services mentioned.)
Comment 8 Michael Catanzaro 2019-08-03 08:51:43 PDT
GTK2 plugin process is no longer supported.