← Back to team overview

ubuntu-phone team mailing list archive

Re: Are the web-container API changed?

 

On Mon, Jul 7, 2014 at 5:43 PM, Nathan Haines <nhaines@xxxxxxxxxx> wrote:

> On 07/07/2014 08:02 AM, Olivier Tilloy wrote:
>
>> (cc’ing again the list, as this information might be useful to others)
>>
>
> Thanks--apparently my phone didn't send to the list.
>
>  On Mon, Jul 7, 2014 at 4:31 PM, Nathan Haines <nhaines@xxxxxxxxxx
>> <mailto:nhaines@xxxxxxxxxx>> wrote:
>>
>>     Oh, I assumed that the core dump was from the command line
>>     execution, but it was the easiest way for me to get the error
>> messages.
>>
>>     In any case, the app refuses to run at all when installed as a click
>>     app.
>>
>>
>> Can you share the code to your app, so someone else can try it out and
>> advise?
>>
>
> Code is here:
>
> https://code.launchpad.net/~nhaines/+junk/nintendo-miiverse
>
>
>
>      I suppose I'm curious as to why webapp-container is lying about
>>     recognizing the options.
>>
>>
>> It’s not lying about the recognized options, as I said the error message
>> is misleading and can be safely ignored.
>>
>
> Well, it says it doesn't recognize the options.  This leads me to believe
> that it doesn't recognize the options.
>
> You say this error message is misleading.  That seems to imply that it
> does recognize the options.
>
> If it does recognize the options but says that it doesn't, then
> webapp-container is lying.  This is very concerning and should be addressed
> (and I am happy to file the bug report myself).
>
> If it doesn't recognize the options then there's a very, very serious
> error with the SDK documentation.  I can file a bug report on that, too, if
> that is the case.
>

The error message is being spat out by getopt, which is used by the
platform API to augment the applications’ capabilities with command-line
switches such as --form_factor_hint or --desktop_file_hint.

It can be suppressed by passing an extra "--" between the platform-specific
options, and the application-specific options, like so:

    webapp-container --desktop_file_hint=… -- --enable-back-forward
--webappUrlPatterns=… URL

Either way, with or without this extra "--", the application specific
options are recognized and taken into account, so really, there’s no need
to worry about this warning.

A bug report at https://bugs.launchpad.net/platform-api/+filebug would be
useful to improve the usage message to include application-specific options
(see print_help_and_exit() function in
http://bazaar.launchpad.net/~phablet-team/platform-api/trunk/view/head:/src/ubuntu/application/common/mircommon/application_options_mir.cpp#L69
).


Either way, it seems that the behavior has changed between trusty and
> utopic, and if that wasn't intended then that's a bug (and I'd be happy to
> file that one as well).
>

As far as I can remember, this warning was already present in trusty, so
that’s not a regression.

References