我试图根据可点击的ut-app-cmake-template
将网络视图添加到ubports应用中。这给了我一个简单的hello world应用。
我在布局中添加了一个Web视图:
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
}
然后我使用clickable --xenial
在手机上运行它,它立即崩溃并出现错误(来自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<>()
仔细研究一下,这似乎与apparmor许可有关,因此我根据我用作模板的项目在apparmor文件中添加了一堆许可。
{
"policy_groups": [
"networking",
"connectivity",
"content_exchange",
"content_exchange_source",
"usermetrics",
"webview",
"keep-display-on",
"audio",
"video",
"debug"
],
"policy_version": 1.3
}
但是,这似乎无法解决问题。
我可能只是在某个地方的配置中缺少一些简单的东西。有人知道我需要添加或更改什么才能在应用启动时阻止此崩溃吗?
设备:LGE Nexus 5,操作系统:Ubuntu 16.04(2018-W35)