Closed Bug 908886 Opened 11 years ago Closed 11 years ago

[Android] App purchase fails with [JavaScript Error: "[payments] `navigator.mozPay` error: PAY_REQUEST_ERROR_NO_VALID_REQUEST_FOUND"]

Categories

(Marketplace Graveyard :: Payments/Refunds, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED
2013-09-03

People

(Reporter: krupa.mozbugs, Assigned: wesj)

References

Details

Attachments

(1 file)

steps to reproduce:
1. Launch marketplace-dev on nightly(26.0a1) on your android phone
2. Start the purchase of an app
3. Sign in to your Persona account

expected behavior:
Webpay loads the Enter PIN screen

observed behavior:
Payment flow is aborted with the Payment cancelled user message

logcat shows:
 08-23 14:29:52.485 E/GeckoConsole( 5582): [JavaScript Error: "[payments] `navigator.mozPay` error: PAY_REQUEST_ERROR_NO_VALID_REQUEST_FOUND"]

logs:
08-23 14:29:52.070 E/GeckoConsole( 5582): [model] Found app with lookup key test-app-y7430
08-23 14:29:52.070 E/GeckoConsole( 5582): [buttons] Install requested for Test App (y7430)
08-23 14:29:52.075 E/GeckoConsole( 5582): [JavaScript Warning: "[buttons] User data not available for Test App (y7430)"]
08-23 14:29:52.075 E/GeckoConsole( 5582): [buttons] Starting payment flow for Test App (y7430)
08-23 14:29:52.080 E/GeckoConsole( 5582): [payments] Initiating transaction
08-23 14:29:52.080 E/GeckoConsole( 5582): [req] POSTing https://marketplace-dev.allizom.org/api/v1/webpay/prepare/?_user=krupa.mozbugs%40gmail.com%2C88b31cca5ae8e065ed3051c5dca74a410df9ed680236e9bf0a6f21d5fb687646a6f4c706d9ad78e34c67b3b3e13cb1bb9c68b034cf084771ec8aad4ec545093a%2Cec8af083e8174d3cbedd7c62dcbad132&dev=android&device=mobile&lang=en-US&pro=eab553fc.32.1&region=us
08-23 14:29:52.340 D/PowerManagerService( 1978): onSensorChanged: light value: 100
08-23 14:29:52.480 E/GeckoConsole( 5582): [req] POSTed https://marketplace-dev.allizom.org/api/v1/webpay/prepare/?_user=blahblah&dev=android&device=mobile&lang=en-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.485 E/GeckoConsole( 5582): [JavaScript Error: "[payments] `navigator.mozPay` error: PAY_REQUEST_ERROR_NO_VALID_REQUEST_FOUND"]
08-23 14:29:52.485 E/GeckoConsole( 5582): [buttons] Purchase flow rejected for Test App (y7430)
08-23 14:29:52.485 E/GeckoConsole( 5582): [buttons] Unsuccessful install for Test App (y7430)
Summary: [Android] App purchase fails with → [Android] App purchase fails with [JavaScript Error: "[payments] `navigator.mozPay` error: PAY_REQUEST_ERROR_NO_VALID_REQUEST_FOUND"]
Blocks: 909896
Wes - does this sound like a problem with Persona on Fennec, which would point to bug 826325 ?
Flags: needinfo?(wjohnston)
This error means that the device is not configured with proper settings. Marketplace dev needs these settings in order for payments to work on device: https://github.com/mozilla/webpay/blob/master/ezboot/custom-prefs.js
Flags: needinfo?(wjohnston)
How should we add custom settings on Android? Do we need to make a custom build? On Firefox OS we use `adb push` to put a settings file in /data/local
Version: 1.3 → 1.4
I think you need to add them to https://mxr.mozilla.org/mozilla-central/source/mobile/android/app/mobile.js#748

Wesley can probably confirm it.
Version: 1.4 → 1.3
Version: 1.3 → 1.4
(In reply to Kumar McMillan [:kumar] from comment #3)
> How should we add custom settings on Android? Do we need to make a custom
> build? On Firefox OS we use `adb push` to put a settings file in /data/local

about:config is your friend. You should be able to tweak the settings that ship on Nightly using about:config.
(In reply to Mark Finkle (:mfinkle) from comment #5)
> about:config is your friend. You should be able to tweak the settings that
> ship on Nightly using about:config.

Heh, that sounds painful to type on an Android device. There are about 15 prefs needed. So the alternative is to make a custom build with prefs added here? https://mxr.mozilla.org/mozilla-central/source/mobile/android/app/mobile.js#748
(In reply to Kumar McMillan [:kumar] from comment #6)
> (In reply to Mark Finkle (:mfinkle) from comment #5)
> > about:config is your friend. You should be able to tweak the settings that
> > ship on Nightly using about:config.
> 
> Heh, that sounds painful to type on an Android device. There are about 15
> prefs needed. So the alternative is to make a custom build with prefs added
> here?
> https://mxr.mozilla.org/mozilla-central/source/mobile/android/app/mobile.
> js#748

Correct. I guess an add-on could work too. Which ever is easiest for you.
Ah, a custom add-on sounds like the easiest solution
Assignee: nobody → kumar.mcmillan
Attached file Devprefs.xpi (deleted) —
Extension to set the dev prefs.
I altered it locally to support desktop, installed it and got a pile of prefs. Should probably get the source on github and the addon on AMO.

That's great, thanks, really helpful.
Wes, you are most righteous! Thanks for this add-on. This enables payment prefs but it looks like the Persona login is not working, I filed bug 914415 for that. Making progress...
Assignee: kumar.mcmillan → wjohnston
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2013-09-03
That is likely a dup of bug 826325. I'll land those patches on inbound tonight!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: