New issue
Advanced search Search tips

Issue 762003 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 762838


Show other hotlists

Hotlists containing this issue:
Payment-Handler


Sign in to add a comment

[Payments] Crash in ServiceWorkerPaymentApp

Project Member Reported by ma...@chromium.org, Sep 5 2017

Issue description

Starting the new Canary on Android:

I try to load https://rsolomakhin.github.io/pr/bob and get the following crash. Please let me know if this is relevant.

09-05 09:07:33.150 30704 30704 W System.err: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Collection java.util.Map.values()' on a null object reference
09-05 09:07:33.155 30704 30704 W System.err: 	at org.chromium.chrome.browser.payments.ServiceWorkerPaymentApp.getInstruments(ServiceWorkerPaymentApp.java:20)
09-05 09:07:33.155 30704 30704 W System.err: 	at org.chromium.chrome.browser.payments.PaymentRequestImpl.onAllPaymentAppsCreated(PaymentRequestImpl.java:277)
09-05 09:07:33.155 30704 30704 W System.err: 	at org.chromium.chrome.browser.payments.PaymentAppFactory$1.onAllPaymentAppsCreated(PaymentAppFactory.java:5)
09-05 09:07:33.155 30704 30704 W System.err: 	at org.chromium.chrome.browser.payments.ServiceWorkerPaymentAppBridge.onAllPaymentAppsCreated(ServiceWorkerPaymentAppBridge.java:35)
09-05 09:07:33.155 30704 30704 W System.err: 	at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
09-05 09:07:33.155 30704 30704 W System.err: 	at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:9)
09-05 09:07:33.155 30704 30704 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:106)
09-05 09:07:33.155 30704 30704 W System.err: 	at android.os.Looper.loop(Looper.java:164)
09-05 09:07:33.155 30704 30704 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:6494)
09-05 09:07:33.155 30704 30704 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
09-05 09:07:33.155 30704 30704 W System.err: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
09-05 09:07:33.155 30704 30704 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

 

Comment 1 by ma...@chromium.org, Sep 5 2017

Version 63.0.3204.0
Did this happen in M-62?

Comment 5 by ma...@chromium.org, Sep 6 2017

Jinho.bang can confirm but I believe it was introduced in M63, this change. https://chromium.googlesource.com/chromium/src/+/8cea359402fa83e048b585a89c3de33cae78daae
I've noticed that this happens only for ServiceWorkerPaymentApp, which is behind a flag, so no need to merge either way.

Comment 7 by ma...@chromium.org, Sep 6 2017

Jinho.bang: it is very easy to crash Chrome simply by going to https://rsolomakhin.github.io/pr/bob and not doing anything else. Please add more test coverage so that we do not introduce such crashes that could be avoided.
Jinho.bang: Let me know whether you need guidance for running or writing a test. I am happy to help.
rouslan@, mathp@,

I agree that we should write more tests for payment handler on Android.
Current android side tests don't install actual service workers unlike content side tests.
So, it's difficult to write more tests such as triggering payment request event under 
current implementation. So, I'd like to change the test structure (for ServiceWorkerPaymentApp)
so that we cover some cases what requires actual service worker.

However, this is a crash issue and it might be a little bit urgent although the feature is behind
runtime flag. So, I'll update the codes to cover java side codes fully. and then I'll change the test structure.
Blocking: 762838
Issue 764705 has been merged into this issue.
Status: Fixed (was: Assigned)

Sign in to add a comment