Open Bug 2007641 Opened 3 months ago Updated 3 days ago

www.papajohns.com - Error displayed when trying to checkout

Categories

(Web Compatibility :: Site Reports, defect, P1)

Desktop
Windows 10

Tracking

(Webcompat Priority:P3, Webcompat Score:1)

ASSIGNED
Webcompat Priority P3
Webcompat Score 1

People

(Reporter: ctanase, Assigned: twisniewski)

References

(Depends on 1 open bug, )

Details

(Keywords: leave-open, webcompat:site-report, webcompat:sitepatch-applied, Whiteboard: [webcompat-source:web-bugs][webcompat:sightline][webcompat:core])

User Story

user-impact-score:0
platform:windows,mac,linux,android
impact:site-broken
configuration:general
affects:all
branch:release
diagnosis-team:javascript

Attachments

(2 files)

Environment:
Operating system: Linux/Windows 10
Firefox version: Firefox 145.0/146/148

Steps to reproduce:

  1. Go to https://www.papajohns.com/omni/en/order/carryout
  2. Enter a zip code (e.g. 73301)
  3. Continue and select a store.
  4. Add a product to the cart.
  5. Access the cart and click on "Check out".

Expected Behavior:
The checkout page is displayed.

Actual Behavior:
It shows an error "OH NO! Looks like we left this page in the oven too long.".

Notes:

  • Chrome Mask doesn't seem to help
  • Reproduces regardless of the status of ETP
  • Reproduces in firefox-nightly, and firefox-release
  • Does not reproduce in chrome

Created from https://github.com/webcompat/web-bugs/issues/196731

Attached image image.png
Whiteboard: [webcompat-source:web-bugs] → [webcompat-source:web-bugs][webcompat:sightline]

Console error:

RangeError: Invalid time value
    NextJS 22
    g https://www.papajohns.com/assets/054ce4aef57aa23a07c65a17f86637b02598cfb325b:37
    apply https://www.papajohns.com/assets/054ce4aef57aa23a07c65a17f86637b02598cfb325b:38
    NextJS 6
    around https://cdn.appdynamics.com/adrum/adrum-24.4.0.4454.js:48
    g https://www.papajohns.com/assets/054ce4aef57aa23a07c65a17f86637b02598cfb325b:37
    Yj https://cdn.appdynamics.com/adrum/adrum-24.4.0.4454.js:18
    n https://cdn.appdynamics.com/adrum/adrum-24.4.0.4454.js:193
    apply https://www.papajohns.com/assets/054ce4aef57aa23a07c65a17f86637b02598cfb325b:40
    around https://cdn.appdynamics.com/adrum/adrum-24.4.0.4454.js:48
    NextJS 25
critical-42400a5a01dad6ce.js:1:244453
User Story: (updated)
Webcompat Score: --- → 1
Severity: -- → S2
User Story: (updated)
Webcompat Priority: --- → P1
Webcompat Score: 1 → 10
Priority: -- → P1
Webcompat Score: 10 → 9
new Intl.DateTimeFormat(void 0, {timeZone: "CST"})

is throwing in Firefox but not in Chrome or Safari

Randell found that these names are actually ambiguous? https://data.iana.org/time-zones/tzdb-2022b/theory.html

But anyhow... Andre, Jonathan, do you know why we drop them / should we avoid dropping them for compat, or try to push other browsers to do the same instead?

Flags: needinfo?(jfkthame)
Flags: needinfo?(andrebargull)

Note about the STR. It's important to choose a zipcode in an unsupported timezone like CST.

CST isn't a valid IANA time zone identifier, therefore it's rejected in SpiderMonkey to match the ECMA-402 specification. V8 doesn't perform any IANA time zone validity checks and simply defers to ICU4C, but because ICU4C supports IANA time zone identifiers and non-standard ICU4C time zone names, like for example CST, some non-valid IANA time zones are incorrectly accepted by V8.

JSC was fixed in November to reject ICU4C time zone identifiers, most likely this change hasn't yet landed in the release version of Safari.

Flags: needinfo?(andrebargull)

While it looks like our behavior here is correct, as André explains in comment 7, I wonder if we should nevertheless look into possible workarounds given the user-facing breakage. (Unless of course we can persuade the site to deploy a fix promptly.)

How does the zip code get mapped to a timezone? I'm guessing this is done by some JS on the page (I can't readily check as papajohns.com just redirects to their UK site for me); if we can't get them to fix the site, maybe we can intercept and patch this?

FWIW, even Safari Tech Preview still accepts "CST" for me, though I may not have the most up-to-date version (running on Sonoma here).

Flags: needinfo?(jfkthame)

I believe CST is coming from JSON from the server. The easiest way to patch this is probably to override new Intl.DateTimeFormat(void 0, {timeZone: "CST"}) and make it swap CST for the proper timezone.

André, can you file a bug against V8/blink?

Flags: needinfo?(andrebargull)
See Also: → 1797225
Webcompat Score: 9 → 10

(In reply to Jeff Muizelaar [:jrmuizel] from comment #9)

André, can you file a bug against V8/blink?

Filed as https://issues.chromium.org/issues/475214795.

Flags: needinfo?(andrebargull)
Webcompat Score: 10 → 9

Chrome accepts AST, EST, CST, HST, MST, PST, and SST in my testing (Firefox does not). I'll make an intervention which overrides those values to appropritate values, just in case Papa John's also use them in some cases.

Keywords: leave-open
Assignee: nobody → twisniewski
Status: NEW → ASSIGNED
Pushed by twisniewski@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c592f41c98e7 https://hg.mozilla.org/integration/autoland/rev/b06c8d93a22e add a JS webcompat intervention for Papa John's to work around non-standard values being passed into Intl.DateTimeFormat timeZones; r=webcompat-reviewers,ksenia
User Story: (updated)
Webcompat Priority: P1 → P3
Webcompat Score: 9 → 1
Whiteboard: [webcompat-source:web-bugs][webcompat:sightline] → [webcompat-source:web-bugs][webcompat:sightline][webcompat:core]
Depends on: 2020491
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: