Igalia / buildroot-wpe

A Buildroot overlay for building WPE WebKit
19 stars 12 forks source link

Minibrowser not work #7

Open dginu85 opened 6 years ago

dginu85 commented 6 years ago

How test it?

./MiniBrowser

(MiniBrowser:241): WARNING : 18:14:21.612: Failed to create WPE view backend

munezbn commented 5 years ago

Can you please tell me which configuration u used ?

dginu85 commented 5 years ago

raspberrypi3_wpe_defconfig

aperezdc commented 5 years ago

@munezbn Are you willing to look at this? That would be most helpful, if you have time.

munezbn commented 5 years ago

@aperezdc I will look into this configuration. @dginu85 meanhwile can you try with raspberrypi3_wpe_rdk_defconfig with rpi userland rdk backend ?

dginu85 commented 5 years ago

Yes, i don't find minibrowser... Anyway please write sample c++ code for create simple webview thank's

munezbn commented 5 years ago

@dginu85 what do you mean by you dont find minibrowser ? search in usr/libexec/wpe- dir

dginu85 commented 5 years ago

I try to find / -name Minibrowser

munezbn commented 5 years ago

@dginu85 I can find / -iname minibrowser /usr/libexec/wpe-webkit-0.1/MiniBrowser . I was able to launch also. Can you check if MiniBrowser is enabled in menuconfig.

@aperezdc I tried raspberrypi3_wpe_defconfig backend and faced same issue. I was getting an error saying XDG_RUNTIME_DIR not set. Even After setting it to some dir I got same error. Then I realized that there is no compositor installed so i enabled Weston/Fbdev but i was not able to launch weston..

I was wondering if anyone has tried FDO backend with wayland before ? And which compositor was used ?

dginu85 commented 5 years ago

Sorry this not work..

munezbn commented 5 years ago

@dginu85 can you please

  1. share your buildroot .config file
  2. find build/wpewebkit-2.22.2/ -iname MiniBrowser ( in your build directory)
medemi68 commented 5 years ago

I can confirm that this issue exists, I am unable to launch the MiniBrowser, or Cog for that matter. Minibrowser reports "Failed to create WPE Backend"

With Cog, I get the following: (cog:648): CRITICAL : 13:58:32.043: WebKitWebViewBackend webkit_web_view_backend_new(wpe_view_backend, GDestroyNotify, gpointer): assertion 'backend' failed

(cog:648): Cog-ERROR **: 13:58:32.044: Could not instantiate any WPE backend.

medemi68 commented 5 years ago

For the record, I am able to run Weston just fine using: $ weston --backend=fbdev-backend.so --tty=1 --device=/dev/fb0

When I try to launch MiniBrowser from within a Weston Terminal, I get "segmentation fault".

aperezdc commented 5 years ago

@medemi68 To run Cog under a Wayland compositor (like Weston) you need to the --platform=fdo command line flag, for example:

$ cog --platform=fdo https://ddg.gg

Please make sure that you are passing it, and let us know whether it works for you.

medemi68 commented 5 years ago

Hi,

Despite using that, I still get the same segmentation fault issue. Here is what I get:

$ cog --platform=fdo https://google.ca
Wayland: Got a wl_compositor interface
Wayland: Got a wl_seat interface
Wayland: Got an xdg_shell interface
Wayland: Got a wl_shell interface
xkbcommon: ERROR: couldn't find a Compose file for locale "C"
Segmentation fault
medemi68 commented 5 years ago

Running cog without weston gives me the following error:

(cog:235): Cog-WARNING **: 00:44:11.712: Platform setup failed: Could not open Wayland display

** (cog:235): CRITICAL **: 00:44:11.713: WebKitWebViewBackend* webkit_web_view_backend_new(wpe_view_backend*, GDestroyNotify, gpointer): assertion 'backend' failed

(cog:235): Cog-ERROR **: 00:44:11.713: Could not instantiate any WPE backend.
Trace/breakpoint trap
aperezdc commented 5 years ago

@medemi68 The FDO backend will not work without a Wayland compositor. When you tried to run with Weston, did the shell where you ran Cog have the WAYLAND_DISPLAY environment variable defined? A stack trace from the core dump generated when the segmentation fault happens would be useful.

munezbn commented 5 years ago

After using wpebackend-rdk , I decided to move to wpebackend-fdo. I have built weston, cog, wpebackend-fdo. But I am also facing same issue.

export WAYLAND_DIPLSAY=wpe export XDG_RUNTIME_DIR=/tmp weston --backend=fbdev-backend.so --tty=1 --device=/dev/fb0 &

Then tried both /usr/libexec/wpe-webkit-1.0/MiniBrowser https://www.google.com and cog --platform=fdo https://www.google.com

Not sure if this issue is only in the buildroot overlay or in upstream buildroot ( Have not tried yet)

@aperezdc How are you launching compositor and browser ? Is it working fine for you ?

gearhead commented 3 years ago

Same here.

I launch weston, withe fbdev backend: backend=/usr/lib/libweston-9/fbdev-backend.so then set my environment:

$ export WAYLAND_DISPLAY=wayland-0
$ export XDG_RUNTIME_DIR=/run/weston
$ export XDG_SESSION_TYPE=wayland
$ export GDK_BACKEND=wayland

then try to launch MiniBrowser and get nothing useful on the graphics screen and this error on the cli:

$ /usr/lib/wpe-webkit-1.0/MiniBrowser

** (MiniBrowser:127436): WARNING **: 09:09:33.548: WindowViewBackend: cannot yet handle wpe_fdo_shm_exported_buffer.

I can launch luakit in weston with this setup, but not MiniBrowser.

philn commented 3 years ago

That warning highlights a WebKit MiniBrowser bug. MiniBrowser is not able to handle SHM buffers yet...

harishvk1977 commented 3 years ago

Philn,

Whats the alternate approach to start WPE browser on ubuntu?.

i am also getting this following warning message

(MiniBrowser:127436): WARNING : 09:09:33.548: WindowViewBackend: cannot yet handle wpe_fdo_shm_exported_buffer.

philn commented 3 years ago

Cog :)