Closed Bug 969477 Opened 11 years ago Closed 10 years ago

Purchase of paid apps is broken due to JS error - aRequests[0].wrappedJSObject is undefined

Categories

(Firefox for Android Graveyard :: Web Apps (PWAs), defect, P1)

ARM
Android
defect

Tracking

(firefox29 ?, firefox30 affected)

RESOLVED WORKSFORME
Tracking Status
firefox29 --- ?
firefox30 --- affected

People

(Reporter: krupa.mozbugs, Unassigned)

References

Details

Android: 4.0.3
Firefox mobile: 30.0a1(2014-02-06)

steps to reproduce:
1. Load marketplace.allizom.org on your latest firefox mobile nightly
2. Search for :paid 
3. Click on the buy button for any paid app to start the purchase

expected behavior:
Webpay opens in a new tab

actual behavior:
Buy button status changes to 'Purchasing' for a while and then revets to the app-price.

Logcat shows:
02-07 10:40:54.848 E/GeckoConsole( 6922): [JavaScript Error: "aRequests[0].wrappedJSObject is undefined" {file: "jar:jar:file:///data/app/org.mozilla.fennec-1.apk!/assets/omni.ja!/components/PaymentsUI.js" line: 83}]
02-07 10:40:54.853 E/GeckoConsole( 6922): [JavaScript Error: "NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "aRequests[0].wrappedJSObject is undefined" {file: "jar:jar:file:///data/app/org.mozilla.fennec-1.apk!/assets/omni.ja!/components/PaymentsUI.js" line: 83}]'[JavaScript Error: "aRequests[0].wrappedJSObject is undefined" {file: "jar:jar:file:///data/app/org.mozilla.fennec-1.apk!/assets/omni.ja!/components/PaymentsUI.js" line: 83}]' when calling method: [nsIPaymentUIGlue::confirmPaymentRequest]" {file: "resource://gre/modules/Payment.jsm" line: 166}]
Blocks: 941855
OS: Mac OS X → Android
Hardware: x86 → ARM
Version: unspecified → Trunk
Priority: -- → P1
Assignee: nobody → delza
Assignee: delza → nobody
I can't find any paid apps on marketplace.allizom.org.  Can you assist?
Flags: needinfo?(krupa.mozbugs)
Martyn,

 Where are you based? You need to be in a region where Payments is supported. Phonebook tells me you are based in the UK which is not supported. To change your region-

1. Search for :debug in marketplace.allizom org
2. Scroll down to the region dropdown
3. Change region to the US or one of the supported regions
4. Search for :paid now

Paid apps should show up.
Flags: needinfo?(krupa.mozbugs)
Were you able to find some paid apps? If you can't, we'll be able to help in IRC at #payments.
Flags: needinfo?(mhaigh)
Have found paid apps but am currently unable to proceed due to the following error:

E/GeckoConsole( 7866): [JavaScript Error: "[payments] `navigator.mozPay` error: PAY_REQUEST_ERROR_NO_VALID_REQUEST_FOUND"]

Looks like there are no payment providers (https://mxr.mozilla.org/mozilla-central/source/dom/payment/Payment.jsm#108) - any ideas how to add some to my account?
Flags: needinfo?(mhaigh) → needinfo?(amckay)
(In reply to Martyn Haigh (:mhaigh) from comment #4)
> Have found paid apps but am currently unable to proceed due to the following
> error:
> 
> E/GeckoConsole( 7866): [JavaScript Error: "[payments] `navigator.mozPay`
> error: PAY_REQUEST_ERROR_NO_VALID_REQUEST_FOUND"]
> 
> Looks like there are no payment providers
> (https://mxr.mozilla.org/mozilla-central/source/dom/payment/Payment.jsm#108)
> - any ideas how to add some to my account?

See https://wiki.mozilla.org/Marketplace/PaymentAndroid for test setup instructions.
Flags: needinfo?(amckay)
I can't find any paid apps using multiple region/carrier to check if 29 is affected, Krupa, can you check?
Blocked by bug 970641 from verifying this bug. Will continue to try to get some paid apps to show up.
Kumar, Krupa, can we get in-app payment test working on prod? That will mean people won't be blocked on issues like searching or setting up devices and can quickly test this situation.
Flags: needinfo?(kumar.mcmillan)
Flags: needinfo?(krupa.mozbugs)
Hi. It should be working on prod and stage now. After installing prefs per comment #5 you can load this URL in Nightly, select the server you want, and tap the Pay button http://inapp-pay-test.paas.allizom.org/
Flags: needinfo?(kumar.mcmillan)
Awesome thanks. Martyn, are you able to hit the error now?
Flags: needinfo?(krupa.mozbugs) → needinfo?(mhaigh)
Still can't hit the error.  Steps taken:
1, build and deploy
2, install https://addons.mozilla.org/en-US/firefox/addon/dev-marketplace/
3, goto http://inapp-pay-test.paas.allizom.org/
4, select marketplace-dev.allizom.org
5, press 'pay' button
6, sign in to Persona with mhaigh@mozilla.com address

EITHER

a, press simulate payment button
b, nothing happens on screen or in ADB logcat

OR

A, press 'make a real payment' button
B, observe 'Setting up payment...' screen
C, observe url in logcat :
I/Gecko   (32680): --DOMWINDOW == 19 (0x8a06cd60) [pid = 32680] [serial = 56] [outer = 0x0] [url = https://marketplace-dev.allizom.org/mozpay/?req=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIxYWIwNTJiYS1jYWNiLTRmY2YtYWQ4OC02Y2Q0NzBiMTA3OGMiLCJhdWQiOiJtYXJrZXRwbGFjZS1kZXYuYWxsaXpvbS5vcmciLCJ0eXAiOiJtb3ppbGxhLWRldi9wYXltZW50cy9wYXkvdjEiLCJpYXQiOjEzOTQ3NDg4NTksImV4cCI6MTM5NDc1MjQ1OSwicmVxdWVzdCI6eyJwcmljZVBvaW50IjoxMCwiaWQiOiI5ZjIyOTVkMC0wMjI3LTQ0MzItOGU2My01OGYzZGNhZDNhZjMiLCJuYW1lIjoiVmlydHVhbCBLaXdpIiwiZGVzY3JpcHRpb24iOiJUaGUgZm9yYmlkZGVuIGZydWl0IiwiaWNvbnMiOnsiMzIiOiJodHRwczovL2luYXBwLXBheS10ZXN0LnBhYXMuYWxsaXpvbS5vcmcvaW1nL2tpd2lfMzIucG5nIiwiNDgiOiJodHRwczovL2luYXBwLXBheS10ZXN0LnBhYXMuYWxsaXpvbS5vcmcvaW1nL2tpd2lfNDgucG5nIiwiNjQiOiJodHRwczovL2luYXBwLXBheS10ZXN0LnBhYXMuYWxsaXpvbS5vcmcvaW1nL2tpd2lfNjQucG5nIiwiMTI4IjoiaHR0cHM6Ly9pbmFwcC1wYXktdGVzdC5wYWFzLmFsbGl6b20ub3JnL2ltZy9raXdpXzEyOC5wbmcifSwicHJvZHVjdERhdGEiOiJsb2NhbFRyYW5zSUQ9MWY3OWI5MGYtMzE4OC00Y2IwLThiNGUtY2RhZDBlZDA3ZTk0IiwiY2hhcmdlYmFja1VSTCI6Imh0dHBzOi8vaW5hcHAtcGa
D, observe TRANS_TIMEOUT error screen
Flags: needinfo?(mhaigh) → needinfo?(amckay)
I will try to make a purchase and see if this issue is still reproducible.
I tried to make an app purchase on 20a1 (03-13) and the payment completed without any errors. Closing this as wfm. I will reopen if I hit the issue again.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Flags: needinfo?(amckay)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.