Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I test my privileged app if first it needs approval through Firefox OS Marketplace?

327 views
Skip to first unread message

Michael Bishop

unread,
Jun 25, 2013, 4:35:26 PM6/25/13
to dev-w...@lists.mozilla.org
Hello All,

I have a quick question for you. The app I'm working on is implementing OAuth authentication in Javascript. To do this, iit needs to be able to talk to the server through a cross-origin-XHR by adding the "systemXHR" permission. (The CORS is to create an access token)

The problem I'm running into is that for my app to be allowed to use the "systemXHR" permission, it first needs to be "approved by the Firefox OS Marketplace using a special process". I'm assuming I can't be approved until my app is finished, but how can I finish my app without being able to use the "systemXHR" permission?

There's a chicken and egg problem which I don't know how to solve.

Any ideas? Am I missing something?

_ michael

ma...@lonelyvegan.com

unread,
Jun 25, 2013, 6:09:56 PM6/25/13
to
Hi Michael,

Unfortunately the documentation you read was a bit misleading: you can test your privileged apps using the Firefox OS Simulator. It's available as a Firefox Addon: https://addons.mozilla.org/en-US/firefox/addon/firefox-os-simulator/

You can add your packaged app's manifest file to the simulator and test it there. If you have a device, plug it in via USB and you can push your packaged app to your device from the Simulator Dashboard.

Ping me (tofu...@mozilla.com) if you have further questions. In the future, you might prefer the https://lists.mozilla.org/listinfo/dev-webapps for these kinds of questions, as this list is aimed toward web apis and not building web apps.

mbi...@hitpointstudios.com

unread,
Jun 25, 2013, 9:55:27 PM6/25/13
to
Perfect response. I will use webapps in the future. Thank you for your help!

_ michael

Jeremie Patonnier

unread,
Jun 26, 2013, 5:17:20 AM6/26/13
to Michael Bishop, dev-w...@lists.mozilla.org
Hi Micheal,

For such question, I think you'll find better answers on the dev-b2g
mailing list.
However, it's possible to test privileged API by using the Firefox OS
simulator:

- https://addons.mozilla.org/fr/firefox/addon/firefox-os-simulator/

If a specific API is not available within the simulator (there is still
work to do to have all of them available), the simulator also allows you to
push any App you made directly to any Firefox OS device:

-
https://developer.mozilla.org/en-US/docs/Tools/Firefox_OS_Simulator#Push_to_device
-
https://hacks.mozilla.org/2013/05/pushing-firefox-os-apps-to-the-geeksphone/

An app push to a device that way can have access to privileged API if you
have declared your app as such within its manifest (with the "type" value).

Best,
Jérémie


2013/6/25 Michael Bishop <mbi...@hitpointstudios.com>

> Hello All,
>
> I have a quick question for you. The app I'm working on is implementing
> OAuth authentication in Javascript. To do this, iit needs to be able to
> talk to the server through a cross-origin-XHR by adding the "systemXHR"
> permission. (The CORS is to create an access token)
>
> The problem I'm running into is that for my app to be allowed to use the
> "systemXHR" permission, it first needs to be "approved by the Firefox OS
> Marketplace using a special process". I'm assuming I can't be approved
> until my app is finished, but how can I finish my app without being able to
> use the "systemXHR" permission?
>
> There's a chicken and egg problem which I don't know how to solve.
>
> Any ideas? Am I missing something?
>
> _ michael
>
> _______________________________________________
> dev-webapi mailing list
> dev-w...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-webapi
>



--
Jeremie
.............................
Web : http://jeremie.patonnier.net
Twitter : @JeremiePat <http://twitter.com/JeremiePat>

Mar

unread,
Jul 11, 2013, 4:37:54 AM7/11/13
to dev-w...@lists.mozilla.org
Hello

I read this mail today an I tried to test my privileged app using the
Firefox OS Simulator and it report me the following error.
Validation Result: INVALID(1 errors and 0 warnings)
<resource://r2d2b2g-at-mozilla-dot-org/r2d2b2g/data/content/index.html#>

* Errors:
o

Hosted App can't be type 'privileged'.


What can I do to solve it?
I need to use ContactsAPI, then I need a privileged type app. And I
don't have any idea about how can I test it.
Thanks in advance
Regards, Mare
0 new messages