UnknownHostException

Bitrise Build Issue Report template

Description of the issue

I try to build an older project. At the gradle Step “assembleDebug” I get a strange UnknownHostException

I have no idea whats the problem. Can you please give me a hint where to look?

Please describe the issue here

Environment:

Where did the issue happen?

Android 20.4 Stack

Which build Step causes the issue and which version of the step?

Gradle

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) :NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • Does the issue happen sporadically, or every time? : every time
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : few days ago
1 Like

we have the same issue in every our builds! please fix this asap

FAILURE: Build failed with an exception.

  • What went wrong:

java.net.UnknownHostException: prd-20-04-use1c-220208153323-viwppv3ctmy37dga8sxhqi: prd-20-04-use1c-220208153323-viwppv3ctmy37dga8sxhqi: Temporary failure in name resolution

prd-20-04-use1c-220208153323-viwppv3ctmy37dga8sxhqi: prd-20-04-use1c-220208153323-viwppv3ctmy37dga8sxhqi: Temporary failure in name resolution

started few days ago. i have no idea what cause this failure. the project builds quite fine localy. only fails in bitrise. thank you for help

I can confirm the issue, although it doesn’t seem to occur on every node.

We receive an error while triggering Appium tests for iOS and Android on BrowserStack. The tests sometimes run through, but don’t most of the time.

org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Original error: hub-cloud.browserstack.com: nodename nor servname provided, or not known

Working:

Agent version:	1.36.1
Hostname:	vm-osx-xcode-13.1.x-standard-7112748f-fbe4-4f1f-b83e-40ec1804256f
Nodename:	LAS1-vFW01-gen2-mmg4-10-92-231-162

Not working:

Agent version:	1.36.1
Hostname:	vm-osx-xcode-13.1.x-standard-d147961b-e334-4fff-962a-8752d56cbed8
Nodename:	LAS1-vFW01-gen2-mmg4-10-92-231-138

Yes, we have been facing the same issue for one of our workflows. The workflow executes appium tests on browserstack. It is intermittent though.

org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Original error: hub-cloud.browserstack.com

To my understanding, this is some issue with bitrise network/connectivity.

There are two possibilities. Either remote driver/appium server shuts down during the test execution OR bitrise stops communicating with the remote driver/appium server residing on browserstack machines due to blip in connectivity.

If it was the former possibility, it would have returned: Connection refused error

And because I have reproduced this on my local machine by disconnecting my wifi during the test execution, so I am quite sure to say that this happens because of network disconnection.

@Bitrise: is there any solution for this? This board is useless

Hey everyone,

Apologies for ignoring this issue here until now. We’re investigating this one based on direct reports we’ve received earlier and making a combined effort to improve network stability in this regard. Please keep the reports coming, it helps highlight the significance of it, and the having access to more build logs to investigate can only help, so please do send us your logs about this issue!

dont want to close this topic - is there any progress/solution?

This is also failing here for a new build on an old project (prior last build April 2021)
Steps are all up to date

Task :app:packageAppLiveDebug

Task :app:assembleAppLiveDebug

FAILURE: Build failed with an exception.

  • What went wrong:

java.net.UnknownHostException: prd-20-04-usc1b-220309133144-sny9nhmtmjrqxdjxrupapg: prd-20-04-usc1b-220309133144-sny9nhmtmjrqxdjxrupapg: Name or service not known

prd-20-04-usc1b-220309133144-sny9nhmtmjrqxdjxrupapg: prd-20-04-usc1b-220309133144-sny9nhmtmjrqxdjxrupapg: Name or service not known

  • Try:

Run with --info or --debug option to get more log output.

Run with --scan to get full insights.

  • Exception is:

org.gradle.api.UncheckedIOException: java.net.UnknownHostException: prd-20-04-usc1b-220309133144-sny9nhmtmjrqxdjxrupapg: prd-20-04-usc1b-220309133144-sny9nhmtmjrqxdjxrupapg: Name or service not known

at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:62)

at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:41)

at org.gradle.internal.build.event.DefaultBuildEventsListenerRegistry$AbstractListener.close(DefaultBuildEventsListenerRegistry.java:180)

at org.gradle.internal.concurrent.CompositeStoppable$2.stop(CompositeStoppable.java:90)

at org.gradle.internal.concurrent.CompositeStoppable.stop(CompositeStoppable.java:106)

at org.gradle.internal.build.event.DefaultBuildEventsListenerRegistry$ListenerCleanup.buildFinished(DefaultBuildEventsListenerRegistry.java:255)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)

at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)

at org.gradle.internal.event.DefaultListenerManager$ListenerDetails.dispatch(DefaultListenerManager.java:464)

at org.gradle.internal.event.DefaultListenerManager$ListenerDetails.dispatch(DefaultListenerManager.java:446)

at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:61)

Hey @Bitce is this issue resolved? We have reported this while ago and still seeing the same error Caused by: java.net.UnknownHostException: hub-cloud.browserstack.com: nodename nor servname provided, or not known when we run the jobs for iOS and Android in Bitrise. Our company has reported this issue from 4 months ago and nothing has been fixed so far.

Hey folks, unfortunately issue is unfortunately still ongoing. As mentioned it would be really helpful to receive some direct reports, specifically URL for builds that experience the error where we could be granted Support User access.

We would also request anyone experiencing this issue to run this line in a Script step prior:

networksetup -setv6off Ethernet

And report back their experiences if possible!

Hey @bitce , any update on the above issue? It’s a blocker for us now, we cannot run automation tests as part of our CD/Ci pipeline. Do you mind prioritising this issue? Thanks in adavnce!

Hey everyone,

As we’re still deep into working on solutions for this problem, thought I’d share a possible workaround that could help people experiencing this.

It’s not ideal and not a long term answer, but it might give you more success until we can investigate more. You can add this line in a script Step just before running your tests:

host hub-cloud.browserstack.com | grep address | awk '{print $4 "\t\thub-cloud.browserstack.com"}' | sudo tee -a /etc/hosts

This adds a static IP entry to the hosts file that Java should continue to query if those remote DNS lookups start to fail.

Let us know your experiences and toughts.

2 Likes