Git Product home page Git Product logo

balena-wpe's Introduction

WPE Webkit for the RaspberryPi

This project provides an easy way of running WPE Webkit for the RaspberryPi. WPEWebkit is a full featured browser that takes advantage of the GPU to provide hardware accelerated CSS, WebGL, and HTML5 video.

Showcase

Table of contents

Getting started

  • Sign up on balena
  • Go through the getting started guide and create a new application
  • Clone this repository to your local workspace
  • Add the balena remote to your local workspace using the useful shortcut in the dashboard UI remoteadd
  • git push balena master
  • See the magic happening, your device is getting updated Over-The-Air!

Configuration

A lot of the configuration of this project is about setting up config.txt. The way you do this on balena is by setting some special fleet configuration variables. If you don't know how to do this, you can find more info here.

First, we need to set the GPU memory to something suitable for hardware accelerated graphics. You can set only one of the following if you know how much RAM your Pi has or you can set all of them and your Pi will autoselect based on its memory. If you don't set any of these, WPE won't work.

Key Value
RESIN_HOST_CONFIG_gpu_mem_256 128
RESIN_HOST_CONFIG_gpu_mem_512 196
RESIN_HOST_CONFIG_gpu_mem_1024 396

Displaying on an HDMI screen

WPE will display to the primary framebuffer (HDMI output) by default. If you don't set the resolution, it will be autodetected on boot up. Depending on what you want to do, you might find the performance at FullHD resolution isn't enough. In that case you can force the HDMI to 720p by adding the following fleet configuration variables:

Key Value
RESIN_HOST_CONFIG_hdmi_group 1
RESIN_HOST_CONFIG_hdmi_mode 4

Displaying on a PiTFT 2.8"

PiTFT picture

Displaying to a secondary framebuffer is accomplished by rendering on the primary and continuously copying the resulting image to the secondary. The reason for this is that the Pi can only render hardware accelerated graphics to the primary framebuffer. A side effect of this is that you can't display different content or have different resolutions between the HDMI and your PiTFT screen.

Since the rendering will happen to the primary framebuffer, we need to force the HDMI output to be 320x240, our native resolution. You can do this with the following variables. If don't set those, the Pi will render on a higher resolution and then scale down the image to fit the Pi screen.

Key Value
RESIN_HOST_CONFIG_hdmi_force_hotplug 1
RESIN_HOST_CONFIG_hdmi_group 2
RESIN_HOST_CONFIG_hdmi_mode 87
RESIN_HOST_CONFIG_hdmi_cvt 320 240 60 1 0 0 0

Capacitive touchscreen

Warning: The PiTFT based on the ft6x06_ts kernel module is not currently supported out of the box on balena. If your screen says "FT6206" at the back, it's probably one of those.

Key Value
RESIN_HOST_CONFIG_dtoverlay pitft28-capacitive,rotate=90,speed=62000000,fps=60

Resistive touchscreen

Key Value
RESIN_HOST_CONFIG_dtoverlay pitft28-resistive,rotate=90,speed=62000000,fps=60

Controlling backlight brightness

If you have a Raspberry touchscreen, you can control the backlight brightness by setting the environment variable RPI_BACKLIGHT to a value in the range 0-255. The default value is 255 (maximum brightness).

Sound configuration

WPE will normally try to select an appropriate audio sink to output to. However, if you want to force a specific output to be used you can set the WPE_GSTREAMER_AUDIO_SINK environment variable according to the following table:

Value Notes
autoaudiosink Automatically select output (default)
omxhdmiaudiosink Outputs sound over HDMI
omxanalogaudiosink Outputs to the 3.5mm jack
alsasink Outputs using alsa (EXPERIMENTAL)

Controlling content

Loading a URL

To configure the URL displayed by webkit, set the WPE_URL environment variable. The default value is Youtube TV

Offline content

If you want your device to display content even without internet, you can add your content in the docker image and point WPE to them. Append a similar Dockerfile fragment to your project:

COPY public_html /var/lib/public_html

ENV WPE_URL="file:///var/lib/public_html/index.html"

Changing content at runtime

balena-wpe ships with tohora so which provides a web interface for changing target URLs at runtime on port 8080

Enabling mouse

To enable the mouse cursor you have to set the following environment variable. Keep in mind that there are some known issues with mouse support when the webpage includes iframes.

Key Value
WPE_BCMRPI_CURSOR 1

balena-wpe's People

Contributors

balena-ci avatar chrisys avatar curcuz avatar lurch avatar marhoy avatar petrosagg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

balena-wpe's Issues

How to use /dev/fb0 instead of /dev/vchiq?

Hi,

Really nice work I was happy to try it out.
Now, for personnal constraints, I would like to use this without vchiq.
Is there a way to use /dev/fb0 instead?

Thanks.
Michael

QUOTA_EXCEEDED_ERR

For testing purposes I tried loading a normal YouTube page in WPE, but after playing some videos it stopped working and I'm seeing the following errors in the resin logs:

...
04.01.18 02:30:32 (+0100) WARNING: SourceBuffer::appendBufferInternal(0x65c24000) - buffer full, failing with QUOTA_EXCEEDED_ERR error
04.01.18 02:30:32 (+0100) https://www.youtube.com/yts/jsbin/player-vflQ3Cu6g/en_US/base.js:3146:142: CONSOLE ERROR TypeError: Type error
04.01.18 02:31:08 (+0100) ViewBackend: failed to write to the update eventfd
...

The same happened when I tried loading a page that uses a PouchDB database (WebSQL), throwing:

{"status":500,"name":"web_sql_went_bad","message":"unknown","reason":"The quota has been exceeded."}

Is there a config options to disable this quota or am I doing something wrong?

I checked the SD if there is no storage left, but there is plenty:

bash-4.4# df -h
Filesystem                Size      Used Available Use% Mounted on
none                     13.7G    308.3M     12.7G   2% /
tmpfs                   305.1M         0    305.1M   0% /dev
tmpfs                   305.1M         0    305.1M   0% /sys/fs/cgroup
/dev/mmcblk0p6           13.7G    308.3M     12.7G   2% /data
tmpfs                   305.1M         0    305.1M   0% /tmp/resin
none                    299.0M    221.0M     58.4M  79% /lib/modules
none                    299.0M    221.0M     58.4M  79% /lib/firmware
/dev/mmcblk0p6           13.7G    308.3M     12.7G   2% /etc/resolv.conf
/dev/mmcblk0p6           13.7G    308.3M     12.7G   2% /etc/hostname
/dev/mmcblk0p6           13.7G    308.3M     12.7G   2% /etc/hosts
shm                      64.0M      4.0K     64.0M   0% /dev/shm
tmpfs                   305.1M      8.1M    297.0M   3% /host/run/dbus

Support for debian packages

I'd like to use this resin-wpe together with node.js.
How can this be done currently?

Support for Debian packages could be a neat way to resolve this issue.

Keyboard layout

Hi,

First of all, nice job for this project. I would like to know how can I change the keyboard layout to something else than US qwerty? I tried the loadkeys command and to set the LANG variable but nothing changed.

Thank you

Failed to update application HTTP code 500

I was getting this error message "Failed to update application due to '(HTTP code 500) servererror - invalid character 'c' looking for beginning of value ; oci runtime error: container_linux.go:263: starting container process caused "exec: "/wpe-init": permission denied" while trying to boot up the application. Any idea why this happened? Any help is appreciated. Thank you in advance.

Device: Raspberry pi 3 Model B
Resin OS: 2.10.1+rev1 (prod)

balena Fin

Any way to get this working on the Fin?

I am unable to get a mouse or touch screen via USB to work

Support for 4K on Raspberry 3/4

I tried to get this running in 4K @ 24 frames on a Raspberry pi 3. While the balena logo displayed, the wpe container did produce logs that showed it successfully loaded a page which did not show on the display (the balena logo stayed there).

Has anyone successfully done in it in 4K?

Change URL

Is there a way to change the URL while the browser is running?
(Instead of changing the env var).

Keyboard doesn't work fully

Hello,

It seems that my keyboard does not work completely under WPE:

Only alphanumerical characters [a-zA-Z0-9] seem to work. For instance, I cannot get '@' to show up...

Any clue as to what I might be doing wrong here?

Best regards

Set the Zoom

It would be great if there was an environment variable to set the zoom level

Failed to Boot Pi3

starting application results in the following message:

Starting application 'registry2.resin.io/wpespial/70eeb14b8ff2512a3d2c018c158c34ddc7aa65cd'
15.05.17 10:43:40 (-0400) Started application 'registry2.resin.io/wpespial/70eeb14b8ff2512a3d2c018c158c34ddc7aa65cd'
15.05.17 10:43:41 (-0400) [LibinputServer] Initialization of linux input system succeeded.
15.05.17 10:43:41 (-0400) [LibinputServer] Enabling handle events.
15.05.17 10:43:41 (-0400) * failed to add service - already in use?

No HDMI signal detected.
Tries forcing it - no game.

Loading offline content displays file contents rather that loading HTML

Hi,

I followed the instructions in the readme with regards to loading offline content from the Docker container, adding the following lines to the Dockerfile:

COPY public_html /var/lib/public_html

ENV WPE_URL="file:///var/lib/public_html/index.html"

Plus, adding a public_html/index.html file and committing it to my own fork. I pushed this to my resin master and all looks good - it boots up and loads my file. Only problem is, it displays the file contents rather than rendering the HTML.

I think this could be happening because it's just loading the file from the disk, and there are no headers being sent to the browser - no MIME content type, etc. I'm assuming that the best approach would be to install a web server of some description, but this is where I'm getting totally stumped. I'm new to Docker and Resin, I can't seem to install any type of web server into the Docker container because it doesn't have a package manager or compiler, and if it's possible to add the web server in as a submodule to the git repository, I'm just not sure how to do it!

Any help would be greatly appreciated.

Thanks,

Chris.

Communication with Python script

I want to communicate with an RFID reader connected to Pi by GPIO. I am able to process that values by Python script.

How that Python script can send some event to SPA running in Webkit?

Gazebo Web running on rpi3

I've been trying to get gazebo web rendering in a raspberry pi using your great project. I get the page but no models are rendered. I then went to look at the logs and got these core errors:

06.06.18 19:07:51 (+0100)  main  Cannot create EGL surfaceless context: missing EGL_KHR_surfaceless_{context,opengl} extension.
06.06.18 19:07:51 (+0100)  main  Cannot create EGL WPE context: EGL_SUCCESS
06.06.18 19:08:28 (+0100)  main  http://192.168.1.123:8080/gz3d.gui.js:20307:14: CONSOLE LOG THREE.WebGLRenderer 86
06.06.18 19:08:28 (+0100)  main  http://192.168.1.123:8080/gz3d.gui.js:20122:18: CONSOLE WARN THREE.WebGLRenderer: WEBGL_depth_texture extension not supported.
06.06.18 19:08:28 (+0100)  main  http://192.168.1.123:8080/gz3d.gui.js:20122:18: CONSOLE WARN THREE.WebGLRenderer: OES_texture_float extension not supported.
06.06.18 19:08:28 (+0100)  main  http://192.168.1.123:8080/gz3d.gui.js:20122:18: CONSOLE WARN THREE.WebGLRenderer: OES_texture_float_linear extension not supported.
06.06.18 19:08:28 (+0100)  main  http://192.168.1.123:8080/gz3d.gui.js:20122:18: CONSOLE WARN THREE.WebGLRenderer: OES_texture_half_float extension not supported.
06.06.18 19:08:28 (+0100)  main  http://192.168.1.123:8080/gz3d.gui.js:20122:18: CONSOLE WARN THREE.WebGLRenderer: OES_texture_half_float_linear extension not supported.
06.06.18 19:08:28 (+0100)  main  http://192.168.1.123:8080/gz3d.gui.js:20122:18: CONSOLE WARN THREE.WebGLRenderer: OES_standard_derivatives extension not supported.
06.06.18 19:08:28 (+0100)  main  http://192.168.1.123:8080/gz3d.gui.js:20122:18: CONSOLE WARN THREE.WebGLRenderer: ANGLE_instanced_arrays extension not supported.
06.06.18 19:08:28 (+0100)  main  http://192.168.1.123:8080/gz3d.gui.js:20122:18: CONSOLE WARN THREE.WebGLRenderer: OES_element_index_uint extension not supported.
06.06.18 19:08:28 (+0100)  main  http://192.168.1.123:8080/gz3d.gui.js:19804:16: CONSOLE WARN THREE.WebGLRenderer: highp not supported, using lowp instead.

Any pointers on if these are possible to fix and how? Maybe there are certain flags I can enable to get support for the above mentioned extensions?

Issue playing a h264 HLS stream

Original issue here: balena-labs-projects/balena-dash#3

Update:
I've added an env variable that enables gstreamer logs. The only issue that arises and may be related is this one: GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "fpsdisplaysink"!

Full log:

screenshot 2019-01-08 at 12 18 08

Tohora allows anyone to change the URL

I am working on some info screens for our small flats we rent out. I noticed that you recently added Tohora which allows anyone to change the URL of the WebView to any arbitrary URL without authentication.

Anyone bored teenager could "hack" into the system and display some unwanted pages.

I would recommend to actively opt-in to Tohora. There also isn't a single mention in the readme that this service exists.

http headers

I'd love to be able to define an http header for a bearer token. Is this possible? Something like this which could be defined in a parameter:

curl -H “Authorization: Bearer 12312312-1232-2321-1231-123123123123” https://myapp.com/api/v1/

ViewBackend: failed to write to the update eventfd

Hello,

I get this error often : ViewBackend: failed to write to the update eventfd

I'm using a local express server that serves a react app. Everything work well at the beginning but I get this error after some minutes et sometimes the browser get stuck. (I'm using the HDMI)

Any idea what causes this error ?

clip path not working when animating

I'm trying to create a kaleidoscope effect. I use six divs with clip paths, rotated at various angles. Without any animation, this works fine. When I use webkit animation to rotate content within these divs, the clip paths do not get applied. This works fine with Chrome on my PC, but not on your browser on a Pi under Balena.
I tried just using a jscript requestAnimationFrame to "manually" repeatedly increment the rotation of the content, but this was way too slow and jerky. Any ideas?
testcard
kal_html.txt

'GST_IS_BUFFER (buffer)' failed, three.js with mp4 video

Trying to open this website https://mapper.jku.one on resin-wpe on a RPI 3B+ with:
'wpe https://mapper.jku.one'

WPE crashes with this error:

** (WPEWebProcess:75): CRITICAL **: gst_video_frame_map_id: assertion 'GST_IS_BUFFER (buffer)' failed

** (WPEWebProcess:75): CRITICAL **: gst_video_frame_map_id: assertion 'GST_IS_BUFFER (buffer)' failed
WARNING: WebProcess crashed: restarting it ...

Any idea how to solve this, I guess its something to do with GStreamer Buffer, can I increasae the buffer size somewhere ?

No seems to work, tested in development mode

I tested in development mode and I only have the linux console on my screen. I can reach the 8080 port and set an URL but nothing appear thru the HDMI port.

log:

[Info]    Starting build on device 192.168.1.194
[Info]    Compose file detected
[Build]   [wpe] Step 1/9 : FROM petrosagg/balena-wpe:raspberrypi3-094d55a
[Build]   [wpe]  ---> 8520e0296009
[Build]   [wpe] Step 2/9 : COPY udev-rules/ /etc/udev/rules.d/
[Build]   [wpe]  ---> ee8023e48d1f
[Build]   [wpe] Step 3/9 : COPY wpe-init /wpe-init
[Build]   [wpe]  ---> fa844e637c48
[Build]   [wpe] Step 4/9 : RUN chmod +x /wpe-init
[Build]   [wpe]  ---> Running in 236ac61de4c9
[Build]   [wpe] Removing intermediate container 236ac61de4c9
[Build]   [wpe]  ---> 04565e8e4b9b
[Build]   [wpe] Step 5/9 : CMD [ "/wpe-init" ]
[Build]   [wpe]  ---> Running in 38c7f5423e5c
[Build]   [wpe] Removing intermediate container 38c7f5423e5c
[Build]   [wpe]  ---> e1d83a44aad4
[Build]   [wpe] Step 6/9 : ENV TOHORA_VERSION=0.3.2
[Build]   [wpe]  ---> Running in 2a1f99163b30
[Build]   [wpe] Removing intermediate container 2a1f99163b30
[Build]   [wpe]  ---> c47a64c1d605
[Build]   [wpe] Step 7/9 : RUN wget -O tohora.tgz     "https://github.com/mozz100/tohora/releases/download/v"$TOHORA_VERSION"/tohora_"$TOHORA_VERSION"_Linux_armv5.tar.gz"     && tar xzf tohora.tgz     && rm tohora.tgz
[Build]   [wpe]  ---> Running in 9f304af9eee7
[Build]   [wpe] Connecting to github.com (140.82.113.4:443)
[Build]   
[Build]   [wpe] Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (52.216.162.219:443)
[Build]   
[Build]   [wpe] tohora.tgz             1% |                               | 34347   0:01:11 ETA
[Build]   
[Build]   [wpe] tohora.tgz            97% |****************************** |  2362k  0:00:00 ETA
[Build]   
[Build]   [wpe] tohora.tgz           100% |*******************************|  2419k  0:00:00 ETA
[Build]   
[Build]   [wpe] Removing intermediate container 9f304af9eee7
[Build]   [wpe]  ---> 9a02fe24e122
[Build]   [wpe] Step 8/9 : LABEL io.resin.local.image=1
[Build]   [wpe]  ---> Running in 20ecb55bc23a
[Build]   [wpe] Removing intermediate container 20ecb55bc23a
[Build]   [wpe]  ---> fc54ec9d3654
[Build]   [wpe] Step 9/9 : LABEL io.resin.local.service=wpe
[Build]   [wpe]  ---> Running in 232975d7a7fd
[Build]   [wpe] Removing intermediate container 232975d7a7fd
[Build]   [wpe]  ---> 421c977fde44
[Build]   [wpe] Successfully built 421c977fde44
[Build]   [wpe] Successfully tagged local_image_wpe:latest

[Live]    Waiting for device state to settle...
[Info]    Streaming device logs...
[Live]    Watching for file changes...
[Logs]    [8/22/2019, 1:19:38 PM] Creating network 'default'
[Logs]    [8/22/2019, 1:19:38 PM] Installing service 'wpe sha256:421c977fde446788bebb2f51fab7e1bc3ffb3fe18a9c6cfb8ca89f94df243ce1'
[Logs]    [8/22/2019, 1:19:39 PM] Installed service 'wpe sha256:421c977fde446788bebb2f51fab7e1bc3ffb3fe18a9c6cfb8ca89f94df243ce1'
[Logs]    [8/22/2019, 1:19:39 PM] Starting service 'wpe sha256:421c977fde446788bebb2f51fab7e1bc3ffb3fe18a9c6cfb8ca89f94df243ce1'
[Logs]    [8/22/2019, 1:19:40 PM] Starting service 'wpe sha256:421c977fde446788bebb2f51fab7e1bc3ffb3fe18a9c6cfb8ca89f94df243ce1'
[Logs]    [8/22/2019, 1:19:46 PM] Started service 'wpe sha256:421c977fde446788bebb2f51fab7e1bc3ffb3fe18a9c6cfb8ca89f94df243ce1'
[Logs]    [8/22/2019, 1:19:44 PM] [wpe] 2019/08/22 17:19:44 Command is 'cog'
[Logs]    [8/22/2019, 1:19:44 PM] [wpe] 2019/08/22 17:19:44 Starting listening on port 8080
[Logs]    [8/22/2019, 1:19:45 PM] [wpe] cog: URL not passed in the command line, and COG_URL not set
[Live]    Device state settled

<audio> element not working?

I feel like I've tried everything. Calling play() with button onclick event so there is interaction. Have tried MP3 and OGG. Always gives:

NotSupportedError: The operation is not supported.

Same code plays fine in Safari and Chrome. Seems odd. I do hear sound from the default YouTube TV. Curious if anyone has plain tags working.

using sdtv on rpi

Hi, I was wondering if it is possible to use this browser to display using the composite video out on the rpi zero

Healthcheck is not workig

My project is based balena-wpe, it displays a website served from another service.
I added my webserver to the depends_on property, to ensure the webserver is up and running I utilized healthcheck. Yoiu can find my docker-composer.yml attached below.

version: '2.1'
services:
  Browser:
    restart: always
    build: ./balena-wpe
    privileged: true
    network_mode: host
    environment:
      INITSYSTE: on
      WPE_URL: http://localhost:90
    depends_on:
      - Webserver
    healthcheck:
      test: ["CMD", "wget", "-q", "-O", "/dev/null", "$WPE_URL"]
  Webserver:
    restart: always
    build: ./Webserver
    privileged: true
    network_mode: host

It works when I replace the healthcheck property with:

command: >
      /bin/bash -c "
        while ! wget -O /dev/null $WPE_URL > /dev/null;
        do
          echo 'Waiting for Webserver to be ready...';
          sleep 10;
          exit 1;
        done;
        echo 'Webserver up, starting the Browser now!';
        /wpe-init
      "

I can't see any error in the balena-cloud console.

Unable to build balenaDash per getting started guide

Step 1/7 : FROM petrosagg/resin-wpe:raspberrypi3-30c7465
---> 4b90e1c6a06a
Step 2/7 : COPY udev-rules/ /etc/udev/rules.d/
Using cache
---> 801296c43c60
Step 3/7 : COPY wpe-init /wpe-init
Using cache
---> 56c77d01e232
Step 4/7 : RUN chmod +x wpe-init
---> Running in 12b9f22eaa8c
panic: standard_init_linux.go:175: exec user process caused "no such file or directory" [recovered]
panic: standard_init_linux.go:175: exec user process caused "no such file or directory"

goroutine 1 [running, locked to thread]:
panic(0x79d920, 0xc420136380)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/urfave/cli.HandleAction.func1(0xc420089748)
/tmp/tmp.Xj6E6mk6ve/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:478 +0x247
panic(0x79d920, 0xc420136380)
/usr/local/go/src/runtime/panic.go:458 +0x243
github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization.func1(0xc420089198, 0xc420026098, 0xc420089238)
/tmp/tmp.Xj6E6mk6ve/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:259 +0x18f
github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization(0xc420057450, 0xb98380, 0xc420136380)
/tmp/tmp.Xj6E6mk6ve/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:277 +0x353
main.glob..func8(0xc42008ca00, 0x0, 0x0)
/tmp/tmp.Xj6E6mk6ve/src/github.com/opencontainers/runc/main_unix.go:26 +0x66
reflect.Value.call(0x788960, 0x813a88, 0x13, 0x7e6609, 0x4, 0xc420089708, 0x1, 0x1, 0x4ce1e8, 0x7dc460, ...)

    /usr/local/go/src/reflect/value.go:434 +0x5c8

reflect.Value.Call(0x788960, 0x813a88, 0x13, 0xc420089708, 0x1, 0x1, 0x0, 0xc4200896e8, 0x4d71c6)
/usr/local/go/src/reflect/value.go:302 +0xa4
github.com/urfave/cli.HandleAction(0x788960, 0x813a88, 0xc42008ca00, 0x0, 0x0)
/tmp/tmp.Xj6E6mk6ve/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:487 +0x1e0
github.com/urfave/cli.Command.Run(0x7e67d5, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f7c23, 0x51, 0x0, ...)

    /tmp/tmp.Xj6E6mk6ve/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/command.go:191 +0xc3b

github.com/urfave/cli.(*App).Run(0xc4200d8000, 0xc42000c120, 0x2, 0x2, 0x0, 0x0)

    /tmp/tmp.Xj6E6mk6ve/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:240 +0x611

main.main()

/tmp/tmp.Xj6E6mk6ve/src/github.com/opencontainers/runc/main.go:137 +0xbd6

Removing intermediate container 12b9f22eaa8c
The command '/bin/sh -c chmod +x wpe-init' returned a non-zero code: 2

invalid character 'c' looking for beginning of value '

Hi There,

I was quite excited when I saw this project.

I have just flashed my rasberry pi 3b with Resin OS 2.13.6+rev1.

however as soon as the docker container starts running I am getting the following?

Is there fix for this?

06.08.18 15:11:58 (+0200) Failed to start service 'main sha256:6139867e98af7b8982e8f9ac241cdbcdb74b82bfccfb433dd05bfa9224d38aa1' due to '(HTTP code 500) server error - invalid character 'c' looking for beginning of value '
06.08.18 15:12:28 (+0200) Installing service 'main sha256:6139867e98af7b8982e8f9ac241cdbcdb74b82bfccfb433dd05bfa9224d38aa1'
06.08.18 15:12:28 (+0200) Installed service 'main sha256:6139867e98af7b8982e8f9ac241cdbcdb74b82bfccfb433dd05bfa9224d38aa1'
06.08.18 15:12:28 (+0200) Starting service 'main sha256:6139867e98af7b8982e8f9ac241cdbcdb74b82bfccfb433dd05bfa9224d38aa1'
06.08.18 15:12:29 (+0200) Failed to start service 'main sha256:6139867e98af7b8982e8f9ac241cdbcdb74b82bfccfb433dd05bfa9224d38aa1' due to '(HTTP code 500) server error - invalid character 'c' looking for beginning of value '

Local HTML doesn't show images that are located within directories

Managed to deploy balena-wpe, to a RPi Model B, in local mode with resinOS and not using resin.io.

(I assume there'll be an updated OS version with the recent name change to 'balena' so as soon as I get back to my RPi will update from resinOS).

My problem is that images won't load from the local machine if they're not alongside index.html

..............public-html
..............|
..............--------index.html (rwxrwxrwx root root)
..............|
..............-------- bg.jpg (rwxrwxrwx root root)
..............|
..............--------image-dir (rwxrwxrwx root root)
.............................|
.............................|
............................. ------ x.jpg (rwxrwxrwx root root)
............................. ------y.jpg (rwxrwxrwx root root)

bg.jpg will load fine, but x.jpg and y.jpg do not.

In the dockerfile, I run the same chmod command on "public-html" and "image-dir" and have verified on the host post-deploy by using balena exec local-app ls -la: the permissions and owner are the same on "public-html" and "image-dir".

I used javascript to print the HTML img tag src attribute:

  • for "bg.jpg" it outputs "bg.jpg."
  • for "image-dir/x.jpg" it outputs "file:///var/etc/public-html/image-dir/x.jpg"

Is this translation by webkit-wpe to an absolute path breaking something or am I misconfiguring things?

Any suggestions for solutions or mistakes I may have made would be gladly checked.

(WPEWebProcess:34): GStreamer-CRITICAL **: gst_sample_get_info: assertion 'GST_IS_SAMPLE (sample)' failed

I'm playing a webpage with embedded youtube playlist on loop.

Device: Raspberry Pi 3+

After 6-10 Hours of perfect playing I get these 3 errors then image freeze:

15.10.18 06:27:59 (+0200) main (WPEWebProcess:34): GStreamer-CRITICAL **: gst_sample_get_info: assertion 'GST_IS_SAMPLE (sample)' failed
15.10.18 06:27:59 (+0200) main
15.10.18 06:27:59 (+0200) main (WPEWebProcess:34): GStreamer-CRITICAL **: gst_sample_get_caps: assertion 'GST_IS_SAMPLE (sample)' failed
15.10.18 06:27:59 (+0200) main
15.10.18 06:27:59 (+0200) main (WPEWebProcess:34): GStreamer-CRITICAL **: gst_sample_get_segment: assertion 'GST_IS_SAMPLE (sample)' failed

any hint?

RPI 1/Zero Support

I'm not sure if this is supposed to run on RPI1/Zero or not. I tried, and the app seems stuck in a restart cycle and never displays anything on the screen. WPE itself does support RPI 1/Zero.

Am I doing something wrong, or is there no support? If there is no support currently, would be possible to add support?

Automatic Page Refresh

What would be the easiest way of implementing an automatic page refresh? For instance, every 10 minutes, for pages that don't automatically refresh their own data.

When using docker-compose.yml: Failed to start service due to HTTP code 400 - OCI runtime create failed

Error message from resin.io terminal:

Failed to start service 'wpe sha256:6e6df775f4cd5cfa05b6780d2c2bdc3fc93bd71c4d28515ec17baed26ba83d14' due to '(HTTP code 400) unexpected - OCI runtime create failed: container_linux.go:296: starting container process caused "exec: \"/wpe-init\": permission denied": unknown '

I am admittedly new to docker but this has baffled me for a while. I got the project working after cloning the repo and setting the appropriate gpu_memenvironment variable. The next step for me was to make the WPE browser connect to my frontend, for this I started working with docker-compose.yml. When trying to simply build the project with a docker-compose.yml I keep getting the error above.

Here is my docker-compose.yml

version: '2'
services:
  wpe:
    build: ./wpe
    devices:
      - "/dev/fb0:/dev/fb0"
      - "/dev/vchiq:/dev/vchiq"
    privileged: true

and the directory structure is:

.
|-docker-compose.yml
|-.gitmodules
|-LICENSE
|-README.md
|-/wpe
|---Dockerfile
|---wpe-init
|---/udev-rules
|---/base-image
|-----/meta-openembedded
|-----/meta-raspberrypi
|-----/meta-resin-wpe
|-------/conf
|---------/samples
|-------/recipes-core
|---------/images
|-------/recipes-graphics
|---------/fbcp
|-----------/files
|-------/recipes-wpe
|---------/wpewebkit
|-----------/files
|-----/meta-wpe
|-----/poky

I also changed the .gitmodules pathvariables to point to the new path.

Any pointers as to what I'm doing wrong here? As mentioned, it works perfectly when not using docker-compose.yml

Hide mouse pointer/cursor?

Is there any way to hide the mouse pointer/cursor for touchscreens? I've tried via CSS but it doesn't seem to have any affect.

Should Touch on a 7-Inch Official Pi Display Work?

I'm attempting to get this up and running, but touch doesn't seem to respond (no clicks or scrolls).

I've allocated 396MB of GPU RAM, and set the following config variables:

BALENA_HOST_CONFIG_dtoverlay=rpi-ft5406
BALENA_HOST_CONFIG_lcd_rotate=2

I've attempted just using the ribbon cable and power cables and also the additional two cables (although as I understand it these shouldnt be necessary on a Pi 3B)

How do I exit the browser?

I've tried a number of key combinations, but I'm still stuck with YouTube TV on my pi.

Am I missing something or is this not documented?

1080p Content with stable framerate possible?

I would be interested in any success playing 1080p content via WPE. I tried OMX Player with great success (perfect framerate on Pi3, 50 fps content works). So the hardware works fine but with WPE I only get stable framerate with 720p. Higher resolution leads to framedrops. Is it a general problem with Webkit on Raspberry/Balena or is there any chance to get 1080p HTML5 content stable in future?

Thanks for the effort and best regards

Daniel

Used to work on resinos 2.3

I'm using resinos.
Launching my container with:

docker run -dit --name test --device /dev/vchiq vincentserpoul/resin-wpe

I have updated to resinos 2.12 and now using balena.

balena run -dit --name test --device /dev/vchiq vincentserpoul/resin-wpe

What was working in the past (it was launching the browser on the hdmi screen) now is telling me:

  • failed to add service - already in use?
    WARNING: WebProcess crashed: restarting it ...

The only change was the update to the new resinos.

Change timezone

I'm using balena-dash and wpe to show a dashboard that also shows the current time on the webbrowser client.

Inside the wpe-container, I need to change the timezone, but there's no zoneinfo-files under /usr/share/, so setting the TZ-variable has no effect.

How do I install the zoneinfo-files and change the timezone?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.