expo-cli icon indicating copy to clipboard operation
expo-cli copied to clipboard

Stop packager when building/publishing in non-interactive mode

Open MaaKut opened this issue 7 years ago • 6 comments

Description

I'm trying to build or publish the Expo-based application in non-interactive mode (required for CI/CD) like this:

npx expo build:android --non-interactive or npx expo publish --non-interactive

The problem: packager is started automatically and does not terminate on build completion, keeping the process running.

Expected Behavior

It is expected, that once build/publish is complete, the packager also stops and the whole process terminates.

Observed Behavior

The packager keeps running. This makes CI/CD think that the respective step has stalled, so it terminates the build process on timeout.

Environment

    System:
      OS: Windows 7
    Binaries:
      Yarn: 1.9.4 - C:\Users\akiselev\AppData\Roaming\npm\yarn.CMD
      npm: 6.8.0 - C:\Program Files\nodejs\npm.CMD
    IDEs:
      Android Studio: Version  3.3.0.0 AI-182.5107.16.33.5199772```

MaaKut avatar May 22 '19 07:05 MaaKut

Hey @MaaKut, could you try passing --max-workers 1 to expo publish? That's the suggested use in our Setting Up CI guide

Let me know if that works! Charlie

cruzach avatar May 28 '19 21:05 cruzach

Hello, @cruzach , thank you for looking into this.

could you try passing --max-workers 1 to expo publish?

I've tried npx expo publish --max-workers 1 --non-interactive - same result, the process keeps on running.

MaaKut avatar May 29 '19 10:05 MaaKut

Hey @MaaKut,

Does the packager complete successfully and not report that it completed or is it hanging during the publish process?

I'm trying to determine if I have a similar issue with expo publish and CI/CD or a new issue where the packager hangs (and never completes at all).

Exoshale avatar Jun 12 '19 19:06 Exoshale

Hi, @Exoshale ,

It does look like the packager publishes my project successfully (at least, I can seen the changes on the devices), but after that it just keeps waiting for something until I Ctrl+C it.

MaaKut avatar Jun 13 '19 10:06 MaaKut

Same happens here, it's really hard to make a CI script working properly... Thanks

nemenos avatar Aug 06 '19 07:08 nemenos

hello! i'm taking over on expo-cli while @fson is away on pat leave. i believe this issue is resolved, i just ran expo publish --non-interactive and it worked as expected. if this is not the case please create a new issue then let me know more info

brentvatne avatar Dec 08 '19 01:12 brentvatne