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

オープン
#1,042 コメント 0 件 リアクション 1 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@markmur がすでに取り組んでいます。

2026年11月23日 から。

評価

この issue はまだ評価されていません。

説明

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.

主要言語
Swift
スター
7
フォーク
6
平均マージ
2日 18時間
マージ済み PR(30日)
12

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Shopify/checkout-kit のほかの issue

Shopify/checkout-kit の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。