mobile-dev-inc / maestro

Painless Mobile UI Automation
https://maestro.mobile.dev/
Apache License 2.0
5.79k stars 270 forks source link

[1.27.0] idb_companion is not able dispatch successful tap events #1076

Closed retyui closed 1 year ago

retyui commented 1 year ago

Describe the bug

I did idb installation:

brew tap facebook/fb
brew install idb-companion

but the test run failed:

$HOME/.maestro/bin/maestro studio

Running on iPhone 13 mini E2E - iOS 15.2 - B50C5B6D-EC2D-4C93-8184-A47983766D4E
Waiting for idb service to start..
Waiting for Simulator to boot..
Waiting for successful taps

java.lang.IllegalStateException: idb_companion is not able dispatch successful tap events
    at maestro.LocalIdbRunner.start(LocalIdbRunner.kt:77)
    at ios.idb.IdbIOSDevice.restartCompanion(IdbIOSDevice.kt:87)
    at ios.idb.IdbIOSDevice.<init>(IdbIOSDevice.kt:82)
    at maestro.cli.session.MaestroSessionManager.createIOS(MaestroSessionManager.kt:282)
    at maestro.cli.session.MaestroSessionManager.createMaestro(MaestroSessionManager.kt:156)
    at maestro.cli.session.MaestroSessionManager.access$createMaestro(MaestroSessionManager.kt:49)
    at maestro.cli.session.MaestroSessionManager$newSession$session$1.invoke(MaestroSessionManager.kt:81)
    at maestro.cli.session.MaestroSessionManager$newSession$session$1.invoke(MaestroSessionManager.kt:80)
    at maestro.cli.db.KeyValueStore.withExclusiveLock(KeyValueStore.kt:37)
    at maestro.cli.session.SessionStore.withExclusiveLock(SessionStore.kt:74)
    at maestro.cli.session.MaestroSessionManager.newSession(MaestroSessionManager.kt:80)
    at maestro.cli.command.StudioCommand.call(StudioCommand.kt:36)
    at maestro.cli.command.StudioCommand.call(StudioCommand.kt:18)
    at picocli.CommandLine.executeUserObject(CommandLine.java:1933)
    at picocli.CommandLine.access$1200(CommandLine.java:145)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2332)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2326)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2291)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2159)
    at maestro.cli.DisableAnsiMixin$Companion.executionStrategy(DisableAnsiMixin.kt:22)
    at picocli.CommandLine.execute(CommandLine.java:2058)
    at maestro.cli.AppKt.main(App.kt:125)

To Reproduce

run test on iOS

Expected behavior

work properly

Screenshots

...

Environment information (please complete the following information):

System:
    OS: macOS 11.6.8
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 278.24 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.21.2 - ~/.nvm/versions/node/v14.21.2/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.17 - ~/.nvm/versions/node/v14.21.2/bin/npm
    Watchman: 2023.02.06.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.12.0 - /Users/ankit/.rbenv/shims/pod
    Homebrew: 4.0.18 - /usr/local/bin/brew
    Maven: 3.9.0 - /usr/local/bin/mvn
    pip2: 18.1 - /usr/local/bin/pip2
    pip3: 23.0 - /usr/local/bin/pip3
    RubyGems: 3.4.6 - /Users/ankit/.rbenv/shims/gem
  Utilities:
    CMake: 3.25.2 - /usr/local/bin/cmake
    Make: 3.81 - /usr/bin/make
    GCC: 4.2.1 - /usr/bin/gcc
    Git: 2.32.0 - /usr/bin/git
    Clang: 13.0.0 - /usr/bin/clang
    FFmpeg: 5.1.2 - /usr/local/bin/ffmpeg
  Servers:
    Apache: 2.4.53 - /usr/sbin/apachectl
    Nginx: 1.23.3 - /usr/local/bin/nginx
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
    Android SDK:
      API Levels: 28, 29, 30, 31, 33
      Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.0, 30.0.1, 30.0.2, 30.0.3, 31.0.0, 33.0.0
      System Images: android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom, android-33 | Google APIs Intel x86_64 Atom
  IDEs:
    Android Studio: 4.2 AI-202.7660.26.42.7351085
    Nano: 2.0.6 - /usr/bin/nano
    Sublime Text: 3211 - /usr/local/bin/subl
    VSCode: 1.78.2 - /usr/local/bin/code
    Vim: 8.2 - /usr/bin/vim
    Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
  Languages:
    Bash: 3.2.57 - /bin/bash
    Java: 16.0.1 - /usr/bin/javac
    Perl: 5.30.2 - /usr/bin/perl
    PHP: 7.3.29 - /usr/bin/php
    Protoc: 3.21.12 - /usr/local/bin/protoc
    Python: 2.7.16 - /usr/bin/python
    Python3: 3.10.10 - /usr/local/bin/python3
    Ruby: 3.2.1 - /Users/ankit/.rbenv/shims/ruby
  Databases:
    SQLite: 3.32.3 - /usr/bin/sqlite3
  Browsers:
    Chrome: 113.0.5672.92
    Firefox: 110.0.1
    Safari: 15.6.1

Workspace (if applicable) Please share your workspace with Flow files and application binary if you are able to do so as that greatly helps in reproduction efforts.

Bugreport output (if applicable) The zip files created when maestro bugreport can be uploaded here as well if applicable.

Additional context Add any other context about the problem here.

BrandonYuen commented 1 year ago

Same on M1 here

BrandonYuen commented 1 year ago

@retyui I've fixed this by upgrading my OSX to Ventura 13.4.1 and my Xcode to 14.3.1.

retyui commented 1 year ago

me too

github-actions[bot] commented 3 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue. Thank you for helping keep us our issue tracker clean!