Skip to content

iOS checkout intermittently stuck on blank "Authorize" screen — ReferenceError: Can't find variable: CheckoutBridge after WebKit web-process idle-exit #524

Description

@shubham-saggu

Environment

  • react-native-razorpay: 3.0.0
  • razorpay-pod (iOS): 1.5.4 (latest)
  • React Native: <fill in — e.g. 0.7x.x>
  • iOS: <fill in, e.g. iOS 18.x>
  • Device: iPhone 15 Pro
  • Xcode:
  • Pods linkage: use_frameworks! :linkage => :static
  • Mode: Test mode (test key), test card

Description

Intermittently, after opening checkout and reaching the bank/3DS "Authorize" step, the WebView renders its nav chrome ("Back" / "Authorize") but the body stays completely blank. The checkout is permanently stuck — neither the success nor the error callback fires. The only way out is tapping Back, which fires the cancellation callback (code === 0); retrying usually works.

It does not happen every time — roughly intermittent on the same device/flow.

Root cause (from device logs)

The checkout WebView's web-content process gets recycled/frozen by WebKit, and on reload CheckoutBridge is not re-injected, so the checkout JS can no longer talk to native:

GPUProcessProxy::gpuProcessExited: reason=IdleExit
WebProcessProxy::gpuProcessExited: reason=IdleExit
WebProcess::updateFreezerStatus: isFreezable=1, error=-1
...
WebContent WebPage::runJavaScriptInFrameInScriptWorld:
  Request to run JavaScript failed with error
  ReferenceError: Can't find variable: CheckoutBridge

The Can't find variable: CheckoutBridge error consistently follows a WebProcess/GPUProcess IdleExit. This looks like the SDK does not re-inject the CheckoutBridge script handler when the WKWebView's content process is jettisoned and the page reloads — which matches the intermittent nature (only breaks when the process happens to be recycled mid-checkout).

Steps to reproduce

  1. Integrate RazorpayCheckout.open({ key, order_id, name, description, theme }) (order-based checkout).
  2. On iPhone 15 Pro, open checkout and proceed to the "Authorize" step.
  3. Repeat several times / leave the checkout briefly idle so the web-content process gets recycled.
  4. Occasionally the "Authorize" screen loads blank and hangs.

Expected

Either the checkout survives a web-process recycle by re-injecting CheckoutBridge, or it fails cleanly via the error callback so the app can recover — instead of hanging indefinitely with no callback.

Actual

Blank "Authorize" WebView, no success/error callback, only recoverable via user tapping Back.

Notes / things already ruled out

  • Test mode + test card (correct combo) — not a live-mode/test-card mismatch.
  • Already on the latest razorpay-pod (1.5.4).
  • App code passes valid static options; failure happens entirely inside the SDK WebView after checkout opens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions