Github actions: meteor build command failing/hanging in Windows environment. Fine for macOS and Ubuntu

As posted here: community · Discussions · GitHub

I’m trying to build a meteor package with Github actions. It works fine on macOS and Ubuntu but hangs indefinitely or sometimes skips without error when building on Windows. For example, here the Windows package is empty:

https://github.com/HaveAGitGat/Tdarr/actions/runs/37892246

Other times it hangs forever. If I cancel it I can sometimes see the error:

https://github.com/HaveAGitGat/Tdarr/runs/440053389?check_suite_focus=true

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

1: node_module_register

2: v8::internal::FatalProcessOutOfMemory

3: v8::internal::FatalProcessOutOfMemory

4: v8::internal::Factory::NewFixedArray

5: v8::internal::Dictionary<v8::internal::SeededNumberDictionary,v8::internal::SeededNumberDictionaryShape>::AtPut

6: v8::internal::HashTable<v8::internal::SeededNumberDictionary,v8::internal::SeededNumberDictionaryShape>::IsKey

7: v8::internal::HashTable<v8::internal::SeededNumberDictionary,v8::internal::SeededNumberDictionaryShape>::IsKey

8: v8::internal::LookupIterator::ApplyTransitionToDataProperty

9: v8::internal::JSReceiver::class_name

10: v8::internal::SourcePositionTableIterator::Advance

11: v8::internal::SourcePositionTableIterator::Advance

12: 000000109CD843C1

Any idea on why this is happening?

The Windows build is created fine when running on a local machine.

3 Likes

Would you mind to include the action workow yaml content here?

Hi, here’s the Windows build:

name: Build bundles
on: [push]

jobs:
  Build_win:
    name: Build ${{ matrix.os }}
    runs-on: ${{ matrix.os }}


          # --------------------BEGIN WINDOWS BUILD-----------------------


    strategy:
      matrix:
        os: [windows-2019]
        node-version: [8.x]

    steps:
      - name: Checkout
        uses: actions/checkout@v2



      - name: Setup node enviroment
        uses: actions/setup-node@v1.1.2
        with:
          node-version: ${{ matrix.node-version }}

      - name: Install Meteor
        run: |
          choco install meteor -y
          echo ::add-path::C:\Users\runneradmin\AppData\Local\.meteor
      
      - name: Initialize NPM & build

        run: |
          npm install --production
          meteor build --server localhost:8265 --directory .\tdarr-${{ matrix.os }}
      - name: Pack ${{ matrix.os }}.zip
        run: |
            mkdir .\out
            7z a -r .\out\tdarr-${{ matrix.os }}.zip .\tdarr-${{ matrix.os }}
      - name: Upload tdarr-${{ matrix.os }}.zip
        uses: actions/upload-artifact@v1
        with:
          name: tdarr-${{ matrix.os }}
          path: .\out

Is the NPM and Node setup really necessary? Especially the fixed node version (8.x) may not be suitable with the choco install (which pulls the latest 1.9 here?)

Maybe you try an experimental build without any node environment at all and just install Meteor and use the internal node/npm just to be safe it’s not because of any environment interfering here.

Unfortunately that has not made a difference. Node 12 is used as default and it still hangs when building for Windows.