Skip to content

Merge upstream PR fixes: Android crash, deprecation cleanup, security patches & more#137

Merged
arrrrny merged 2 commits into
masterfrom
development
Jun 3, 2026
Merged

Merge upstream PR fixes: Android crash, deprecation cleanup, security patches & more#137
arrrrny merged 2 commits into
masterfrom
development

Conversation

@arrrrny

@arrrrny arrrrny commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

This PR merges fixes from multiple upstream flutter_inappwebview PRs that were unmerged upstream. Each fix has been adapted to align with our fork's codebase.

Changes

🔴 Critical Fixes

  • Android onWebViewCreated 50% release crash — Defer addJavascriptInterface() and prepareAndAddUserScripts() to View.post() so binder IPC doesn't suppress engine's onPlatformViewCreated dispatch. Also defer initial load in makeInitialLoad() to ensure bridge is registered before page loads.

  • CVE-2020-6563 sandbox protection — Exclude intents that try to access /data sandbox files via file provider.

🟠 Stability & Cleanup

  • Android 15 edge-to-edge — Skip deprecated setNavigationBarColor/setNavigationBarDividerColor APIs on SDK 35+.

  • Java deprecation cleanupnew Handler()new Handler(Looper.getMainLooper()), new clearSessionCookies() helper with proper SDK gating, @SuppressWarnings("deprecation") on WebView client classes.

  • KeepAlive null error — Fix NullPointerException when disposing keepAlive WebViews by using remove() instead of put(null) and making a copy before iteration in dispose().

  • debugAssertNotDisposed() channel fix — Use this._channel directly instead of channel getter in disposeChannel() to avoid assertion error.

  • onCreateWindow URL for window.open() — Handle HitTestResult.UNKNOWN_TYPE to properly capture URLs from window.open() calls (not just anchor tags).

🟡 Tooling

  • pana analysis fix — Update analysis_options.yaml linter rules from ignore to false to fix pub.dev scoring.

  • AGP bump — Update example app AGP from 8.4.0 → 8.6.0 to meet Flutter's minimum requirement.

📦 Files Changed

11 files modified across Android Java code, Dart platform interface, and configuration.

All Contributors

Huge thanks to the upstream PR authors whose contributions are merged here:
@Manuito83, @NIKDISSV-Forever, @Khairul989, @note11g, @mustafayildiz12, @AlexV525, @MSOB7YY, @zopagaduanjr, @Osama-Al-Fawaz

arrrrny added 2 commits June 3, 2026 06:40
…-to-edge, security patches & more

Merged fixes from upstream flutter_inappwebview PRs into our fork:

- #2843/#2844 (by @Manuito83): Fix Android onWebViewCreated 50% release crash
  — defer JS bridge registration to View.post() in InAppWebView.prepare()
  — defer initial load in FlutterWebView.makeInitialLoad()
- #2729 (by @NIKDISSV-Forever): Skip deprecated nav bar color APIs on Android 15+
- #2817 (by @Khairul989): Java deprecation cleanup — Handler(Looper), clearSessionCookies(),
  @SuppressWarnings on WebViewClient classes
- #2758 (by @note11g): Fix pana analysis on pub.dev — analysis_options.yaml linter rules
- #2638 (by @mustafayildiz12): Fix KeepAlive null error — remove() instead of put(null)
- #2243 (by @AlexV525): CVE-2020-6563 sandbox file access protection
- #2558 (by @MSOB7YY): Fix debugAssertNotDisposed() channel access in disposeChannel()
- #1679 (by @zopagaduanjr): Handle HitTestResult.UNKNOWN_TYPE in onCreateWindow
  for window.open() calls (Android)
- #2631 (by @Osama-Al-Fawaz): Remove debug print from localhost server (already clean)
- Bump AGP 8.4.0 → 8.6.0 in example app
…acking

The iOS package's .build directory contained Swift Package Manager index
files and module caches (including a 64MB LMDB database) that should
never be version-controlled.
@arrrrny arrrrny merged commit bbf7858 into master Jun 3, 2026
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.

🔴 [Android] onWebViewCreated never fires on ~50% of release-build cold starts (JS bridge security path bug)

1 participant