-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Error: Connection Refused on Port 5554 #330
Comments
I met this problem just now. I think this line shows where it went wrong:
It is because not all combinations of system images are available in all API level. maybe check with avdmanager to see if android 33 + default + x86_64 exists or not. Or change it to another |
@dumbfingers this is not the only error, there are alot of other errors, I tried running an emulator with another api (26 for instance). The emulator launches, but because my app uses firebase, it gives the error:
I gave up on using this action for now until these 2 issues (booting the emulator and using firebase services) are solved. I already used all my account free minutes trying different configuartions but none of them work: newer api emulators (above 29) won't launch at all, and older ones which launch seem to now work with firebase push notifications. |
I had similar problems with the API 33 emulator and it turned out that jobs:
test:
runs-on: macos-latest
strategy:
matrix:
api-level: [21, 33]
target: [google_apis]
arch: [x86_64]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Gradle cache
uses: gradle/gradle-build-action@v2
- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.api-level }}
- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: ${{ matrix.arch }}
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: ${{ matrix.arch }}
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./gradlew connectedAndroidTest |
@proninyaroslav I have 2 questions:
|
@Haidar0096
|
@proninyaroslav |
@Haidar0096 @proninyaroslav After following your footsteps I was able to find what was causing the gradle error. This error occurs because the default Java version is - name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle |
@brandinooo98 dude what gradle exception? I am already setting up java to version 17:
But there are 2 errors, first, the emulator won't boot. And second, even if the emulator boots, firebase services fail to initialize, seems that setting |
* add tests again with permission * try fix - ReactiveCircus/android-emulator-runner#330 (comment) * add caching to speed things up * add target for cache creation * test cache and reporting * revert failing tests and fix typo
* add tests again with permission * try fix - ReactiveCircus/android-emulator-runner#330 (comment) * add caching to speed things up * add target for cache creation * test cache and reporting * revert failing tests and fix typo
* Adding Android build action for #6. * Adding Android UI Tests actions for #6 * updating java version from 11 to 17 to resolve build error: Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 11 for #6 * reverting to jdk11 for #6 due to build errors * accept android sdk license for #6 * accepted android sdk license, using jdk1.8 for #6 * change base image to linux ubuntu #6 * change base image to macos #6 * setup-android v2.0.10 #6 * remove manual sdk installer #6 * githubactions error: could not connect to TCP port 5554: Connection refused. ReactiveCircus/android-emulator-runner#330 (comment) * #6 added fix source for github action android emulator --------- Co-authored-by: Oladayo Salawu btcdev01 <btcdevops.developer01@btcserv.co.uk>
I have this workflow (nothing fancy or complicated, just some steps to setup java and flutter, then running the tests on the emulator)
when I run it, it sometimes succeed and sometimes fail with this error:
or with this error:
I searched alot before opening this issue, here and on google, and tried different solutions like restarting the adb and using a specific build for the emulator but it seems this action is not predictable, it still fails sometimes and succeeds sometimes even if I haven't changed the code at all. Is there something I can do to make sure it will always succeed?
The text was updated successfully, but these errors were encountered: