Skip to content

Suppress ERR_BLOCKED_BY_ORB noise from third-party ad creatives - #97

Merged
JakubMrozek merged 2 commits into
mainfrom
jakub/kon-1264-suppress-err-blocked-by-orb
Apr 16, 2026
Merged

Suppress ERR_BLOCKED_BY_ORB noise from third-party ad creatives#97
JakubMrozek merged 2 commits into
mainfrom
jakub/kon-1264-suppress-err-blocked-by-orb

Conversation

@JakubMrozek

Copy link
Copy Markdown
Member

Summary

  • Suppress ERR_BLOCKED_BY_ORB errors in onConsoleMessage and onReceivedError WebView callbacks
  • These errors are triggered by cross-origin resource requests from third-party ad creatives that lack proper CORS headers — not actionable on our side
  • Reduces noise in logs and Sentry

Fixes KON-1264

🤖 Generated with Claude Code

ERR_BLOCKED_BY_ORB errors are triggered by cross-origin resource
requests from ad creatives that lack proper CORS headers. These
are not actionable on our side and generate noise in logs/Sentry.

Suppressed in both onConsoleMessage and onReceivedError callbacks.

Fixes KON-1264

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@JakubMrozek
JakubMrozek requested a review from phiviet01 March 30, 2026 13:27
The error code ERR_BLOCKED_BY_ORB appears in onReceivedError.description,
not in console messages — Chrome logs a different string there.
The filter in onConsoleMessage would never match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@JakubMrozek

Copy link
Copy Markdown
Member Author

@claude

@claude

claude Bot commented Mar 30, 2026

Copy link
Copy Markdown

Claude finished @JakubMrozek's task in 53s —— View job


Code Review

  • Read changed files
  • Analyze the changes
  • Post review feedback

The change is clean and well-targeted. A few observations:

What the final diff actually does

Only onReceivedError is modified — the onConsoleMessage filter was added in the first commit then removed in the second (87464de). This is the right call: ERR_BLOCKED_BY_ORB is a network-level error reported by the Chromium stack, not a JS console message, so filtering it in onConsoleMessage would have been incorrect.

Minor note: the PR description still mentions suppressing in both callbacks, but the final code only touches onReceivedError. Worth updating the description for accuracy.

Consistency with existing patterns

The approach mirrors the existing favicon.ico suppression in onReceivedHttpError (lib/src/widgets/kontext_webview.dart:207), which is a good precedent to follow.

Platform scope

ERR_BLOCKED_BY_ORB is Chromium-specific (Android). On iOS (WKWebView), ORB blocking surfaces differently or not at all through this callback, so the filter is a no-op there — that's fine.

String matching

error.description.contains('ERR_BLOCKED_BY_ORB') is pragmatic. An exact equality check (==) would be slightly more precise, but given this is a well-known, stable Chromium error string, contains is fine and more resilient to any prefix/suffix variation.

Overall: LGTM. The change is minimal, well-commented, and correctly scoped.

@phiviet01 phiviet01 closed this Mar 30, 2026
@phiviet01
phiviet01 deleted the jakub/kon-1264-suppress-err-blocked-by-orb branch April 1, 2026 11:52
@JakubMrozek
JakubMrozek restored the jakub/kon-1264-suppress-err-blocked-by-orb branch April 16, 2026 12:12
@JakubMrozek JakubMrozek reopened this Apr 16, 2026
@JakubMrozek
JakubMrozek merged commit 0f46b6a into main Apr 16, 2026
2 checks passed
@JakubMrozek
JakubMrozek deleted the jakub/kon-1264-suppress-err-blocked-by-orb branch April 16, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants