webapp-container needs some help

Bug #1525147 reported by David Barth
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
webapps-sprint
Confirmed
Medium
David Barth
webbrowser-app (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

webapp-container doesn't provide much help on the command line:

$ webapp-container
Could not open manifest file: "/usr/share/unity-webapps/userscripts/unity-webapps-amazon/manifest.json"
Invalid webapps installation found: "/usr/share/unity-webapps/userscripts/unity-webapps-amazon"
Using Oxide as the web engine backend
QQmlComponent: Component destroyed while completion pending

David Barth (dbarth)
Changed in webbrowser-app (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Changed in webapps-sprint:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → sprint-17
Revision history for this message
Olivier Tilloy (osomon) wrote :

Actually, it does, if invoked with "-h" or "--help":

$ webapp-container --help
Usage: webapp-container [-h|--help] [--fullscreen] [--maximized] [--inspector] [--app-id=APP_ID] [--homepage=URL] [--webapp=name] [--name=NAME] [--icon=PATH] [--webappModelSearchPath=PATH] [--webappUrlPatterns=URL_PATTERNS] [--accountProvider=PROVIDER_NAME] [--accountSwitcher] [--enable-back-forward] [--enable-addressbar] [--store-session-cookies] [--user-agent-string=USER_AGENT] [URL]
Options:
  -h, --help display this help message and exit
  --fullscreen display full screen
[…]

Revision history for this message
David Barth (dbarth) wrote : Re: [Bug 1525147] Re: webapp-container needs some help

yes, i know; that was just to make it a bit more friendly on first
encounter ;)

On Fri, Dec 11, 2015 at 11:33 AM, Olivier Tilloy <
<email address hidden>> wrote:

> Actually, it does, if invoked with "-h" or "--help":
>
> $ webapp-container --help
> Usage: webapp-container [-h|--help] [--fullscreen] [--maximized]
> [--inspector] [--app-id=APP_ID] [--homepage=URL] [--webapp=name]
> [--name=NAME] [--icon=PATH] [--webappModelSearchPath=PATH]
> [--webappUrlPatterns=URL_PATTERNS] [--accountProvider=PROVIDER_NAME]
> [--accountSwitcher] [--enable-back-forward] [--enable-addressbar]
> [--store-session-cookies] [--user-agent-string=USER_AGENT] [URL]
> Options:
> -h, --help display this help message and exit
> --fullscreen display full screen
> […]
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1525147
>
> Title:
> webapp-container needs some help
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/webapps-sprint/+bug/1525147/+subscriptions
>

David Barth (dbarth)
Changed in webapps-sprint:
milestone: sprint-17 → sprint-18
David Barth (dbarth)
Changed in webapps-sprint:
assignee: nobody → David Barth (dbarth)
David Barth (dbarth)
Changed in webapps-sprint:
milestone: sprint-18 → sprint-19
Revision history for this message
Peter Bittner (peter-bittner) wrote :

Currently, it's not possible to show `--help` neither in the Terminal app nor in an SSH session connected to the phone.

   $ webapp-container --help
   Loading module: 'libubuntu_application_api_touch_mirclient.so.3.0.0'
   UbuntuClientIntegration: connection to Mir server failed. Check that a Mir server is
   running, and the correct socket is being used and is accessible. The shell may have
   rejected the incoming connection, so check its log file
   Aborted (core dumped)

Looks like the webapp-container binary requires a successful connection to the Mir server. This should not be required, I believe.

David Barth (dbarth)
Changed in webapps-sprint:
milestone: sprint-19 → sprint-20
David Barth (dbarth)
Changed in webapps-sprint:
milestone: sprint-20 → backlog
Revision history for this message
Peter Bittner (peter-bittner) wrote :

The call to `printUsage()` happens in `BrowserApplication::initialize()`, which is after the constructor has been called. The base class `QApplication` seems to require a Mir server (or X server) running.

Conclusion
----------

- In order to be able to print the usage on the console without requiring a Mir server this call needs to be made before the constructor is called.

- It may also be a good idea to check all the command line arguments and reject invalid ones. (Is there no module available for this, similar to Python's argparse? Can we use QCommandLineParser? http://doc.qt.io/qt-5/qcommandlineparser.html)

References
----------

- http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/wily/webbrowser-app/wily/view/head:/src/app/browserapplication.cpp#L121
- http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/wily/webbrowser-app/wily/view/head:/src/app/browserapplication.cpp#L42
- http://doc.qt.io/qt-5/qcommandlineparser.html

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.