Skip to content

Workaround: grpc binary issue, when running inside GH Action

Ross Tang edited this page Dec 1, 2020 · 1 revision

Issue Disappears

Below issue disappears after upgrade Fabric V2.1, which runs with Nodejs v12; for grpc.

For bcrpyt, also disappears. Did not explore why.

=====ARCHIVED====

Issue Found

When using GitHub Actions, the default runner will be ubuntu latest (i.e. 18 LTS); this is default Nodejs v12. In order to pick the nodejs version, I use

      - name: Setup Node.js for use with action
        uses: actions/[email protected]
        with:
          node-version: '10.x'
          version: '10.x'

I found the even node --version return v10 correctly; the grpc binary build does not recognise, and will try obtain remote binary, based on v12. While the version number is part of the grpc binary filename, using incorrect nodejs version will make the binary file "not found" error.

Therefore, I need to rebuild "grpc", to tell the nodejs the right version, and right path.

npm rebuild grpc --target=12.0.0 --target_platform=linux --target_arch=x64 --target_libc=glibc

This situation may also happen to build gw-org* images. Or, happen to other binary libraries, e.g. bcrypt

Special Note

This issue reappear when GitHub Action upgrade the hosted docker; and here is fix/workaround I did. https://github.com/rtang03/fabric-es/issues/142