Bug 253793 - [GTK] GTK4 doesn't render GitHub, stuck on clipboard error
Summary: [GTK] GTK4 doesn't render GitHub, stuck on clipboard error
Status: RESOLVED DUPLICATE of bug 211979
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-12 07:05 PDT by Georges Basile Stavracas Neto
Modified: 2023-03-13 04:37 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Georges Basile Stavracas Neto 2023-03-12 07:05:56 PDT
Epiphany 44.rc-21-gc7d32ff37+ (GNOME Nightly Flatpak)
WebKitGTK 2.39.91
GStreamer 1.20.5


GitHub doesn't render. I can still interact with (invisible) elements in the page, but the page is simply empty. Opening the inspector makes the page render in a broken state, and shows me that GitHub is spamming with clipboard-related errors like this:

[Error] Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'navigator.clipboard.read')
	K (vendors-node_modules_stacktrace-parser_dist_stack-trace-parser_esm_js-node_modules_github_bro-327bbf-0aaeb22dd2a5.js:1:8117)
	every
	(anonymous function) (environment-7dd847af758e.js:1:5328)
	y (environment-7dd847af758e.js:1:5532)
	h (environment-7dd847af758e.js:1:5291)
	(anonymous function) (environment-7dd847af758e.js:1:4196)

This happens with the MiniBrowser too.
Comment 1 Michael Catanzaro 2023-03-12 08:44:52 PDT

*** This bug has been marked as a duplicate of bug 211979 ***
Comment 2 Adrian Perez 2023-03-13 01:12:48 PDT
For the people arriving here searching, it is possible to workaround
things a bit to make GitHub at least usable. Place this line added in
the ~/.local/share/epiphany/user-javascript.js file and enable the
user JavaScript in GNOME Web's preferences:

   navigator.clipboard = {};

The above prevents the console log continuous spam, which was taking
so much time that WebKit didn't have the chance to show the rendered
pages.
Comment 3 Georges Basile Stavracas Neto 2023-03-13 04:37:33 PDT
Thanks Adrian. Can confirm it works. To anyone reading it: don't forget to enable user JavaScript in GNOME Web's preferences dialog after creating user-javascript.js!