back2dos / travix

Travis helper.
The Unlicense
33 stars 12 forks source link

haxelib run travix js fails since today #120

Closed sebthom closed 4 years ago

sebthom commented 4 years ago

Since around three hours all my travis+haxe jobs are failing for the js target. It probably is related to the new pupeteer release that got published three hours ago and thus not travix's fault, but maybe you have an idea how to workaround this.

$ haxelib run travix js
> npm i --save-dev puppeteer http-server-legacy
> puppeteer@3.0.0 install /home/travis/build/xyz/foobar/bin/js/node_modules/puppeteer
> node install.js
(node:4005) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
    at promisify (internal/util.js:214:11)
    at Object.<anonymous> (/home/travis/build/xyz/foobar/bin/js/node_modules/extract-zip/index.js:11:18)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/travis/build/xyz/foobar/bin/js/node_modules/puppeteer/lib/BrowserFetcher.js:21:17)
(node:4005) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:4005) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN ws@7.2.3 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.2.3 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN js No description
npm WARN js No repository field.
npm WARN js No license field.
+ http-server-legacy@0.11.1
+ puppeteer@3.0.0
added 76 packages from 106 contributors and audited 109 packages in 5.13s
found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
build-js.0
> haxe -js bin/js/tests.js --macro addGlobalMetadata("js.Boot.HaxeError", "@:expose('HaxeError')") -lib travix -lib foobar tests.hxml
> node bin/js/run.js
internal/util.js:214
    throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function');
    ^
TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
    at promisify (internal/util.js:214:11)
    at Object.<anonymous> (/home/travis/build/xyz/foobar/bin/js/node_modules/extract-zip/index.js:11:18)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/travis/build/xyz/foobar/bin/js/node_modules/puppeteer/lib/BrowserFetcher.js:21:17)
The command "haxelib run travix js" exited with 1.
back2dos commented 4 years ago

Yeah, noticed it too. They've ditched nodejs@8 support, so you probably wanna bump it to v12.

Perhaps we should alter travix to install puppeteer@2 though, since currently none of the "new" features are super useful.

sebthom commented 4 years ago

I have the same issue with nodejs 12, so I doubt this is the reason. Maybe some transitive dependency issues between puppeteer and http-server-legacy. I am testing with pinning the puppeteer version.

back2dos commented 4 years ago

Odd. I was able to sidestep it like so: https://github.com/MVCoconut/coconut.ui/commit/d0f22b3395a9bfc0acec50ed2e34b55a47715901

sebthom commented 4 years ago

I was wrong, the job was using node 11. I specified this in travis.yml:

dist: bionic
language: haxe
os:
  - linux

I now install node 12 like this and it works:

install:
  - |- 
    if [ "$HAXE_TARGET" == "js" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then
      curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash && \
      source $HOME/.nvm/nvm.sh && \
      nvm install --lts && \
      nvm use --lts
    fi

Thanks for your reponses!