Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

installed app throws NoValidReceipts #9

Closed
kumar303 opened this Issue Jun 29, 2012 · 7 comments

Comments

Projects
None yet
2 participants
Member

kumar303 commented Jun 29, 2012

After paying for and installing this app, I get:

[15:02:13.523] Unexpected state: [NoValidReceipts No receipts passed verification] @ https://marketplace-cdn.addons.mozilla.net/mozmarket.js:874

Any ideas? Using andy's receipts command I can verify it successfully locally:

$ receipts --profile fxn -c
...
Checking receipts for domain: kumar303.github.com
Verifying at: https://receiptcheck-marketplace-dev.allizom.org/verify/372377
Server returned: ok
Owner

ianb commented Jun 29, 2012

What does verifier.receiptErrors look like? Did you try setting up logging? (mozmarket.receipts.verify(callback, {onlog: mozmarket.receipts.Verifier.consoleLogger}))

Member

kumar303 commented Jun 29, 2012

Let me see if I can figure out how to get a verifier instance from the Prompter. Here is the log output:

[16:51:16.569] Got application: http://kumar303.github.com/yacht/manifest.webapp @ https://marketplace-cdn.addons.mozilla.net/mozmarket.js:667
[16:51:16.570] Using installs_allowed_from value from manifest: {"0":"https://marketplace.mozilla.org","1":"https://marketplace-dev.allizom.org"} @ https://marketplace-cdn.addons.mozilla.net/mozmarket.js:667
[16:51:16.570] Checking receipt eyJh @ https://marketplace-cdn.addons.mozilla.net/mozmarket.js:665
[16:51:16.571] Got error in _verifyOneReceipt: TypeError: this.installs_allowed_from.indexOf is not a function @ https://marketplace-cdn.addons.mozilla.net/mozmarket.js:673
[16:51:16.571] Finished all receipt verification @ https://marketplace-cdn.addons.mozilla.net/mozmarket.js:665
[16:51:16.571] No serious errors during verification @ https://marketplace-cdn.addons.mozilla.net/mozmarket.js:665
[16:51:16.572] Unexpected state: [NoValidReceipts No receipts passed verification] @ https://marketplace-cdn.addons.mozilla.net/mozmarket.js:874
[16:51:16.572] Fatal error in _finishVerification: Unexpected state in verifier: [NoValidReceipts No receipts passed verification] @ https://marketplace-cdn.addons.mozilla.net/mozmarket.js:673
Owner

ianb commented Jun 29, 2012

Al, it seems like there's an internal error, maybe browser compatibility? What browser are you using? Or, what is the value of installs_allowed_from?

This probably should produce an InternalError state, not a NoValidReceipts state. But maybe I can reproduce with a little more info, and fix both problems.

Member

kumar303 commented Jun 29, 2012

I'm on Firefox Nightly from a couple days ago, 6/25 build. I'll try updating.

This is what verifier.receiptErrors is:

{
    'eyJhbGciOiAiUlMyNTYiLCAidHlwIjogIkpXVCIsICJqa3UiOiAiaHR0cHM6Ly9tYXJrZXRwbGFjZS1kZXYtY2RuLmFsbGl6b20ub3JnL3B1YmxpY19rZXlzL3Rlc3Rfcm9vdF9wdWIuandrIn0.eyJpc3MiOiAiaHR0cHM6Ly9tYXJrZXRwbGFjZS1kZXYtY2RuLmFsbGl6b20ub3JnL3B1YmxpY19rZXlzL3Rlc3Rfcm9vdF9wdWIuandrIiwgInR5cCI6ICJjZXJ0aWZpZWQta2V5IiwgImp3ayI6IFt7ImFsZyI6ICJSU0EiLCAibW9kIjogIkFNRkhIc1FTbUlXSTdfaTNKV2lveHlScWl5Rk9Pb2NZUzhDTGZiSC1uZEVvVHlwU2RBVWhHMmdWOUN6YmVBMWpSaVZwUVBlazdlOG9ZOWIzbWk1LXFQa3h0cmtNd3hJN21GYmZVeS03b2J0anNSWHEyc2trTzdyYTdYWXhCSFZGbkhIN3BFUU8yeUxfZGljRGlWZmthT0ZBMktvOHJSQmY4Rnp0TE5PTTQ0ck9sR0oyc3BYaW9BdDVyUmJFcGFjWTB5Vnk3QkJZeWZCc2FsMk11N0tqa0xDVW5Lb1B5djZBcmtfUHgxYVo3SUlVWGIySm1iQlllSF9DUzRqUXYxMjR0YTdXRUdxWkI1ODkxQ1BRVHB4em5aTnFzR3Y0VGJMdThFbG40anlVdDRFQTllaVpWamhwRUY5LUUxeTNlc1lGaHZaYU54UUNuMnI2ZEs2U1FNRTVuamsiLCAiZXhwIjogIkFRQUIiLCAia2lkIjogImFwcHN0b3JlLm1vemlsbGEuY29tLTIwMTItMDQtMjUifV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NlL3JlaXNzdWUiLCAidXNlciI6IHsidHlwZSI6ICJkaXJlY3RlZC1pZGVudGlmaWVyIiwgInZhbHVlIjogIjgyNy0xOWQxNjAxNS04MjljLTQwNDAtYTFlYS02ODM5NWJlZTM5YmUifSwgImV4cCI6IDEzNTY3Mjc4NjAsICJpYXQiOiAxMzQxMDAzMDYwLCAidHlwIjogInB1cmNoYXNlLXJlY2VpcHQiLCAibmJmIjogMTM0MTAwMzA2MH0.QuOQm83AfrJSloKAq2HZRATvrMLFOI0jZHw_Gt5rIVngwqe4WTOMoohYgAudRzlScUR4uTY1WXt-EdoJZTjTVW7ueNlGzXUbCw-X558MIJSdCTI6xCvfwFU6rLSXgo5-9GFQhZAyTihVJl32XR3YiuOoQQubbifs2G4QE13FUZaIZrCyYfplIA1igw2FDkcu4qu7JaNF9pm-HcswMboDsM8NW-FvXFyMl74MmxAjccVUoRX4kvyi2Tk4BbyjDQ4rbLv6pL6AqeyiapL6alfd6U0UefQclRyyBHJRVra7kLXMWX-2rKNlPiYZpPFL7rxNYrp2505cL-JmWLKKsNN1FQ': {
        detail: "Exception in _verifyOneReceipt: TypeError: this.installs_allowed_from.indexOf is not a function",
        exception: (new TypeError("this.installs_allowed_from.indexOf is not a function", "https://marketplace-cdn.addons.mozilla.net/mozmarket.js", 396))
    }
}

hmm, installs_allowed_from is an object not an array:

[17:00:45.362] ({0:"https://marketplace.mozilla.org", 1:"https://marketplace-dev.allizom.org"})

This is my manifest: https://github.com/kumar303/yacht/blob/e50f4a3409bf2dc1385d1c23db684c72890e43d7/www/manifest.webapp

Owner

ianb commented Jun 29, 2012

OK, this is a case where serialization in the DOM implementation is messing something up. Opened here: https://bugzilla.mozilla.org/show_bug.cgi?id=769830

My mocked mozApps API doesn't do this, so tests didn't catch it. I'll try to make a workaround.

@ianb ianb closed this in 62f5fef Jun 29, 2012

Owner

ianb commented Jun 29, 2012

I haven't tested this against Firefox, only the mock (i.e., for regression), so please confirm if this fixes your problem

Member

kumar303 commented Jun 29, 2012

thanks! It worked in Nightly when I refreshed mozmarket.js. It didn't work in the downloaded app (of which I don't know how to get a dev console). Maybe that's just a caching thing, I'll try it later on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment