Igalia / cog

WPE launcher and webapp container
MIT License
235 stars 61 forks source link

WEBKIT_INSPECTOR_SERVER - Unable to access #292

Open Escalion opened 3 years ago

Escalion commented 3 years ago

We have built an image based on poky dunfell with wayland, weston & cog on 64 bit raspberry pi 4.

DISTRO_FEATURES_append = " wayland"
PREFERRED_PROVIDER_virtual/wpebackend = "wpebackend-fdo"
PACKAGECONFIG_append_pn-cairo = " glesv2"
PACKAGECONFIG_remove_pn-cairo = "opengl"
PACKAGECONFIG_append_pn-wpewebkit = " 2dcanvas remote-inspector"
IMAGE_INSTALL_append += " weston wayland wpebackend-fdo wpewebkit cog wpewebkit-web-inspector-plugin"

I am launching cog as follows;

export XDG_RUNTIME_DIR=/run/user/0
export WAYLAND_DISPLAY=wayland-0
export COG_PLATFORM_FDO_VIEW_WIDTH=1920
export COG_PLATFORM_FDO_VIEW_HEIGHT=1200
export COG_PLATFORM_FDO_VIEW_FULLSCREEN=1
export WEBKIT_INSPECTOR_SERVER=0.0.0.0:9222
cog -P fdo http://example.com

Which, loads the URL and when checking with netstat, we can see that we are listening on port 9222. Despite this, I am unable to access the inspector at all. Have I missed something here - any advice would be greatly appreciated.

philn commented 3 years ago

The remote inspector can then be opened from the GNOME Browser using the inspector:// URL, iirc.

Escalion commented 3 years ago

Hi philn - thanks, we did try that, but was unable to access the target.

aperezdc commented 3 years ago

@Escalion You also need to pass the --enable-developer-extras=1 command line option to cog. This should work:

WEBKIT_INSPECTOR_SERVER=0.0.0.0:9222 cog -P fdo --enable-developer-extras=1 wpewebkit.org