Skip to content

[Sentry: APP-8WS] /transition calls the iOS webkit messageHandlers bridge unguarded on desktop Safari #100268

Description

@mountiny

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.67 / 9.4.68 / 9.4.69
Reproducible in staging?: Needs to be confirmed
Reproducible in production?: Yes — crash is live in production
If this was caught during regression testing, add the test name, ID and link from BrowserStack: N/A — found via Sentry production crash scan
Email or phone of affected tester (no customers): N/A
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause / Sentry production crash scan
Slack conversation (hyperlinked to channel name): N/A

Action Performed:

  1. Open Safari on macOS.
  2. Sign in to Expensify Classic and start a transition to New Expensify, so the browser lands on https://new.expensify.com/transition.
  3. Let the transition page run.

Expected Result:

The transition completes and the user lands in New Expensify. No error.

Actual Result:

An unhandled TypeError fires on the transition page:

TypeError: undefined is not an object (evaluating 'top.webkit.messageHandlers.foregroundToBackground.postMessage')

The page calls the iOS WKWebView message bridge (top.webkit.messageHandlers.foregroundToBackground) without checking that it exists. In a plain desktop browser there is no messageHandlers object, so the property access throws.

Workaround:

Unknown. The transition usually still completes, but the rejection is unhandled and reaches Sentry.

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Sentry details

Sentry issue: https://expensify.sentry.io/issues/APP-8WS

Impact (snapshot at filing, 2026-09-03):

  • Users (total since first seen): 25
  • Events (total): 653
  • Users in scanned releases (9.4.67–9.4.69): 1
  • First seen: 2026-04-01
  • Last seen: ongoing
  • Platform: web (Safari on macOS)
  • Affected route: /transition
  • Mechanism: auto.browser.global_handlers.onunhandledrejection

Stack trace: the bundle is not symbolicated for this group; Sentry reports only app:///:75:3221 and app:///:75:786414. The thrown expression names the failing call directly.

Suspected cause: the transition page assumes the iOS HybridApp WKWebView bridge is present. Guard the call with a check such as top?.webkit?.messageHandlers?.foregroundToBackground?.postMessage?.(...) before invoking it.

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @Krishna2323

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions