could not connect to TCP port 5554: Connection refused

See original GitHub issue

Hello

I have an error when I try to start an emulator. My workflow is

name: Generate screenshots

on: [pull_request]

jobs:
  screenshots:
    name: Generate screenshots
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v2

     - name: Set up JDK 11
        uses: actions/setup-java@v2
        with:
          distribution: 'adopt'
          java-version: '11'
      - name: Cache Gradle packages
        uses: actions/cache@v2.1.6
        with:
          path: |
            ~/.gradle/caches
            .gradle
          key: ${{ runner.os }}-gradle-quality-${{ hashFiles('**/*.gradle.kts') }}
          restore-keys: |
            ${{ runner.os }}-gradle-quality-
      - name: Cache Gradle wrapper
        uses: actions/cache@v2.1.6
        with:
          path: ~/.gradle/wrapper
          key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
          restore-keys: |
            ${{ runner.os }}-gradle-wrapper-
      - uses: actions/setup-ruby@v1
        with:
          ruby-version: '2.6'
          bundler-cache: true
      - name: create AVD
        uses: reactivecircus/android-emulator-runner@v2
        with:
          api-level: 28
          target: default
          arch: x86
          profile: Nexus 6
          emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
          disable-animations: true
          script: echo "Generated AVD."

and the error

/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 emu kill
error: could not connect to TCP port 5554: Connection refused
The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
Error: The process '/bin/sh' failed with exit code 1

Thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:31 (8 by maintainers)

github_iconTop GitHub Comments

8reactions
abdullahceylancommented, Sep 15, 2022

I have just met this issue and noticed that it was happening due to the hanging ADB server. Mine has been solved by running the following commands:

adb kill-server

adb start-server

8reactions
alizeeccommented, Jun 28, 2021

It doesn’t work with API 30 though, we have the same error with API 30

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not connect to TCP port: Connection refused when ...
Just had the same issue with Expo. Here is what fixed it for me: Check for a process that uses port 5555 (Terminal)...
Read more >
Is it possible to connect to Android emulators running on ...
A small caution: if you use port 5555 for the local port, adb will think that the emulator is running locally on Windows....
Read more >
Port 5554 (tcp/udp)
Trojan runs a FTP server on port 5554 on infected systems and attempts to connect to random IPs on TCP port 445. If...
Read more >
TCP error code 10061: No connection could be made ...
Generally, it happens that something is preventing a connection to the port or hostname. Either there is a firewall blocking the connection or...
Read more >
Send emulator console commands
Note: The emulator listens for connections on ports 5554 to 5585 and ... connect to address ::1: Connection refused Trying 127.0.0.1.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found