Skip to content

Conversation

@MSOB7YY
Copy link

@MSOB7YY MSOB7YY commented Mar 12, 2025

when disposing PlatformInAppWebViewController, it calls InternalChannelController.disposeChannel() which tries to set the channel handler to null, but the issue is that it access the channel through the getter channel which has a debug assert that it shouldn't be disposed (channel == null)

this might or might not cause the resources to not be freed while debugging

in this pr, we access the _channel variable directly, if it's null then setMethodCallHandler will simply not execute

Connection with issue(s)

Resolve issue #2104

Connected to N/A

Testing and Review Notes

to test

  flutter_inappwebview:
    git:
      url: https://github.com/MSOB7YY/flutter_inappwebview
      path: flutter_inappwebview

Screenshots or Videos

image
image

To Do

  • double check the original issue to confirm it is fully satisfied
  • add testing notes and screenshots in PR description to help guide reviewers
  • request the "UX" team perform a design review (if/when applicable)

@probot-autolabeler probot-autolabeler bot added android iOS linux Linux platform macOS macOS platform platform_interface Platform Interface plugin flutter_inappwebview plugin web windows Windows platform labels Mar 12, 2025
@sabikrahat
Copy link

Thank you. This solution works for me.

@lsaudon
Copy link

lsaudon commented May 28, 2025

This solution works for me too.
Thank you, @MSOB7YY.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android iOS linux Linux platform macOS macOS platform platform_interface Platform Interface plugin flutter_inappwebview plugin web windows Windows platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants