Infinite build / hanging build issue, fastlane sh & envman

Hello,

Since yesterday my builds keep running for hours and hours without finishing.
It seems that bitrise has some issues.

Can you check it ?

Hi @William,

No known issues, and no significant change either.

Can you please copy paste the build(s)'s Bitrise.io url? We’ll check it asap!

Thank you @viktorbenei

This build was running for more than 900m

Where do you see 900 mins? I checked the build (from admin console which lists meta infos of builds, e.g. time of start & finish, similar data as the one you can get via the API) and this is what I can see: "build_started":"2017-11-30T16:51:20.000Z","build_finished":"2017-11-30T17:52:53.000Z"

It seems the build ran for 60 mins / 3600 seconds, and that seems right as that’s the limit of your subscription.

Do you have any other build which had the same issue? Can you link at least one more?

Here is the same build I have started yesterday.

Here is another one Bitrise - Mobile Continuous Integration and Delivery - iOS & Android Build Automation

This a command from my fastfile.

$ envman add --key FASTLANE_SCHEME --value ${FASTLANE_SCHEME}

It always stops there. Maybe the issue is coming from there.

You see 900 mins because there’s an issue loading the build list (red warning right above the top build). This also implies that the frontend can’t determine what’s the status of the build and so it considers it as “not stopped”. Fix is simple, please reload the page :slight_smile: In short this can happen if e.g. you sleep your Mac while this page is open, and we deploy a change in the meantime which affects how the frontend and backend communicates, so when you wake your Mac, unless you reload the page, the frontend won’t be able to load the build (list) data. A simple page reload fixes this (loads the new frontend code).

Re the hanging:

Did you try to remove this? Does that help?

Thank you @viktorbenei

The problem is that I need that env variable value.
Maybe it is an issue with envman. The fastfile hasn’t changed.
It was working yesterday morning.

I will find a solution.

Thank you !

We don’t know any issues related to envman, it’s more likely how you run it from fastlane. But definitely worth a try to remove it, just to see if that solves the hang issue / to try to narrow down the code which causes the issue.

E.g. depending on how you specify (or not specify) the fastlane version for your project it might be that yesterday you used an older fastlane version and a newer one introduced a bug / regression.

Just checked your log and indeed you don’t specify any version for fastlane but you have the “update to latest” option enabled, meaning every build will try to use the latest fastlane version:

- UpdateFastlane: true

e[34;1mExpand WorkDire[0m
e[32;1mExpanded WorkDir: /Users/vagrant/gite[0m

e[34;1mDetermine desired Fastlane versione[0m
Checking Gemfile.lock (/Users/vagrant/git/Gemfile.lock) for fastlane gem
Gemfile.lock does not exist

e[34;1mUpdate system installed Fastlanee[0m
e[32;1m$ gem "install" "fastlane" "--no-document"e[0m
Successfully installed tty-screen-0.6.3
Successfully installed fastlane-2.68.0
2 gems installed

e[34;1mFastlane version:e[0m
e[32;1m$ fastlane "--version"e[0m
fastlane installation at path:
/usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.68.0/bin/fastlane
-----------------------------
fastlane 2.68.0

If you want to specify the fastlane version please see this #how-to guide: How to use a specific version of fastlane?

Thank you @viktorbenei

The issue was coming from the latest version of fastlane 2.68.0

On the 2.67.0 I don’t have that.

1 Like

Glad to hear that helped! :slight_smile: If you have some time you could report this on fastlane’s tracker, that they have a regression vs 2.67; most likely related to the shell action (I guess that’s what you use for running envman from fastlane).

Ok I will. Thank you for your time.

1 Like

One more thing, this was reported by a user who had the same issue with the latest fastlane & envman:

use system instead of sh:

My first attempt at it was just to do: sh "envman --key \"KEY\" --value \"VALUE\"" in the fastlane script. What I found was that the fastlane script got stuck on that line and never completed nor gave an error.

I then tried to offload environment setting to standard ruby function with the following code system("envman --key \"KEY\" --value \"VALUE\"") and it WORKED! The environment variables show up in following steps.

Superb ! I will try it soon then thanks !

1 Like

Hello @viktorbenei,

Excellent ! It works thank you for your help.

1 Like

Thanks for reporting @William! :wink: