Exp publish hangs on Building Android Bundle on CircleCI

I’m trying to run a CircleCI job that runs exp publish, but it hangs on [exp] Building Android bundle. The output gets all the way up to Building JavaScript bundle [] 100% and then hangs until CircleCI times the job out for not outputting anything for 10 minutes.

Running exp publish locally works fine.

I don’t think this is the same socket hang up issue that other people seem to be having, and the nonPersistent: true solution in app.json doesn’t resolve the issue. There’s no error message, just a 100%-built JS bundle and then it freezes.

Running exp publish -q on the CI doesn’t fix this; it still gets stuck on [exp] Building Android bundle indefinitely.

Not sure what to try next. Has anyone run into an indefinite hang like this?

4 Likes

Hi,
I have same issue. Issue came exactly after sdk version updated to 25.0.0 in our project.

Locally everything works fine.
At CircleCI exp publish hangs:
[exp] Building Android bundle

Building JavaScript bundle 100%Too long with no output (exceeded 20m0s)

CircleCI timeout have been increased to 20min and still same error.

Downgrade to SDK v24 fix the problem.

Try to use npx

npx exp publish

For us problem was solved.

Downgrading to SDK 24 also fixed it for me, thanks!

I’ll open a Github issue about this.

On CircleCI the number of available CPUs reported by the operating system is much larger than the number of CPUs actually reserved for the job. This can cause Metro (the bundler for React Native) to get stuck, when it launches too many workers.

In the latest exp version you can pass a --max-workers option to exp publish to manually set the number of workers. To run on CircleCI, could you upgrade to the latest exp and try

exp publish --max-workers 1

Please let us know, if that solves the issue!

Just tried it after updating to exp 50.x.x and it worked! Thank you!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.