question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to upload, got `TypeError: undefined is not a function`

See original GitHub issue
      - name: test
        run: coverage run -m pytest

      - run: coverage xml

      - uses: codecov/codecov-action@v2
        with:
          flags: '${{ matrix.python }}'
          verbose: true # optional (default = false)
Run codecov/codecov-action@v2
  with:
    flags: 3.7
    verbose: true
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.7.11/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.7.11/x64/lib
==> linux OS detected
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (f4daf62bfc474b5aeebb25b3cf1a467b01f930b404ba7e618abc6141b72a04a9  codecov)
/home/runner/work/_actions/codecov/codecov-action/v2/dist/codecov -n  -Q github-action-2.0.3 -F 3.7 -v
[2021-09-04T03:50:48.421Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.1.0
[2021-09-04T03:50:48.427Z] ['info'] => Project root located at: /home/runner/work/codecov-action-bug/codecov-action-bug
[2021-09-04T03:50:48.428Z] ['info'] -> No token specified or token is empty
[2021-09-04T03:50:48.428Z] ['verbose'] Start of network processing...
[2021-09-04T03:50:48.428Z] ['verbose'] Searching for files in /home/runner/work/codecov-action-bug/codecov-action-bug
[2021-09-04T03:50:48.436Z] ['info'] Searching for coverage files...
[2021-09-04T03:50:48.445Z] ['info'] => Found 1 possible coverage files:
  coverage.xml
[2021-09-04T03:50:48.445Z] ['verbose'] End of network processing
[2021-09-04T03:50:48.445Z] ['info'] Processing /home/runner/work/codecov-action-bug/codecov-action-bug/coverage.xml...
[2021-09-04T03:50:48.447Z] ['info'] Detected GitHub Actions as the CI provider.
[2021-09-04T03:50:48.447Z] ['verbose'] -> Using the following env variables:
[2021-09-04T03:50:48.447Z] ['verbose']      GITHUB_ACTION: __codecov_codecov-action
[2021-09-04T03:50:48.447Z] ['verbose']      GITHUB_HEAD_REF: 
[2021-09-04T03:50:48.447Z] ['verbose']      GITHUB_REF: refs/heads/master
[2021-09-04T03:50:48.447Z] ['verbose']      GITHUB_REPOSITORY: Trim21/codecov-action-bug
[2021-09-04T03:50:48.447Z] ['verbose']      GITHUB_RUN_ID: 1200147337
[2021-09-04T03:50:48.447Z] ['verbose']      GITHUB_SERVER_URL: https://github.com
[2021-09-04T03:50:48.447Z] ['verbose']      GITHUB_SHA: 7730b14fd2a9079623c2ac4253713cff9c6e4cb0
[2021-09-04T03:50:48.447Z] ['verbose']      GITHUB_WORKFLOW: ci
[2021-09-04T03:50:48.448Z] ['error'] TypeError: undefined is not a function

re-produce: https://github.com/Trim21/codecov-action-bug/runs/3963086974?check_suite_focus=true

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
drazisil-codecovcommented, Oct 21, 2021

It does not like flags like 3.8 They are numbers Numbers can’t split. Having a talk with type coercion 😒

1reaction
drazisil-codecovcommented, Oct 21, 2021
[2021-10-21T14:28:23.429Z] ['error'] There was an error running the uploader: undefined is not a function
[2021-10-21T14:28:23.430Z] ['verbose'] The error stack is: TypeError: undefined is not a function
    at Object.populateBuildParams (/snapshot/repo/dist/src/helpers/web.js)
    at main (/snapshot/repo/dist/src/index.js)
[2021-10-21T14:28:23.430Z] ['verbose'] End of uploader: 40 milliseconds

Yay! Stack trace worked. 👀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to upload, got TypeError: undefined is not a function #803
Just stumbled across the following issue - upload to codecov works only for Python 3.10 (3.10.x) and fails e.g. for Python 3.9 (3.9)....
Read more >
Ask Question - Stack Overflow
Getting : TypeError: undefined is not a function (evaluating 'filePath.replace('file://', '')') while uploading a blob to firebase storage.
Read more >
Uncaught TypeError: 'undefined' is not a function
Uncaught TypeError: 'undefined' is not a function. This is a common JavaScript error that happens when you try to call a function before...
Read more >
How to Fix “Promise resolver undefined is not a function” in ...
If you're running into the “Promise resolver undefined is not a function” error, your code may look like this new Promise() instead of...
Read more >
TypeError: "x" is not a constructor - JavaScript - MDN Web Docs
The JavaScript exception "is not a constructor" occurs when there was an attempt to use an object or a variable as a constructor,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found