I am trying to add a webview to a ubports app based off the clickable ut-app-cmake-template
. This gave me a simple hello world app.
I added a webview into my layout:
WebView {
id: webView
url: "https://www.google.com"
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
top: loginPage.header.bottom
}
incognito: true
preferences.localStorageEnabled: true
preferences.allowFileAccessFromFileUrls: true
preferences.allowUniversalAccessFromFileUrls: true
preferences.appCacheEnabled: true
preferences.javascriptCanAccessClipboard: true
}
I then ran this on the phone using clickable --xenial
and it crashes straight away with the error (from clickable logs
):
Loading module: 'libubuntu_application_api_touch_mirclient.so.3.0.0'
LaunchProcess: failed to execvp:
/usr/lib/arm-linux-gnueabihf/oxide-qt/chrome-sandbox
[0919/232725:FATAL:zygote_host_impl_linux.cc(182)] Check failed: ReceiveFixedMessage(fds[0], kZygoteBootMessage, sizeof(kZygoteBootMessage), &boot_pid).
#0 0x0000ab9e131a <unknown>
#1 0x0000ab9f043a <unknown>
#2 0x0000ab2814aa <unknown>
#3 0x0000ab280a50 <unknown>
#4 0x0000ab280de0 <unknown>
#5 0x0000ab091fa6 <unknown>
#6 0x0000ab095a82 <unknown>
#7 0x0000ac6aea88 <unknown>
#8 0x0000aafa6a0c <unknown>
#9 0x0000ae0b7c86 oxide::qquick::EnsureChromiumStarted()
#10 0x0000ae0abfbc OxideQQuickWebView::OxideQQuickWebView()
#11 0x0000ae11eee6 QQmlPrivate::QQmlElement<>::QQmlElement()
#12 0x0000ae11ef2e QQmlPrivate::createInto<>()
Looking into this a bit it seemed like it was to do with apparmor permissons, so I added a bunch of permissons to the apparmor file based of a project I was using as a template.
{
"policy_groups": [
"networking",
"connectivity",
"content_exchange",
"content_exchange_source",
"usermetrics",
"webview",
"keep-display-on",
"audio",
"video",
"debug"
],
"policy_version": 1.3
}
However this didn't seem to fix the issue.
I'm probably just missing something simple in a config somewhere. Does anyone know what I need to add or change to stop this crash on app startup?
Device: LGE Nexus 5, OS: Ubuntu 16.04 (2018-W35)