elcritch / nerves_rpi4_webkiosk_playground

Kiosk Test
0 stars 2 forks source link

White screen on boot #1

Open rogerjames99 opened 2 years ago

rogerjames99 commented 2 years ago

Jaremy,

When I build from my fork I get a white screen on boot. I have made a small change mix .exs to pull webengine_kiosk from your github repo rather than the local filesystem.

diff --git a/mix.exs b/mix.exs
index d6edea7..0cea066 100644
--- a/mix.exs
+++ b/mix.exs
@@ -40,8 +40,8 @@ defmodule NervesWebKioskPlayground.MixProject do
       {:nerves_runtime, "~> 0.11.3", targets: @all_targets},
       {:nerves_pack, "~> 0.4.0", targets: @all_targets},

-      {:webengine_kiosk, "~> 0.4.0", path: "../webengine_kiosk"},
-      # {:webengine_kiosk, "~> 0.4.0", github: "elcritch/webengine_kiosk", branch: "devel"},
+      # {:webengine_kiosk, "~> 0.4.0", path: "../webengine_kiosk", app: false},
+      {:webengine_kiosk, "~> 0.4.0", github: "elcritch/webengine_kiosk"},

       # Dependencies for specific targets
       # {:nerves_system_rpi4, "~> 1.13", runtime: false, targets: :rpi4},

I get the following messages in Ringlogger

00:00:06.464 [warn]  webengine_kiosk(stderr): SET VIEW:  QQuickWebEngineView_QML_37(0x26d5d1e0, name="web", parent=0x26d5cf50, geometry=0,0 1680x1050)  with:  QQuickWebEngineView_QML_37(0x26d5d1e0, name="web", parent=0x26d5cf50, geometry=0,0 1680x1050) 
00:00:06.465 [warn]  webengine_kiosk(stderr): 
00:00:06.465 [warn]  webengine_kiosk(stderr): QMetaObject::invokeMethod: No such method QQuickWebEngineView_QML_37::backgroundColor(QColor)
00:00:06.465 [warn]  webengine_kiosk(stderr): QObject::connect: Parentheses expected, signal QQuickWebEngineView_QML_37::loadingChanged
00:00:06.465 [warn]  webengine_kiosk(stderr): QObject::connect:  (sender name:   'web')
00:00:06.465 [warn]  webengine_kiosk(stderr): SET FROM web:  QQuickWebEngineView_QML_37(0x26d5d1e0, name="web", parent=0x26d5cf50, geometry=0,0 1680x1050) 
00:00:06.465 [warn]  webengine_kiosk(stderr): 

It looks like something is wrong in my QT environment. The following is the gory details of the qt5 installation on my build system.

roger@dragon:~/nerves/nerves_rpi4_webkiosk_playground$ dpkg -l|grep " qt5-"
ii  qt5-assistant                                               5.15.2-5                                        amd64        Qt 5 Assistant
ii  qt5-gtk-platformtheme:i386                                  5.15.2+dfsg-12                                  i386         Qt 5 GTK+ 3 platform theme
ii  qt5-image-formats-plugins:amd64                             5.15.2-2                                        amd64        Qt 5 Image Formats module
ii  qt5-qmake:amd64                                             5.15.2+dfsg-12                                  amd64        Qt 5 qmake Makefile generator tool
ii  qt5-qmake-bin                                               5.15.2+dfsg-12                                  amd64        Qt 5 qmake Makefile generator tool — binary file
ii  qt5-qmltooling-plugins:amd64                                5.15.2+dfsg-8                                   amd64        Qt 5 qmltooling plugins
roger@dragon:~/nerves/nerves_rpi4_webkiosk_playground$ dpkg -l|grep libqt5
ii  libqt53danimation5:amd64                                    5.15.2+dfsg-2                                   amd64        Qt 3D animation module
ii  libqt53dcore5:amd64                                         5.15.2+dfsg-2                                   amd64        Qt 3D module
ii  libqt53dextras5:amd64                                       5.15.2+dfsg-2                                   amd64        Qt 3D extras
ii  libqt53dinput5:amd64                                        5.15.2+dfsg-2                                   amd64        Qt 3D Input module
ii  libqt53dlogic5:amd64                                        5.15.2+dfsg-2                                   amd64        Qt 3D logic module
ii  libqt53dquick5:amd64                                        5.15.2+dfsg-2                                   amd64        Qt 3D Quick module
ii  libqt53dquickanimation5:amd64                               5.15.2+dfsg-2                                   amd64        Qt 3D Quick animation module
ii  libqt53dquickextras5:amd64                                  5.15.2+dfsg-2                                   amd64        Qt 3D Quick extras
ii  libqt53dquickinput5:amd64                                   5.15.2+dfsg-2                                   amd64        Qt 3D Quick input
ii  libqt53dquickrender5:amd64                                  5.15.2+dfsg-2                                   amd64        Qt 3D Quick Renderer module
ii  libqt53dquickscene2d5:amd64                                 5.15.2+dfsg-2                                   amd64        Qt 3D Quick scene module
ii  libqt53drender5:amd64                                       5.15.2+dfsg-2                                   amd64        Qt 3D Renderer module
ii  libqt5bluetooth5:amd64                                      5.15.2-2                                        amd64        Qt Connectivity Bluetooth module
ii  libqt5bluetooth5-bin                                        5.15.2-2                                        amd64        Qt Connectivity Bluetooth module helper binaries
ii  libqt5concurrent5:amd64                                     5.15.2+dfsg-12                                  amd64        Qt 5 concurrent module
ii  libqt5core5a:amd64                                          5.15.2+dfsg-12                                  amd64        Qt 5 core module
ii  libqt5core5a:i386                                           5.15.2+dfsg-12                                  i386         Qt 5 core module
ii  libqt5dbus5:amd64                                           5.15.2+dfsg-12                                  amd64        Qt 5 D-Bus module
ii  libqt5dbus5:i386                                            5.15.2+dfsg-12                                  i386         Qt 5 D-Bus module
ii  libqt5designer5:amd64                                       5.15.2-5                                        amd64        Qt 5 designer module
ii  libqt5designercomponents5:amd64                             5.15.2-5                                        amd64        Qt 5 Designer components module
ii  libqt5gui5:amd64                                            5.15.2+dfsg-12                                  amd64        Qt 5 GUI module
ii  libqt5gui5:i386                                             5.15.2+dfsg-12                                  i386         Qt 5 GUI module
ii  libqt5help5:amd64                                           5.15.2-5                                        amd64        Qt 5 help module
ii  libqt5hunspellinputmethod5:amd64                            5.15.2+dfsg-2                                   amd64        Qt virtual keyboard - helper library for Hunspell input method
rc  libqt5keychain0:amd64                                       0.5.0-1build1~gcc5.1                            amd64        Qt API to store passwords (QT5 version)
ii  libqt5keychain1:amd64                                       0.10.0-1build1                                  amd64        Qt API to store passwords (QT5 version)
ii  libqt5location5:amd64                                       5.15.2+dfsg-2                                   amd64        Qt Location module
ii  libqt5location5-plugin-mapboxgl:amd64                       5.15.2+dfsg-2                                   amd64        Qt Location module - Mapbox GL plugin
ii  libqt5location5-plugins:amd64                               5.15.2+dfsg-2                                   amd64        Qt Location module - geolocation plugins
ii  libqt5multimedia5:amd64                                     5.15.2-3                                        amd64        Qt 5 Multimedia module
ii  libqt5multimedia5-plugins:amd64                             5.15.2-3                                        amd64        Qt 5 Multimedia module plugins
ii  libqt5multimediagsttools5:amd64                             5.15.2-3                                        amd64        GStreamer tools for  Qt 5 Multimedia moduleii  libqt5multimediaquick5:amd64                                5.15.2-3                                        amd64        Qt 5 Multimedia Quick module
ii  libqt5multimediawidgets5:amd64                              5.15.2-3                                        amd64        Qt 5 Multimedia Widgets module
ii  libqt5network5:amd64                                        5.15.2+dfsg-12                                  amd64        Qt 5 network module
ii  libqt5network5:i386                                         5.15.2+dfsg-12                                  i386         Qt 5 network module
ii  libqt5opengl5:amd64                                         5.15.2+dfsg-12                                  amd64        Qt 5 OpenGL module
ii  libqt5opengl5-dev:amd64                                     5.15.2+dfsg-12                                  amd64        Qt 5 OpenGL library development files
ii  libqt5positioning5:amd64                                    5.15.2+dfsg-2                                   amd64        Qt Positioning module
ii  libqt5positioning5-plugins:amd64                            5.15.2+dfsg-2                                   amd64        Qt Positioning module - position plugins
ii  libqt5positioningquick5:amd64                               5.15.2+dfsg-2                                   amd64        Qt Positioning module - Qt Quick module
ii  libqt5printsupport5:amd64                                   5.15.2+dfsg-12                                  amd64        Qt 5 print support module
ii  libqt5qml5:amd64                                            5.15.2+dfsg-8                                   amd64        Qt 5 QML module
ii  libqt5qmlmodels5:amd64                                      5.15.2+dfsg-8                                   amd64        Qt 5 QML Models library
ii  libqt5qmlworkerscript5:amd64                                5.15.2+dfsg-8                                   amd64        Qt 5 QML Worker Script library
ii  libqt5quick5:amd64                                          5.15.2+dfsg-8                                   amd64        Qt 5 Quick library
ii  libqt5quickcontrols2-5:amd64                                5.15.2+dfsg-3                                   amd64        Qt 5 Quick Controls 2 library
ii  libqt5quickparticles5:amd64                                 5.15.2+dfsg-8                                   amd64        Qt 5 Quick particles module
ii  libqt5quickshapes5:amd64                                    5.15.2+dfsg-8                                   amd64        Qt 5 Quick Shapes module
ii  libqt5quicktemplates2-5:amd64                               5.15.2+dfsg-3                                   amd64        Qt 5 Quick Templates 2 library
ii  libqt5quicktest5:amd64                                      5.15.2+dfsg-8                                   amd64        Qt 5 Quick Test library
ii  libqt5quickwidgets5:amd64                                   5.15.2+dfsg-8                                   amd64        Qt 5 Quick Widgets library
ii  libqt5script5:amd64                                         5.15.2+dfsg-2                                   amd64        Qt 5 script module
ii  libqt5scripttools5:amd64                                    5.15.2+dfsg-2                                   amd64        Qt 5 script tools module
ii  libqt5sensors5:amd64                                        5.15.2-2                                        amd64        Qt Sensors module
ii  libqt5sensors5-dev:amd64                                    5.15.2-2                                        amd64        Qt 5 Sensors development files
ii  libqt5serialport5:amd64                                     5.15.2-2                                        amd64        Qt 5 serial port support
ii  libqt5sql5:amd64                                            5.15.2+dfsg-12                                  amd64        Qt 5 SQL module
ii  libqt5sql5-sqlite:amd64                                     5.15.2+dfsg-12                                  amd64        Qt 5 SQLite 3 database driver
ii  libqt5svg5:amd64                                            5.15.2-3                                        amd64        Qt 5 SVG module
ii  libqt5svg5:i386                                             5.15.2-3                                        i386         Qt 5 SVG module
ii  libqt5svg5-dev:amd64                                        5.15.2-3                                        amd64        Qt 5 SVG module development files
ii  libqt5test5:amd64                                           5.15.2+dfsg-12                                  amd64        Qt 5 test module
ii  libqt5texttospeech5:amd64                                   5.15.2-2                                        amd64        Speech library for Qt - libraries
ii  libqt5virtualkeyboard5:amd64                                5.15.2+dfsg-2                                   amd64        Qt virtual keyboard - public shared libraryii  libqt5virtualkeyboard5-dev:amd64                            5.15.2+dfsg-2                                   amd64        Qt virtual keyboard - development files
ii  libqt5waylandclient5:amd64                                  5.15.2-4                                        amd64        QtWayland client library
ii  libqt5waylandcompositor5:amd64                              5.15.2-4                                        amd64        QtWayland compositor library
ii  libqt5webchannel5:amd64                                     5.15.2-2                                        amd64        Web communication library for Qt
ii  libqt5webchannel5-dev:amd64                                 5.15.2-2                                        amd64        Web communication library for Qt - development files
ii  libqt5webengine-data                                        5.15.6+dfsg-1                                   all          Web content engine library for Qt - Data
ii  libqt5webengine5:amd64                                      5.15.6+dfsg-1                                   amd64        Web content engine library for Qt
ii  libqt5webenginecore5:amd64                                  5.15.6+dfsg-1                                   amd64        Web content engine library for Qt - Core
ii  libqt5webenginewidgets5:amd64                               5.15.6+dfsg-1                                   amd64        Web content engine library for Qt - Widget
ii  libqt5webkit5:amd64                                         5.212.0~alpha4-12                               amd64        Web content engine library for Qt
ii  libqt5webkit5-dev:amd64                                     5.212.0~alpha4-12                               amd64        Web content engine library for Qt - development files
ii  libqt5websockets5:amd64                                     5.15.2-2                                        amd64        Qt 5 Web Sockets module
ii  libqt5websockets5-dev:amd64                                 5.15.2-2                                        amd64        Qt 5 Web Sockets module - development filesii  libqt5widgets5:amd64                                        5.15.2+dfsg-12                                  amd64        Qt 5 widgets module
ii  libqt5widgets5:i386                                         5.15.2+dfsg-12                                  i386         Qt 5 widgets module
ii  libqt5x11extras5:amd64                                      5.15.2-2                                        amd64        Qt 5 X11 extras
ii  libqt5x11extras5-dev:amd64                                  5.15.2-2                                        amd64        Qt 5 X11 extras development files
ii  libqt5xml5:amd64                                            5.15.2+dfsg-12                                  amd64        Qt 5 XML module
ii  libqt5xmlpatterns5:amd64                                    5.15.2-3                                        amd64        Qt 5 XML patterns module
ii  libqt5xmlpatterns5-dev:amd64                                5.15.2-3                                        amd64        Qt 5 XML patterns development files

Am I correct in my assumption the my host system qt5 installation is been used to provide templates for the qmake cross compilation process being run on the host when the firmware is built?

Any ideas?

Roger

rogerjames99 commented 2 years ago

I am now totally confused about the cross compilation environment. From going through the verbose logs from mix firmware I can see things are being cross compiled using a sysroot hidden below the .nerves directory in my home directory. So the qt5 stuff on my system should be irrelevant. Is this something to do with erlang and rebar? Do they do some magic to mimic the hosts build environment in the targets sysroot?

elcritch commented 2 years ago

I am now totally confused about the cross compilation environment. From going through the verbose logs from mix firmware I can see the logs are being cross compiled using a sysroot hidden below the .nerves directory in my home directory. So the qt5 stuff on my system should be irrelevant. Is this something to do erlang and rebar? Do they do dome magic to mimic the hosts build environment in the targets sysroot?

That's the Nerves cross compilation build setup. It downloads and sets up a Buildroot build environment under the covers. That part is mostly ok looking.

Your logs look alright as well (I never figured out how to set the background color on the new QML setup).

The white screen means it's actually starting QT web engine, but it's not loading a website. You'd need to add networking to your Nerves image and then call the "goto url" function in web_kiosk.

rogerjames99 commented 2 years ago

I really need to get some new glasses! I think you guessed what I was saying. It should have said.

I can see from the logs that things are being cross compiled...

Is there a video of your session at NervesCon available anywhere?

Is this stuff documented anywhere? All I can find is a few lines in the getting started document under "Compiling non BEAM code".

I was expecting to see the index.html from the priv resources loaded by default 😞 .