Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

uncaught exception: Unknown option: storeURL #7

Closed
kumar303 opened this issue Jun 20, 2012 · 9 comments
Closed

uncaught exception: Unknown option: storeURL #7

kumar303 opened this issue Jun 20, 2012 · 9 comments

Comments

@kumar303
Copy link
Contributor

With the latest code and with an HTML page that runs this:

  mozmarket.receipts.Prompter({
    storeURL: "https://marketplace.mozilla.org/app/myapp",
    supportHTML: '<a href="mailto:me@example.com">email me@example.com</a>',
    verify: true
  });

I get this error: Unknown option: storeURL. Did it change to something else?

btw, the tests do not all pass for me in Firefox Nightly but there isn't any obvious related error. The error I see all over the tests is:

ReceiptParseError Error decoding JSON: TypeError: atob is not a function exception:
(new TypeError("atob is not a function", "file:///Users/kumar/dev/receiptverifier/receiptverifier.js", 524))] installed app: file:///manifest.webapp])

...even though atob is a defined function in Firefox Nightly

@nickdesaulniers
Copy link
Collaborator

Gotta love javacript's scoping:
https://github.com/mozilla/receiptverifier/blob/master/receiptverifier.js#L14
atob will be hoisted above the conditional, declaring it. In the browser, this conditional never runs so atob stays undefined.
http://bonsaiden.github.com/JavaScript-Garden/#function.general
I'll fix this.

ianb added a commit that referenced this issue Jun 20, 2012
Fixed scoping issue identified by kumar Issue #7
@nickdesaulniers
Copy link
Collaborator

For future reference, this link should be used instead of the first one I posted:

var atob = function (s) {

@kumar303
Copy link
Contributor Author

after this change I still get Unknown option: storeURL in Firefox Nightly

@kumar303
Copy link
Contributor Author

When I remove it, it says uncaught exception: You must provide a storeURL option :)

@ianb
Copy link
Contributor

ianb commented Jun 22, 2012

Fixed in 268b467

@wayferer
Copy link

wayferer commented Jun 3, 2014

I am getting this error with the latest code and am not sure how to fix it. Any suggestions?

uncaught exception: Unknown option: storeURL;

@kumar303
Copy link
Contributor Author

The developer saw this on B2G 1.3, both in simulator and device

@kumar303 kumar303 reopened this Jul 29, 2014
@kumar303
Copy link
Contributor Author

mirrored in bugzilla for tracking purposes https://bugzilla.mozilla.org/show_bug.cgi?id=1045716

@jaredlockhart
Copy link
Contributor

Fixed in #22

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants