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

Abierto
#1,042 0 comentarios 1 reacción 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@markmur ya está trabajando en esto.

Desde el 23/11/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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.

Lenguaje dominante
Swift
Estrellas
7
Forks
6
Merge medio
2 d 18 h
PR fusionados (30 d)
12

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Shopify/checkout-kit

Todos los issues de Shopify/checkout-kit

Issues similares

Más issues de Swift

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.