Gitlab CI hangs on publish

I have an issue in my Gitlab CI setup. Here is my .gitlab-ci.yml file:

image: jdruwe/alpine-node-git:latest

variables:
  DOCKER_DRIVER: overlay

stages:
  - publish

publish-develop:
  stage: publish
  script:
  - npm install
  - npm i -g exp
  - exp login -u $EXPO_USERNAME -p $EXPO_PASSWORD
  - exp publish --release-channel develop

The ‘exp login’ command works fine but it seems to hang on the publish command, this is what I keep seeing (it never proceeds):

I’ve no idea why this is happening, there is also no logging for me to look into it seems. Any help would be appreciated!

Someone in this post Exp publish and CI - #9 by atinder90 noted the following:

I figured my issues out. Basically I had a docker containing that was running on port 80 which was causing the packager to report that one is already running.

Is this causing my issue?

NOTES:

  • I also get the warning on my local machine but the publish does start afterwards with Starting Metro Bundler on port 19001. …
  • Setting max-workers to 1 did not change a thing
  • Timeout after 1 hour, no logging

Hey! Could you try passing --max-workers 1 to exp publish? It limits the number of workers used by Metro bundler, which is known to cause issues with some CI servers that report a higher number of CPU cores than the build processes actually have available.

1 Like

Setting max-workers to 1 did not help, same result.

hi @jdruwe, the next step in the publish process would be
11:46:46 [exp] Starting Metro Bundler on port 19001.
Maybe check that theres nothing on port 19001?

I get the following response if I check if the port is in use:

$ lsof -i:19001
1 /bin/busybox pipe:[60704]
1 /bin/busybox pipe:[60705]
1 /bin/busybox pipe:[60706]
6 /bin/busybox pipe:[61924]
6 /bin/busybox pipe:[60705]
6 /bin/busybox pipe:[60706]

Any idea? Do I need to expose the port in the Dockerfile of my image? I am using the following docker image: Docker Hub

UDPATE:

I switched to the following image → Docker Hub. Gitlab ci line: image: node:9.11.1 Any idea why the alpine image was not working?

It now hangs on Metro Bundler ready:

Am I doing something wrong?

UPDATE:

I removed my custom port from the packagerOpts object. It now works, is this a known issue that a custom port prevents an app from publishing?

It stopped working again…

UPDATE: Apparently bash was missing so I added it to my base image and it now works:

FROM mhart/alpine-node:9.11.1
RUN apk add --no-cache git
RUN apk add --no-cache bash

2 Likes

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