fix(session): eliminate memory leak in session managers - #53
Merged
Merged
Conversation
@testplane/devtools
eslint-plugin-wdio
@wdio/allure-reporter
@wdio/appium-service
@wdio/browser-runner
@wdio/browserstack-service
@wdio/cli
@wdio/concise-reporter
@testplane/wdio-config
@wdio/cucumber-framework
@wdio/dot-reporter
@wdio/firefox-profile-service
@wdio/globals
@wdio/jasmine-framework
@wdio/json-reporter
@wdio/junit-reporter
@wdio/lighthouse-service
@wdio/local-runner
@testplane/wdio-logger
@wdio/mocha-framework
@testplane/wdio-protocols
@testplane/wdio-repl
@wdio/reporter
@wdio/runner
@wdio/sauce-service
@wdio/shared-store-service
@wdio/smoke-test-cjs-service
@wdio/smoke-test-reporter
@wdio/smoke-test-service
@wdio/spec-reporter
@wdio/static-server-service
@wdio/sumologic-reporter
@wdio/testingbot-service
@testplane/wdio-types
@testplane/wdio-utils
@wdio/webdriver-mock-service
@testplane/webdriver
@testplane/webdriverio
commit: |
DudaGod
marked this pull request as ready for review
September 24, 2026 10:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I backported webdriverio#14972 to make session managers register and remove event listeners with the same function references. This prevents listeners from accumulating across session reloads and deletion.
I preserved the fork-specific ContextManager behavior while resolving the upstream conflicts: the disabled classic/BiDi result listener remains disabled, and its test reflects the listeners that are actually registered by this fork.
This change intentionally does not handle failures inside the asynchronous navigationStarted listener. I verified separately that the getTree unhandled-rejection scenario still reproduces on top of this backport; that behavior will be addressed in a follow-up.
Upstream: webdriverio#14972
Checks: