qml-core-test::WebView_scriptMainWorld is flaky

Bug #1457743 reported by Olivier Tilloy
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Oxide
In Progress
High
Unassigned

Bug Description

When running unit tests on trunk on my desktop, I’m regularly seeing the following test failure:

2: PASS : qml-core-test::WebView_scriptMainWorld::initTestCase()
2: [0522/074536:ERROR:renderer_main.cc(200)] Running without renderer sandbox
2: 127.0.0.1 - - [22/May/2015 07:45:36] "GET /tst_WebView_scriptMainWorld.html HTTP/1.1" 200 -
2: 127.0.0.1 - - [22/May/2015 07:45:36] "GET /empty.html HTTP/1.1" 200 -
2: [0522/074536:ERROR:oxide_user_script_slave.cc(114)] Could not get a proper message manager for frame: 0x1d81cc24540 while trying to inject script in main world
2: PASS : qml-core-test::WebView_scriptMainWorld::test_WebView_canInjectInMainWorldWithOxideApi()
2: 127.0.0.1 - - [22/May/2015 07:45:36] "GET /tst_WebView_scriptMainWorld.html HTTP/1.1" 200 -
2: 127.0.0.1 - - [22/May/2015 07:45:36] "GET /empty.html HTTP/1.1" 200 -
2: [0522/074536:ERROR:oxide_user_script_slave.cc(114)] Could not get a proper message manager for frame: 0x1d81cc24620 while trying to inject script in main world
2: PASS : qml-core-test::WebView_scriptMainWorld::test_WebView_receiveMessageFromMainWorldUserscript()
2: 127.0.0.1 - - [22/May/2015 07:45:36] "GET /tst_WebView_scriptMainWorld.html HTTP/1.1" 200 -
2: 127.0.0.1 - - [22/May/2015 07:45:36] "GET /empty.html HTTP/1.1" 200 -
2: [0522/074536:ERROR:oxide_user_script_slave.cc(114)] Could not get a proper message manager for frame: 0x1d81cc24540 while trying to inject script in main world
2: FAIL! : qml-core-test::WebView_scriptMainWorld::test_WebView_verifyRegularMainWorldScriptDoesNotHaveAccessToOxideApi() Unexpected result message
2: Actual (): Main world content script found oxide.sendMessage
2: Expected (): Main world content script DID NOT found oxide.sendMessage
2: Loc: [/home/osomon/dev/phablet/oxide/trunk/qt/tests/qmltests/core/tst_WebView_scriptMainWorld.qml(79)]
2: PASS : qml-core-test::WebView_scriptMainWorld::cleanupTestCase()

It doesn’t happen all the time, but at least 50% of my test runs. I’ve seen this failure happen for as long as I can remember, it’s not a recent regression.

Related branches

Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

I was able to repro it on my desktop.

Changed in oxide:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Alexandre Abreu (abreu-alexandre)
Changed in oxide:
milestone: none → branch-1.9
Changed in webapps-sprint:
milestone: none → sprint-11
importance: Undecided → High
assignee: nobody → Alexandre Abreu (abreu-alexandre)
Changed in oxide:
status: Confirmed → In Progress
Changed in webapps-sprint:
status: New → In Progress
Changed in oxide:
milestone: branch-1.9 → branch-1.10
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This bug is blocked on bug #1399218.

Changed in oxide:
milestone: branch-1.10 → branch-1.11
David Barth (dbarth)
Changed in webapps-sprint:
milestone: sprint-11 → sprint-14
David Barth (dbarth)
Changed in webapps-sprint:
milestone: sprint-14 → sprint-15
Changed in oxide:
milestone: branch-1.11 → branch-1.12
David Barth (dbarth)
Changed in webapps-sprint:
milestone: sprint-15 → sprint-16
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

The issue wit this is that the scripts are loaded asynchronously. I'm going to fix this by providing an API that allows us to block the test until scripts are fully loaded

Changed in oxide:
assignee: Alexandre Abreu (abreu-alexandre) → Chris Coulson (chrisccoulson)
David Barth (dbarth)
Changed in webapps-sprint:
milestone: sprint-16 → sprint-17
Changed in oxide:
milestone: branch-1.12 → branch-1.13
Changed in webapps-sprint:
milestone: sprint-17 → sprint-18
no longer affects: webapps-sprint
Changed in oxide:
milestone: branch-1.13 → branch-1.15
Changed in oxide:
milestone: branch-1.15 → branch-1.16
Revision history for this message
Ertan Günay (ergunay) wrote :
Download full text (3.1 KiB)

Twitter app seems as opening than closes itself immediately.

-----------------------
Could not open manifest file: "/usr/share/unity-webapps/userscripts/unity-webapps-amazon/manifest.json"
qml: Loading webview on /home/egtaroot/.local/share/Twittertwittercom
Invalid webapp webapp definition: homepage not found or fails predicate isString
Could not open manifest file: "/usr/share/unity-webapps/userscripts/unity-webapps-amazon/manifest.json"
QQmlExpression: Expression file:///usr/share/webbrowser-app/webcontainer/WebApp.qml:272:25 depends on non-NOTIFYable properties:
    unity::action::qml::ActionManager::globalContext
qml: Loaded 5 UA override(s) from file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Web/ua-overrides-mobile.js
qml: Start browsing
qml: Could not create ContentHub backend (does not appear to be installed)
qml: Requesting the bindee to navigate to homepage: https://twitter.com/
[0506/185028:ERROR:zygote_host_impl_linux.cc(162)] Failed to adjust OOM score of renderer with pid 19607: Permission denied
file:///usr/share/webbrowser-app/webcontainer/ContentPickerDialog.qml:22:1: module "Ubuntu.Content" is not installed
file:///usr/share/webbrowser-app/webcontainer/ContentDownloadDialog.qml:22:1: module "Ubuntu.Content" is not installed
file:///usr/share/webbrowser-app/ContentHandler.qml:20:1: module "Ubuntu.Content" is not installed
file:///usr/share/webbrowser-app/Downloader.qml:22:1: module "Ubuntu.DownloadManager" is not installed
file:///usr/share/webbrowser-app/Downloader.qml:23:1: module "Ubuntu.Content" is not installed
file:///usr/share/webbrowser-app/Downloader.qml:22:1: module "Ubuntu.DownloadManager" is not installed
file:///usr/share/webbrowser-app/Downloader.qml:23:1: module "Ubuntu.Content" is not installed
qml: Loaded 5 UA override(s) from file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Web/ua-overrides-desktop.js
[0506/185028:ERROR:layer_tree_host_impl.cc(2218)] Forcing zero-copy tile initialization as worker context is missing
[0506/185031:ERROR:oxide_user_script_slave.cc(166)] Caught exception when calling script: Uncaught ReferenceError: external is not defined
[0506/185031:ERROR:oxide_user_script_slave.cc(166)] Caught exception when calling script: Uncaught ReferenceError: external is not defined
[0506/185031:ERROR:oxide_user_script_slave.cc(166)] Caught exception when calling script: Uncaught ReferenceError: external is not defined
[0506/185032:ERROR:oxide_user_script_slave.cc(166)] Caught exception when calling script: Uncaught ReferenceError: external is not defined
[0506/185032:ERROR:oxide_user_script_slave.cc(166)] Caught exception when calling script: Uncaught ReferenceError: external is not defined
[0506/185032:ERROR:oxide_user_script_slave.cc(166)] Caught exception when calling script: Uncaught ReferenceError: external is not defined
[0506/185032:ERROR:oxide_user_script_slave.cc(166)] Caught exception when calling script: Uncaught ReferenceError: external is not defined
[0506/185032:ERROR:oxide_user_script_slave.cc(166)] Caught exception when calling script: Uncaught ReferenceError: external is not defined
OxideQQuickScriptMessage: args is deprecated. Please use payload instead
qml: WebApps API message be...

Read more...

Changed in oxide:
milestone: branch-1.16 → branch-1.17
Changed in oxide:
milestone: branch-1.17 → branch-1.18
Changed in oxide:
milestone: branch-1.18 → none
Changed in oxide:
assignee: Chris Coulson (chrisccoulson) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.