Android 4.0.0: a way to handle or silence the checkout web view's console messages

Open
#1,042 0 comments 1 reaction 1 assignee View on GitHub

Maintainers usually reply within 1 day

@markmur is already working on this.

Since Nov 23, 2026.

Assessment

This issue has not been assessed yet.

Description

Versions: com.shopify:checkout-kit 4.0.0 (Android), @shopify/checkout-kit-react-native 4.0.1.

What happens: the checkout web view's WebChromeClient (internal/web/CheckoutWebView.kt) overrides onProgressChanged, the geolocation prompts, onPermissionRequest and onShowFileChooser, but not onConsoleMessage. Android's WebView therefore handles the checkout page's console messages itself and writes them to logcat under the chromium tag. Configuration.logLevel does not apply to them: LogWrapper gates only the SDK's own lines.

Some of these messages name the page's URL. On Android development builds we have seen a line of the form Clear-Site-Data header on '<checkout URL>', where the URL is the cart's checkout URL including its key query parameter. That parameter is a secret for the cart. The SDK's own lines carefully redact URLs (redactedUrlForLogging()), so this path seems to be an oversight rather than a choice.

Request: one of:

  1. handle onConsoleMessage in the SDK's WebChromeClient and route console messages through LogWrapper (so LogLevel.ERROR or NONE keeps them out of logcat), with URLs redacted as elsewhere; or
  2. a configuration option, or a listener callback, that lets the host app receive or drop console messages; and
  3. the same option exposed in the React Native module's configuration.

Notes: logcat is not readable by other apps on modern Android, so the exposure is limited to USB debugging and shared bug reports. We have not yet checked whether WebView prints these messages in a non-debuggable (release) build.

Dominant language
Swift
Stars
7
Forks
6
Avg merge
2d 18h
Merged PRs (30d)
12

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Shopify/checkout-kit

All issues in Shopify/checkout-kit

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.