Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maestro Docker Environment : Unable to connect to host emulators . #2285

Closed
techsc0ut opened this issue Feb 4, 2025 · 2 comments
Closed

Comments

@techsc0ut
Copy link

Discussed in #2284

Originally posted by techsc0ut February 4, 2025
Hii there,

i was making a docker environment for maestro and also installed platform tools (adb), issue is i am able to list devices via adb installed in container, but when i try to use maestro command with same emulators i am unable to do so.

commands i am using :

root@docker-desktop:/mnt/testfiles# adb devices
List of devices attached
emulator-5554 device
emulator-5556 device
emulator-5558 device
emulator-5560 device

root@docker-desktop:/mnt/testfiles# maestro --verbose --device emulator-5554 test current.yaml
[ INFO] ---- System Info ----
[ INFO] Maestro Version: 1.39.2
[ INFO] CI: Undefined
[ INFO] OS Name: Linux
[ INFO] OS Version: 6.10.14-linuxkit
[ INFO] Architecture: amd64
[ INFO] Java Version: 17
[ INFO] Xcode Version: null
[ INFO] Flutter Version: Undefined
[ INFO] Flutter Channel: Undefined
[ INFO] ---------------------
Device emulator-5554 was requested, but it is not connected.

My Docker file :

`# Use a specific platform to avoid architecture issues
FROM --platform=linux/amd64 python:3.9-slim

Set Maestro version

ENV MAESTRO_VERSION=1.39.2

Ensure apt repositories are updated correctly and install required packages

RUN apt-get update && apt-get install -y
curl
unzip
openjdk-17-jre-headless
wget
android-tools-adb \
&& rm -rf /var/lib/apt/lists/*

Install Maestro CLI

RUN mkdir -p /opt/maestro &&
wget -q -O /tmp/${MAESTRO_VERSION}.zip "https://github.com/mobile-dev-inc/maestro/releases/download/cli-${MAESTRO_VERSION}/maestro.zip" &&
unzip -q /tmp/${MAESTRO_VERSION}.zip -d /opt/maestro &&
rm /tmp/${MAESTRO_VERSION}.zip

Add Maestro CLI to PATH

ENV PATH="/opt/maestro/maestro/bin:${PATH}"

WORKDIR /app

Keep container running

CMD ["tail", "-f", "/dev/null"]`

Copy link

linear bot commented Feb 4, 2025

@techsc0ut
Copy link
Author

Upgrading to latest version helped me resolved this issue

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

No branches or pull requests

1 participant