Giter Site home page Giter Site logo

Comments (11)

astutesoftware avatar astutesoftware commented on August 23, 2024 3

Not resolved on windows at least even after installing 1.4.2

D:\data\maestro\maestro-1.4.2\bin>adb devices
List of devices attached
emulator-5554 device

D:\data\maestro\maestro-1.4.2\bin>maestro test twitter.yaml
java.lang.IllegalStateException: No devices found. Select a platform by passing --platform <android|ios> for more details
at maestro.cli.util.MaestroFactory.autoDetectPlatform(MaestroFactory.kt:68)
at maestro.cli.util.MaestroFactory.createMaestro(MaestroFactory.kt:33)
at maestro.cli.command.TestCommand.call(TestCommand.kt:58)
at maestro.cli.command.TestCommand.call(TestCommand.kt:30)
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 picocli.CommandLine.execute(CommandLine.java:2058)
at maestro.cli.AppKt.main(App.kt:74)

from maestro.

dmitry-zaitsev avatar dmitry-zaitsev commented on August 23, 2024 1

@neonfink I see, it appears that adbkey.pub is not actually needed, but we are still checking for it. While we are fixing it on our side, what should unblock you is this command:

touch ~/.android/adbkey.pub

from maestro.

dmitry-zaitsev avatar dmitry-zaitsev commented on August 23, 2024

Could you confirm that you have the following files in your ~/..android folder?

  • adbkey
  • adbkey.pub

from maestro.

neonfink avatar neonfink commented on August 23, 2024

@dmitry-zaitsev I got adbkey in my ~/.android, but not adbkey.pub 🤔

Unfortunately I'm not aware how / when the .pub one is expected to be generate though?

from maestro.

neonfink avatar neonfink commented on August 23, 2024

@dmitry-zaitsev it worked, thank you!

from maestro.

ColtonIdle avatar ColtonIdle commented on August 23, 2024

Came to the issue tracker to complain about the same issue.

adb devices shows my emulator. while trying to run a sample test with maestro maestro test sample_from_readme.yaml shows

java.lang.IllegalStateException: No devices found. Select a platform by passing --platform <android|ios> for more details

On a whim I tried touch ~/.android/adbkey.pub and re-ran the command and now it works.

magic!

from maestro.

dmitry-zaitsev avatar dmitry-zaitsev commented on August 23, 2024

Maestro 1.4.2 was released that addresses this issue

from maestro.

brookmg avatar brookmg commented on August 23, 2024

I am experiencing a similar issue with maestro version 1.7.0. adb devices returns the active device

List of devices attached
5200742a472c95e5	device

but maestro is throwing the exception. running maestro --platform android test ./app_open_test.yaml

java.lang.IllegalStateException: No android devices found.
	at maestro.cli.util.MaestroFactory.createAndroid(MaestroFactory.kt:51)
	at maestro.cli.util.MaestroFactory.createMaestro(MaestroFactory.kt:35)
	at maestro.cli.command.TestCommand.call(TestCommand.kt:58)
	at maestro.cli.command.TestCommand.call(TestCommand.kt:30)
	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 picocli.CommandLine.execute(CommandLine.java:2058)
	at maestro.cli.AppKt.main(App.kt:88)

The adbKey and adbKey.pub files are present in the ~/.android folder as well.

from maestro.

aakash1313 avatar aakash1313 commented on August 23, 2024

I still get this error on MAC :(

from maestro.

Bournegit avatar Bournegit commented on August 23, 2024

It worked for the first time but later got this error
java.lang.IllegalStateException: No devices found. Select a platform by passing --platform <android|ios> for more details at maestro.cli.util.MaestroFactory.autoDetectPlatform(MaestroFactory.kt:78) at maestro.cli.util.MaestroFactory.createMaestro(MaestroFactory.kt:34) at maestro.cli.command.TestCommand.call(TestCommand.kt:58) at maestro.cli.command.TestCommand.call(TestCommand.kt:30) 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 picocli.CommandLine.execute(CommandLine.java:2058) at maestro.cli.AppKt.main(App.kt:94)

from maestro.

vikingprank avatar vikingprank commented on August 23, 2024

Same here, starting my emulator on Windows, running adb -a -P 5037 nodaemon server in one PowerShell.

In the another PowerShell with WSL (ubuntu 22.04), I run:
adb devices List of devices attached emulator-5554 device, then
ls ~/.android adb.5037 adbkey adbkey.pub cache,
maestro --version 1.28.0
then export ADB_SERVER_SOCKET=tcp:192.168.1.33:5037 and finally:
maestro --host 192.168.1.33:5037 test /mnt/c/Users/xxx/My\ documents/xxx/xxx/mobile/e2e-tests/1-launch-app.yaml
and I get:

java.lang.IllegalStateException: No devices found.
at maestro.cli.session.MaestroSessionManager.selectDevice(MaestroSessionManager.kt:140)
at maestro.cli.session.MaestroSessionManager.newSession(MaestroSessionManager.kt:64)
at maestro.cli.session.MaestroSessionManager.newSession$default(MaestroSessionManager.kt:57)
at maestro.cli.command.TestCommand.call(TestCommand.kt:126)
at maestro.cli.command.TestCommand.call(TestCommand.kt:44)
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:136)

from maestro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.