TypeError when uploading reports with Travis CI

Please check the troubleshooting guide before creating a ticket.
All fields below are required.


Getting a UnhandledPromiseRejectionWarning error when Uploading Reports starts.

I need help getting pointed in the right direction. I can’t figure out what is causing this error.

Commit SHAs



Private Repo.

CI/CD or Build URL




I’m using the following command in my .travis.yml file:

npx codecov --disable=gcov

Codecov Output

$ npx codecov --disable=gcov

npx: installed 24 in 1.882s

  _____          _  

 / ____|        | |  

| |     ___   __| | ___  ___ _____   __  

| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /  

| |___| (_) | (_| |  __/ (_| (_) \ V /  

 \_____\___/ \__,_|\___|\___\___/ \_/  


==> Detecting CI Provider

    Travis CI Detected

==> Configuration: 

    Endpoint: https://codecov.io


  commit: '921fec5a4fe834589993cb6f1b1c736d64a65eb5',

  branch: 'main',

  package: 'node-v3.8.1'


==> Building file structure

==> Scanning for reports

    + /home/travis/build/brontesflorals/brontes-florals-storyblok-next/coverage/clover.xml

    + /home/travis/build/brontesflorals/brontes-florals-storyblok-next/coverage/lcov.info

==> Uploading reports

(node:6051) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'startsWith' of undefined

    at Object.getAgent (/home/travis/.npm/_npx/6051/lib/node_modules/codecov/node_modules/teeny-request/build/src/agents.js:30:22)

    at requestToFetchOptions (/home/travis/.npm/_npx/6051/lib/node_modules/codecov/node_modules/teeny-request/build/src/index.js:86:30)

    at teenyRequest (/home/travis/.npm/_npx/6051/lib/node_modules/codecov/node_modules/teeny-request/build/src/index.js:143:14)

    at /home/travis/.npm/_npx/6051/lib/node_modules/codecov/lib/codecov.js:213:9

    at /home/travis/.npm/_npx/6051/lib/node_modules/codecov/node_modules/teeny-request/build/src/index.js:233:13

    at processTicksAndRejections (internal/process/task_queues.js:97:5)

(node:6051) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

(node:6051) [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.

Expected Results

Expected the reports to upload.

Actual Results

No reports show in Codecov dashboard.

Additional Information

Attempting to add this to a Next.js project.

@snw2brd, I would recommend trying the bash uploader and seeing if you get the same errors.

@tom, that seems to work. Thanks!

1 Like