mozilla / r2d2b2g

Firefox OS Simulator is a test environment for Firefox OS. Use it to test your apps in a Firefox OS-like environment that looks and feels like a mobile phone.
https://addons.mozilla.org/en-US/firefox/addon/firefox-os-simulator/
Other
392 stars 139 forks source link

Increase the duration of validity of the receipt. #497

Closed nickdesaulniers closed 11 years ago

nickdesaulniers commented 11 years ago

Increase the duration of validity of the receipt.

mykmelez commented 11 years ago

@nickdesaulniers: do you plan to work on this in the near future? If so, let's assign this to you. Otherwise, let's move it out of the v4 milestone. Your pick!

mykmelez commented 11 years ago

We need to keep valid receipts valid, so users don't have to manually deal with an expired receipt. Increasing their duration of validity might mitigate the problem, but it won't eliminate it (unless we can increase it to infinity!).

@nickdesaulniers Perhaps we can morph this issue into "keep valid receipts valid" and use it to track the work for that enhancement?

nickdesaulniers commented 11 years ago

@andymckay Would it be possible to have test receipts have a far future expiration date, since developers should be screening for them anyways? So maybe instead of adding the query string parameter to the request, and the additional UI to the simulator, just always fetch a long lived valid receipt?

andymckay commented 11 years ago

You filed a bug about that I just made it very low priority because its pointless until we've got the rest of the infrastructure in place. We are blocked on the platform with https://bugzilla.mozilla.org/show_bug.cgi?id=757226, once thats cleared, we can start to worry about dealing with receipt expiry.

nickdesaulniers commented 11 years ago

@andymckay , sure but now an app installed with a valid receipt in the simulator will be invalid after 24 hours. Instead of having the dev have to reinstall the app every day, why can't the VALID test receipts have a far future expiration date? Isn't the expiration time something that is changeable when it's generated? Why is it currently set to 24 hours? I'd be happy to close bug 867662 (having the API to choose the expiration) in exchange for just getting VALID receipts that default to something longer than 24 hours. I agree having bug 757226 land will be helpful, but I don't think work on simulator receipt support should block on it. Maybe there is another way we can solve the need-to-reinstall-every-24 hour problem?

andymckay commented 11 years ago

The expiration time is changeable, however nothing checks it because you cannot replace a receipt. The simulator should not be checking the expiration date, just like apps should not be checking the expiration receipt.

nickdesaulniers commented 11 years ago

Ah, so I should just remove the option from the simulator to install an expired receipt, and we should remain aware that once bug 757226 has been patched, and the receipt validator flags expired receipts, then we should worry about durations. For now, this is non issue. So the fix for this will be remove the option for installing receipts. @mykmelez and I also discussed implementing a fake receipt verification service, should the need arise.

andymckay commented 11 years ago

Right, once receipt refreshes have landed, we can all start worrying about expiry and use things like https://wiki.mozilla.org/Apps/WebApplicationReceiptRefresh. For the moment the validator will tell you that the receipt is valid, just expired and everything would ignore it. I'm not sure why you'd want a fake receipt verification service, the marketplace is already one.

nickdesaulniers commented 11 years ago

fixed in #551