Skip to content

fix: guard after_session hook and avoid duplicate newCommandTimeout capability - #270

Merged
KazuCocoa merged 2 commits into
appium:masterfrom
hoanle0126:fix/safe-console-hook-and-command-timeout
Oct 28, 2026
Merged

KazuCocoa merged 2 commits into
appium:masterfrom
hoanle0126:fix/safe-console-hook-and-command-timeout

Conversation

@hoanle0126

Copy link
Copy Markdown
Contributor

Proposed changes

  • Remove existing pry_load_appium_txt and reload singleton methods on Pry before redefining them in Appium::Console.setup to avoid method redefined warnings.
  • Replace any existing 'Release session hook' :after_session hook before registering it in Appium::Console.start, and guard x with respond_to?(:x, true) so the :after_session hook does not raise NameError if a session failed to start or promote driver methods.
  • Check for both :newCommandTimeout and :'appium:newCommandTimeout' in lib/start.rb before injecting the default newCommandTimeout: 999_999 capability.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@hoanle0126
hoanle0126 requested a review from KazuCocoa as a code owner October 26, 2026 08:43
Comment thread test/console_test.rb
@KazuCocoa
KazuCocoa merged commit 6b45836 into appium:master Oct 28, 2026
2 checks passed
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.

2 participants