javascript errors on www.gstatic.com (related to google pay)
The payment section of my website features google pay through the Clover google API integration. I tested it on pagespeed insights in mobile and desktop mode. and the errors appear in desktop mode as follows:
TypeError: Cannot read properties of null (reading 'o') at mq (https://www.gstatic.com/_/mss/boq-payments-consumer/_/js/k=boq-payments-consumer.InstantbuyFrontendBuyflowPayframeUi.en_US.Qj8bNg45XN4.2018.O/am=AAAAeA/d=1/excm=_b,_tp,payframeview/ed=1/dg=0/wt=2/ujg=1/rs=AMitfrj0ceGjXkJvlWp6C-pBerJTAQitTA/dti=1/m=_b,_tp:231:24) at _.L (https://www.gstatic.com/_/mss/boq-payments-consumer/_/js/k=boq-payments-consumer.InstantbuyFrontendBuyflowPayframeUi.en_US.Qj8bNg45XN4.2018.O/am=AAAAeA/d=1/excm=_b,_tp,payframeview/ed=1/dg=0/wt=2/ujg=1/rs=AMitfrj0ceGjXkJvlWp6C-pBerJTAQitTA/dti=1/m=_b,_tp:230:231) at q4 (https://www.gstatic.com/_/mss/boq-payments-consumer/_/js/k=boq-payments-consumer.InstantbuyFrontendBuyflowPayframeUi.en_US.Qj8bNg45XN4.2018.O/ck=boq-payments-consumer.InstantbuyFrontendBuyflowPayframeUi.e5W5hBrf4cc.L.B1.O/am=AAAAeA/d=1/exm=_b,_tp/excm=_b,_tp,payframeview/ed=1/wt=2/ujg=1/rs=AMitfrjWFXSyAUnaaGtRS6d6qI5SOqyYMw/ee=EmZ2Bf:zr1jrb;JsbNhc:Xd8iUd;K5nYTd:ZDZcre;LBgRLc:XVMNvd;Me32dd:MEeYgc;NJ1rfe:yGfSdd;NPKaK:PVlQOd;NSEoX:lazG7b;Pjplud:EEDORb;QGR0gd:Mlhmy;SNUn3:ZwDk9d;ScI3Yc:e7Hzgb;Uvc8o:VDovNc;YIZmRd:A1yn5d;a56pNe:JEfCwb;cEt90b:ws9Tlc;dIoSBb:SpsfSb;dowIGb:ebZ3mb;eBAeSb:zbML3c;iFQyKf:vfuNJf;lOO0Vd:OTA3Ae;oGtAuc:sOXFj;qafBPd:yDVVkb;qddgKe:xQtZb;wR5FRb:siKnQd;yEQyxe:p8L0ob;yxTchf:KUM7Z/dti=1/m=uZmJdd:259:588) at https://www.gstatic.com/_/mss/boq-payments-consumer/_/js/k=boq-payments-consumer.InstantbuyFrontendBuyflowPayframeUi.en_US.Qj8bNg45XN4.2018.O/ck=boq-payments-consumer.InstantbuyFrontendBuyflowPayframeUi.e5W5hBrf4cc.L.B1.O/am=AAAAeA/d=1/exm=_b,_tp/excm=_b,_tp,payframeview/ed=1/wt=2/ujg=1/rs=AMitfrjWFXSyAUnaaGtRS6d6qI5SOqyYMw/ee=EmZ2Bf:zr1jrb;JsbNhc:Xd8iUd;K5nYTd:ZDZcre;LBgRLc:XVMNvd;Me32dd:MEeYgc;NJ1rfe:yGfSdd;NPKaK:PVlQOd;NSEoX:lazG7b;Pjplud:EEDORb;QGR0gd:Mlhmy;SNUn3:ZwDk9d;ScI3Yc:e7Hzgb;Uvc8o:VDovNc;YIZmRd:A1yn5d;a56pNe:JEfCwb;cEt90b:ws9Tlc;dIoSBb:SpsfSb;dowIGb:ebZ3mb;eBAeSb:zbML3c;iFQyKf:vfuNJf;lOO0Vd:OTA3Ae;oGtAuc:sOXFj;qafBPd:yDVVkb;qddgKe:xQtZb;wR5FRb:siKnQd;yEQyxe:p8L0ob;yxTchf:KUM7Z/dti=1/m=uZmJdd:260:305 at Generator.throw (<anonymous>) at c (https://www.gstatic.com/_/mss/boq-payments-consumer/_/js/k=boq-payments-consumer.InstantbuyFrontendBuyflowPayframeUi.en_US.Qj8bNg45XN4.2018.O/am=AAAAeA/d=1/excm=_b,_tp,payframeview/ed=1/dg=0/wt=2/ujg=1/rs=AMitfrj0ceGjXkJvlWp6C-pBerJTAQitTA/dti=1/m=_b,_tp:125:75)
TypeError: Cannot read properties of null (reading 'o') at mq (https://www.gstatic.com/_/mss/boq-payments-consumer/_/js/k=boq-payments-consumer.InstantbuyFrontendBuyflowPayframeUi.en_US.Qj8bNg45XN4.2018.O/am=AAAAeA/d=1/excm=_b,_tp,payframeview/ed=1/dg=0/wt=2/ujg=1/rs=AMitfrj0ceGjXkJvlWp6C-pBerJTAQitTA/dti=1/m=_b,_tp:231:24) at _.L (https://www.gstatic.com/_/mss/boq-payments-consumer/_/js/k=boq-payments-consumer.InstantbuyFrontendBuyflowPayframeUi.en_US.Qj8bNg45XN4.2018.O/am=AAAAeA/d=1/excm=_b,_tp,payframeview/ed=1/dg=0/wt=2/ujg=1/rs=AMitfrj0ceGjXkJvlWp6C-pBerJTAQitTA/dti=1/m=_b,_tp:230:231) at q4 (https://www.gstatic.com/_/mss/boq-payments-consumer/_/js/k=boq-payments-consumer.InstantbuyFrontendBuyflowPayframeUi.en_US.Qj8bNg45XN4.2018.O/ck=boq-payments-consumer.InstantbuyFrontendBuyflowPayframeUi.e5W5hBrf4cc.L.B1.O/am=AAAAeA/d=1/exm=_b,_tp/excm=_b,_tp,payframeview/ed=1/wt=2/ujg=1/rs=AMitfrjWFXSyAUnaaGtRS6d6qI5SOqyYMw/ee=EmZ2Bf:zr1jrb;JsbNhc:Xd8iUd;K5nYTd:ZDZcre;LBgRLc:XVMNvd;Me32dd:MEeYgc;NJ1rfe:yGfSdd;NPKaK:PVlQOd;NSEoX:lazG7b;Pjplud:EEDORb;QGR0gd:Mlhmy;SNUn3:ZwDk9d;ScI3Yc:e7Hzgb;Uvc8o:VDovNc;YIZmRd:A1yn5d;a56pNe:JEfCwb;cEt90b:ws9Tlc;dIoSBb:SpsfSb;dowIGb:ebZ3mb;eBAeSb:zbML3c;iFQyKf:vfuNJf;lOO0Vd:OTA3Ae;oGtAuc:sOXFj;qafBPd:yDVVkb;qddgKe:xQtZb;wR5FRb:siKnQd;yEQyxe:p8L0ob;yxTchf:KUM7Z/dti=1/m=uZmJdd:259:588) at https://www.gstatic.com/_/mss/boq-payments-consumer/_/js/k=boq-payments-consumer.InstantbuyFrontendBuyflowPayframeUi.en_US.Qj8bNg45XN4.2018.O/ck=boq-payments-consumer.InstantbuyFrontendBuyflowPayframeUi.e5W5hBrf4cc.L.B1.O/am=AAAAeA/d=1/exm=_b,_tp/excm=_b,_tp,payframeview/ed=1/wt=2/ujg=1/rs=AMitfrjWFXSyAUnaaGtRS6d6qI5SOqyYMw/ee=EmZ2Bf:zr1jrb;JsbNhc:Xd8iUd;K5nYTd:ZDZcre;LBgRLc:XVMNvd;Me32dd:MEeYgc;NJ1rfe:yGfSdd;NPKaK:PVlQOd;NSEoX:lazG7b;Pjplud:EEDORb;QGR0gd:Mlhmy;SNUn3:ZwDk9d;ScI3Yc:e7Hzgb;Uvc8o:VDovNc;YIZmRd:A1yn5d;a56pNe:JEfCwb;cEt90b:ws9Tlc;dIoSBb:SpsfSb;dowIGb:ebZ3mb;eBAeSb:zbML3c;iFQyKf:vfuNJf;lOO0Vd:OTA3Ae;oGtAuc:sOXFj;qafBPd:yDVVkb;qddgKe:xQtZb;wR5FRb:siKnQd;yEQyxe:p8L0ob;yxTchf:KUM7Z/dti=1/m=uZmJdd:260:305 at Generator.throw (<anonymous>) at c (https://www.gstatic.com/_/mss/boq-payments-consumer/_/js/k=boq-payments-consumer.InstantbuyFrontendBuyflowPayframeUi.en_US.Qj8bNg45XN4.2018.O/am=AAAAeA/d=1/excm=_b,_tp,payframeview/ed=1/dg=0/wt=2/ujg=1/rs=AMitfrj0ceGjXkJvlWp6C-pBerJTAQitTA/dti=1/m=_b,_tp:125:75)
And its regarding these resources:
…dti=1/m=b,tp:231:23](https://www.gstatic.com//mss/boq-payments-consumer//js/k=boq-payments-consumer.InstantbuyFrontendBuyflowPayframeUi.en_US.Qj8bNg45XN4.2018.O/am=AAAAeA/d=1/excm=_b,_tp,payframeview/ed=1/dg=0/wt=2/ujg=1/rs=AMitfrj0ceGjXkJvlWp6C-pBerJTAQitTA/dti=1/m=_b,_tp)(www.gstatic.com)
…dti=1/m=b,tp:231:23](https://www.gstatic.com//mss/boq-payments-consumer//js/k=boq-payments-consumer.InstantbuyFrontendBuyflowPayframeUi.en_US.Qj8bNg45XN4.2018.O/am=AAAAeA/d=1/excm=_b,_tp,payframeview/ed=1/dg=0/wt=2/ujg=1/rs=AMitfrj0ceGjXkJvlWp6C-pBerJTAQitTA/dti=1/m=_b,_tp)(www.gstatic.com)
Until google fixes this, how will my customers be affected if they attempt to use google pay?
@mik3ca2 can you share a link to your website whit the Google Pay integration?
https://buy.ontariospeeddating.ca is the website.
For a direct link to the checkout page that features google pay, its:
https://buy.ontariospeeddating.ca/debg/payscr/
However don't use that link if you are actually placing the order because on that test page, I deliberately made it where the order doesnt get processed whether you put in the card info manually or use google pay.
I don't see any of those error in the console when loading your website.
If you run the link in Google Pagespeed Insights, you will see its an ongoing issue with Google Pay under the desktop section.
Use this link:
https://pagespeed.web.dev/analysis/https-buy-ontariospeeddating-ca-debg-payscr/50w3gl22w8?form_factor=desktop
And the result is in Best Practices.
I added an image of what I saw on my screen.
Alright. So this only happens when you use PageSpeed. Correct? Your Google Pay integration works otherwise?
Again, I'm unable to reproduce this when checking your website with PageSpeed:
I think it does. at least when I click the google button it goes to the pay screen. I tested it a few months ago with actual test payments and it worked.
Did you click the desktop button after you ran your tests? because pagespeed insights raises the issue only in the desktop test not the mobile test. I also get 77% for best practices in the mobile version and 73% in the desktop version.
I also don't know if pagespeed insights is picky about web browsers like google search is but I used Firefox 144 for linux to run pagespeed insights.
I also use an old blackberry Q10 phone from time to time to run my website tests. Google search won't even load on that phone (whereas bing can).
Alright. When switching to Desktop I can see the errors. Let me try to have a look...
@mik3ca2 are you able to reproduce those errors without pagespeed?
I did get unrelated errors (about asm.js) stopping my credit card boxes and google pay from loading if I have devtools open while loading the page, but without devtools opened, the page runs fine. This was tested in Firefox 144 (latest release for 32-bit linux);
I also tested it in Seamonkey 2.53.19 and it works if I disable module scripts (dom.modulescripts.enabled set to false in about:config) regardless of if devtools is showing or not.
But regardless of what I do, I don't see any issue that lighthouse saw. Makes me think its either a lighthouse issue itself or that google pay acts funny with certain web browser identifications.