Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

TypeError: Cannot read property 'startsWith' of undefined #284

Open
@FezVrasta

Description

@FezVrasta

Hi, we run Codecov with npx codecov --token=${CODECOV_TOKEN} and starting from last week we started seeing these sporadic errors:

==> Building file structure
==> Generating gcov reports (skip via --disable=gcov)
    $ find /home/circleci/repo/frontend -type f -name '*.gcno'  -exec gcov  {} +
    Failed to run gcov command.
==> Scanning for reports
    + /home/circleci/repo/frontend/coverage/clover.xml
    + /home/circleci/repo/frontend/coverage/lcov.info
==> Uploading reports
/home/circleci/.npm/_npx/56c18755c3006eff/node_modules/teeny-request/build/src/agents.js:30
    var isHttp = uri.startsWith('http://');
                     ^

TypeError: Cannot read property 'startsWith' of undefined
    at Object.getAgent (/home/circleci/.npm/_npx/56c18755c3006eff/node_modules/teeny-request/build/src/agents.js:30:22)
    at requestToFetchOptions (/home/circleci/.npm/_npx/56c18755c3006eff/node_modules/teeny-request/build/src/index.js:86:30)
    at teenyRequest (/home/circleci/.npm/_npx/56c18755c3006eff/node_modules/teeny-request/build/src/index.js:143:14)
    at /home/circleci/.npm/_npx/56c18755c3006eff/node_modules/codecov/lib/codecov.js:213:9
    at /home/circleci/.npm/_npx/56c18755c3006eff/node_modules/teeny-request/build/src/index.js:233:13
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
npm ERR! code 1
npm ERR! path /home/circleci/repo/frontend
npm ERR! command failed
npm ERR! command sh -c codecov "--token="

Running the CI build again usually fixes it, are you aware of the issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions