Skip to content

chore: bump flutter_webrtc to 1.6.2+hotfix.2 - #1203

Merged
hiroshihorie merged 1 commit into
mainfrom
hiroshi/flutter-webrtc-1.6.2-hotfix.2
Sep 14, 2026
Merged

chore: bump flutter_webrtc to 1.6.2+hotfix.2#1203
hiroshihorie merged 1 commit into
mainfrom
hiroshi/flutter-webrtc-1.6.2-hotfix.2

Conversation

@hiroshihorie

Copy link
Copy Markdown
Member

Bumps the exact flutter_webrtc pin to 1.6.2+hotfix.2 (published today) and updates pubspec.lock, which was still resolving 1.6.0.

Picks up the Darwin fix for MissingPluginException on peer connection dispose, Android data channel handler cleanup, and the Windows/Linux disposal crash fix. WebRTC-SDK pod stays at 150.7871.01 on both sides.

Supersedes #1195.

🤖 Generated with Claude Code

Picks up the Darwin fix that releases the peer connection event channel
handlers on dispose instead of close, which removes the
MissingPluginException for cancel on FlutterWebRTC/peerConnectionEvent
seen on every full reconnect, plus the Android data channel handler
cleanup and the Windows and Linux disposal crash fix.

The WebRTC-SDK pod pin is unchanged at 150.7871.01 on both sides. The
lock file was still resolving 1.6.0 and now follows the pubspec.
@hiroshihorie
hiroshihorie marked this pull request as ready for review September 14, 2026 14:45

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread pubspec.yaml

# Fix version to avoid version conflicts between WebRTC-SDK pods, which both this package and flutter_webrtc depend on.
flutter_webrtc: 1.6.2+hotfix.1
flutter_webrtc: 1.6.2+hotfix.2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Desktop teardown leaks peer connections

On Windows and Linux, flutter_webrtc now requires disposal before close, but Transport keeps the reverse order. The first close removes the native lookup entry, so disposal cannot release its observer. Each teardown retains a peer connection and observer, accumulating native resources across reconnects.

Learn more

The upgraded desktop implementation splits teardown across two platform calls. peerConnectionDispose closes the native connection while its observer remains alive, unregisters that observer, and leaves the connection map entry for peerConnectionClose to remove. Transport disposal sends those calls in the opposite order. The first call removes the map entry, so the second call returns without reaching observer teardown. The observer owns a reference to the native peer connection, leaving both allocated.

Example: A Windows client reconnects ten times. Each old publisher and subscriber transport calls close() before dispose(). All twenty native observers and their peer connections remain retained instead of being released.

Recommended fix: Reverse the calls in Transport so it awaits pc.dispose() before pc.close() on the affected implementation. Verify this ordering on every supported platform, then add a Windows/Linux teardown regression that exercises the SDK's actual Transport sequence.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@hiroshihorie
hiroshihorie merged commit 12ec8ef into main Sep 14, 2026
15 checks passed
@hiroshihorie
hiroshihorie deleted the hiroshi/flutter-webrtc-1.6.2-hotfix.2 branch September 14, 2026 15:12
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.

1 participant