# Internal error: failed to create or connect to the perfect build environment

**URL:** https://discuss.bitrise.io/t/internal-error-failed-to-create-or-connect-to-the-perfect-build-environment/5185
**Category:** Builds
**Tags:** android
**Created:** [May 25, 2018, 8:37am UTC](https://discuss.bitrise.io/t/internal-error-failed-to-create-or-connect-to-the-perfect-build-environment/5185 "2018-05-25T08:37:46Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![p.val](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/p.val/32/1506_2.png) [@p.val](https://discuss.bitrise.io/u/p.val)
#### Post date: [May 25, 2018, 8:37am UTC](https://discuss.bitrise.io/t/internal-error-failed-to-create-or-connect-to-the-perfect-build-environment/5185/1 "2018-05-25T08:37:46Z")

</div>

# Problem definition

Today our team started to face the issues with Bitrise builds. It’s reproductive for each workflow and GitHub branch we tried so far.

It looks like long preparation process for starting the flow (around 20-25 min) then the build fails in an aborted state. Once the current build gets aborted previously aborted build gets restarted and fails again (falling in the aborted state). It’s kind of an infinite loop of aborting-restarting.

The error I see is **"Internal error: failed to create or connect to the perfect build environment. Don’t worry, build should restart soon."**

I can’t attach logs because there is no logs (the build even not starting) but I can share the **build parameters** :  
`{"commit_hash":"6xxx8","commit_message":"Merge pull request #xxx from xxx/dev\n\nRC","tag":"x.x.x","diff_url":"","commit_paths":[]}`

## Environment

**Where did the issue happen?**

Android & Docker, on Ubuntu 16.04

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

It happens right after “Preparation” step.

## Reproducibility

- _Does a “Rebuild” help?_ – **NO**
- _Does a rebuild without caches help?_ – **NO**
- _Does the issue happen sporadically, or every time?_ – **every time**.
- _Does upgrading the build Step to the latest version help?_ – **build never reach the build steps**.
- _When did the issue start?_ – **4h ago**.

### Local reproduction

No, it starts fine via CLI.

### Local reproduction: Linux / Android (docker based) stack builds

No, it starts fine via CLI.

## Build log

There is no log. Build never started.

---

<div class="post-metadata">

### Author: ![koral](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/koral/32/357_2.png) [@koral](https://discuss.bitrise.io/u/koral)
#### Post date: [May 25, 2018, 9:13am UTC](https://discuss.bitrise.io/t/internal-error-failed-to-create-or-connect-to-the-perfect-build-environment/5185/2 "2018-05-25T09:13:39Z")

</div>

It is a known issue: [https://status.bitrise.io/incidents/01knc34mqs21](https://status.bitrise.io/incidents/01knc34mqs21)

---

<div class="post-metadata">

### Author: ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)
#### Post date: [May 25, 2018, 9:34am UTC](https://discuss.bitrise.io/t/internal-error-failed-to-create-or-connect-to-the-perfect-build-environment/5185/3 "2018-05-25T09:34:56Z")

</div>

Indeed, sorry for the inconvenience here as well. We’re working as fast as possible to resolve the issue. Right now we believe we now identified the issue & how to fix it, part of the production system is already refreshed and remained stable, waiting for the update to roll out to all parts of the Linux/Android worker system. Again, sorry about the issue, and please follow our status page ([https://status.bitrise.io/incidents/01knc34mqs21](https://status.bitrise.io/incidents/01knc34mqs21)) for updates, we’ll publish updates as we progress!

---

<div class="post-metadata">

### Author: ![PSchu](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@PSchu](https://discuss.bitrise.io/u/PSchu)
#### Post date: [June 4, 2018, 9:14am UTC](https://discuss.bitrise.io/t/internal-error-failed-to-create-or-connect-to-the-perfect-build-environment/5185/4 "2018-06-04T09:14:59Z")

</div>

We have currently the same Problem. It started today 4th June at around 10:20 for us.

---

<div class="post-metadata">

### Author: ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)
#### Post date: [June 4, 2018, 9:36am UTC](https://discuss.bitrise.io/t/internal-error-failed-to-create-or-connect-to-the-perfect-build-environment/5185/5 "2018-06-04T09:36:32Z")

</div>

@PSchu let’s continue on the onsite chat, I saw you wrote to us there - your issue is not related to this incident. Sorry for the inconvenience.

---

<div class="post-metadata">

### Author: ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)
#### Post date: [June 4, 2018, 9:38am UTC](https://discuss.bitrise.io/t/internal-error-failed-to-create-or-connect-to-the-perfect-build-environment/5185/6 "2018-06-04T09:38:51Z")

</div>


