GNOME Bugzilla – Bug 777702
flatpak: Youtube is broken when running epiphany from a flatpak bundle
Last modified: 2017-05-03 20:11:41 UTC
Created attachment 344171 [details] Broken youtube in Epiphany flatpak [Disclaimer: I realize this might not be the perfect place to report this issue, but as there's no place so far to report problems with how flatpaks are built, and considering that in the long run ideally every app should "own" how flatpaks are built (i.e. maintaining their own JSON files) I thought this might be the least bad option] Flatpak'ed GNOME Web (Epiphany) [1] renders youtube.com in a broken way when running from the GNOME Stable flatpak repository [1] (currently against the 3.22 runtime), showing what it seems to be a completely empty "content" area in the website, when navigating from the front page (www.youtube.com). See how it looks on the picture attached Note that if you go straight to a video, the video plays fine, but just get a white page when navigate to youtube.com. [1] https://git.gnome.org/browse/gnome-apps-nightly/tree/org.gnome.Epiphany.json [2] http://flatpak.org/runtimes.html
What's interesting here is that the entire webpage asides from the header is broken, so it's not some GStreamer issue.
While searching for this issue I stumbled upon this bug report. I would like to add that I too notice a white Youtube screen. * On both Ubuntu Gnome 17.04 (web 3.24.1 with webkitgtk+ 2.16.1, i386) and Fedora 25 (Web 3.22.7 with webkit 2.16.1, x64) * As far as I am aware I did not install the software using flatpack but used apt-get and dnf. * The issue only shows after I log into Youtube. On both computers Youtube displays fine using another computer account where I haven't logged in into Youtube. * And indeed, video plays fine, it's just that the site shows only a white page, with a subtle horizontal gray line about 3 cm from the top.
OK, if you can reproduce it without Flatpak using distro packages, then this becomes higher-priority. First question to answer before I tell you how to move this to WebKit Bugzilla: does it work properly if you run epiphany with WEBKIT_DISABLE_COMPOSITING_MODE=1? It's really strange that you can reproduce the issue on multiple distros whereas most users cannot, and since YouTube generally triggers hardware-accelerated rendering I'm guessing this could be a graphics driver problem. If the problem still occurs with that environment variable, we can rule that out.
Ok, long story short: It seems to be something in the Youtube setting of my account. As it only shows after logged in into Youtube I created another Youtube account to see if the issue is reproducible with that. It isn't. Logging in with my own (original) account does still give me a blank screen. Logging in with my (new) test-account does give me a working Youtube. If I figure out what (setting?) it is I will let you know. Some first look of trail and error hasn't yielded any results. PS, I did try the test you suggested, but I still got an empty Youtube screen: 1. Start a (Gnome) terminal. 2. Entered export=WEBKIT_DISABLE_COMPOSITING_MODE=1 3. Checked with "env" if the variable was really set (it was). 4. From that terminal ran "epiphany" and visited http://www.youtube.com
OK. Time to move this to WebKit Bugzilla, then. If you can figure out what aspect of your YouTube account triggers this problem, that would be extremely helpful. Also check to make sure it's not a problem that can be solved by clearing cookies locally. Test your normal YouTube account in Incognito Mode: does it work there? Thanks for taking the time to report this. This issue is most likely a bug in WebKit. Please report the bug to https://bugs.webkit.org/ including a link to this bug report and noting the version of WebKitGTK+ that you have installed. When reporting the WebKit bug, be sure to include the prefix '[GTK]' in the bug summary and select the 'WebKit Gtk' component.
Well we discovered what's wrong here: foser: does the new youtube design work for you guys in epiphany? mcatanzaro: foser: YouTube works fine for me. I don't see any new design. foser: mcatanzaro: youtube.com/new mcatanzaro: No it doesn't work at all mcatanzaro: Bingo, you just solved https://bugzilla.gnome.org/show_bug.cgi?id=777702 bugbot: Bug 777702: General, normal, epiphany-maint, RESOLVED NOTGNOME, flatpak: Youtube is broken when running epiphany from a flatpak bundle foser: that was quick ;) mcatanzaro: Well you didn't solve it, but now we know how to reproduce that problem at least We still need to move this report to WebKit Bugzilla. Roelof, since it would be helpful to have you there, can you do that please?
It looks like it's attempting use to use the v0 custom elements API. That is a YouTube bug. WebKit only supports the v1 API. My guess is that is to blame for nothing working, but I can't be sure: it might be a red herring. At least that's going to stop a bunch of YouTube's JavaScript from working.
Workaround: clear cookies
Hello Michael. I am more then willing to copy this to webkit bugzilla. But should this problem not show on more browsers in that case (like Safari)? I cannot reproduce this on Midori as youtube.com/new there says I am using an unsupported browser.
(In reply to Roelof Pieter from comment #9) > Hello Michael. I am more then willing to copy this to webkit bugzilla. But > should this problem not show on more browsers in that case (like Safari)? If you have access to macOS, then it would be great if you could test on the latest Safari Tech Preview and see if it's broken there too. That would help us determine if this is a platform-specific bug or if it affects all WebKit ports. Please move this to WebKit Bugzilla at any case. > I > cannot reproduce this on Midori as youtube.com/new there says I am using an > unsupported browser. Probably your Midori is compiled against WebKitGTK+ 2.4, which is insecure. Don't use that.
Actually no need to report this on WebKit Bugzilla. I found the problem, it's the Chromium user agent we send to get YouTube 360 to work. That causes new YouTube to try using the unsupported obsolete custom elements API.
Ok, thanks for figuring it out. Should I be able to set the user-agent with something through dconf as a workaround? Tried that, but still a white screen. But I don't know if I have to enter a "valid" string there.
Good try, but that won't work for YouTube because we have a user agent quirk in WebKit that overrides Epiphany's user agent setting. There is a WebKit setting that can be used to turn off quirks, but Epiphany doesn't expose it. I should add it.
(In reply to Michael Catanzaro from comment #13) > I should add it. I should add it as a hidden setting, for testing purposes only. If you had it available then you'd at least be able to check that YouTube works with a new user agent without having to recompile WebKit to change the user agent. You *can* test in MiniBrowser, which will be in your distro's WebKit development package (e.g. webkitgtk4-devel on Fedora) and is installed under /usr/libexec/webkit2gtk-4.0 (except I think Debian changes the location). You'll need to use the flag --enable-site-specific-quirks=false. That should serve as a workaround until we can release a new version of WebKit with the problematic quirk removed.