Skip to content

Conversation

@vdanti
Copy link
Contributor

@vdanti vdanti commented Dec 18, 2025

[ISSUE]

In the current codebase, a reverse tunnel is established (on real devices only) during the Wi-Fi proxy configuration:

image

However, this reverse tunnel is never cleared, causing it to remain active on the device even after the session ends. This leads to an accumulation of "zombie" tunnels, as shown in the adb reverse --list output below:

image

This list will continue to grow until the device is physically reconnected or the ADB server is restarted. This can eventually lead to port conflicts or connectivity issues in subsequent test sessions.

[SOLUTION]

Implement a new function removeReverseTunnel in adb.ts to remove the specific reverse tunnel matching the TCP port used during setup.

Integrate this cleanup logic into the deleteSession and onUnexpectedShutdown hooks in plugin.ts to ensure the device environment is restored to its original state, regardless of the test outcome.

@sudharsan-selvaraj
Copy link
Member

@vdanti Could you please resolve the conflicts?

@vdanti
Copy link
Contributor Author

vdanti commented Dec 22, 2025

Hello @sudharsan-selvaraj ,
yes sure.
Is it possible to merge PRs in creation order please?
#83 is rebased.
I gonna rebase this one.

@vdanti vdanti force-pushed the fix/master-remove-reverse-tunnel branch from a1b53f5 to b58a90d Compare December 22, 2025 08:42
@vdanti
Copy link
Contributor Author

vdanti commented Dec 22, 2025

Rebased ✅
Let's merge PR #83 first, ping me when it's ok so I I will rebase again this one.
Thanks

- Indentation
- Add new function removeReverseTunnel in adb.ts to correctly remove reverse tunnel when deleteSession and onUnexpectedShutdown hooks are triggered
@vdanti vdanti force-pushed the fix/master-remove-reverse-tunnel branch from b58a90d to 96d642e Compare December 23, 2025 13:36
@vdanti
Copy link
Contributor Author

vdanti commented Dec 23, 2025

Hello @sudharsan-selvaraj ,
PR rebased ✅

@saikrishna321 saikrishna321 merged commit 4ecd28d into AppiumTestDistribution:master Dec 24, 2025
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.

3 participants