Failed to upload, got `TypeError: undefined is not a function`
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).
This happens both on v2 and v3 of the Github Action. Looks like https://github.com/codecov/codecov-action/issues/509, but this should have been fixed already?
Error with Python 3.9:
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (66cbf87269acc529c87f6ea29395ba329f528e92cfda4fc199eab460[12](https://github.com/bimmerconnected/bimmer_connected/runs/7788060465?check_suite_focus=true#step:6:13)3e18b6 codecov)
==> Running version latest
==> Running version v0.2.5
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n pytest-3.9 -Q github-action-3.1.0 -Z -f ./coverage.xml -F 3.9 -C 91d28b638a40a645d584c92d7c98e11460b5458b -v
[2022-08-11T[13](https://github.com/bimmerconnected/bimmer_connected/runs/7788060465?check_suite_focus=true#step:6:14):37:48.945Z] ['verbose'] Start of uploader: 1660225068945...
[2022-08-11T13:37:48.947Z] ['info']
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Codecov report uploader 0.2.5
[2022-08-11T13:37:48.953Z] ['info'] => Project root located at: /home/runner/work/bimmer_connected/bimmer_connected
[2022-08-11T13:37:48.954Z] ['info'] -> No token specified or token is empty
[2022-08-11T13:37:48.954Z] ['verbose'] Start of network processing...
[2022-08-11T13:37:48.954Z] ['verbose'] Searching for files in /home/runner/work/bimmer_connected/bimmer_connected
[2022-08-11T13:37:49.053Z] ['verbose'] Skipping coveragepy, files already specified
[2022-08-11T13:37:49.053Z] ['info'] Searching for coverage files...
[2022-08-11T13:37:49.[14](https://github.com/bimmerconnected/bimmer_connected/runs/7788060465?check_suite_focus=true#step:6:15)1Z] ['verbose'] Preparing to clean the following coverage paths: ./coverage.xml
[2022-08-11T13:37:49.141Z] ['info'] => Found 1 possible coverage files:
./coverage.xml
[2022-08-11T13:37:49.141Z] ['verbose'] End of network processing
[2022-08-11T13:37:49.142Z] ['info'] Processing ./coverage.xml...
[2022-08-11T13:37:49.146Z] ['info'] Detected GitHub Actions as the CI provider.
[2022-08-11T13:37:49.146Z] ['verbose'] -> Using the following env variables:
[2022-08-11T13:37:49.146Z] ['verbose'] GITHUB_ACTION: __codecov_codecov-action
[2022-08-11T13:37:49.146Z] ['verbose'] GITHUB_HEAD_REF: add-enum-attributes
[2022-08-11T13:37:49.147Z] ['verbose'] GITHUB_REF: refs/pull/478/merge
[2022-08-11T13:37:49.147Z] ['verbose'] GITHUB_REPOSITORY: bimmerconnected/bimmer_connected
[2022-08-11T13:37:49.147Z] ['verbose'] GITHUB_RUN_ID: 2840193121
[2022-08-11T13:37:49.147Z] ['verbose'] GITHUB_SERVER_URL: https://github.com
[2022-08-11T13:37:49.147Z] ['verbose'] GITHUB_SHA: b08cf6768f784e2b77526c0219a7673315070a57
[2022-08-11T13:37:49.147Z] ['verbose'] GITHUB_WORKFLOW: Tests
[2022-08-11T13:37:49.147Z] ['error'] There was an error running the uploader: undefined is not a function
[2022-08-11T13:37:49.148Z] ['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)
[2022-08-11T13:37:49.148Z] ['verbose'] End of uploader: 203 milliseconds
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov' failed with exit code 255
Works with Python 3.10:
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (66cbf87269acc529c87f6ea29395ba329f528e92cfda4fc199eab460[12](https://github.com/bimmerconnected/bimmer_connected/runs/7788060599?check_suite_focus=true#step:6:13)3e18b6 codecov)
==> Running version latest
==> Running version v0.2.5
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n pytest-3.10.x -Q github-action-3.1.0 -Z -f ./coverage.xml -F 3.10.x -C 91d28b638a40a645d584c92d7c98e11460b5458b -v
[2022-08-11T[13](https://github.com/bimmerconnected/bimmer_connected/runs/7788060599?check_suite_focus=true#step:6:14):37:52.204Z] ['verbose'] Start of uploader: 1660225072204...
[2022-08-11T13:37:52.206Z] ['info']
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Codecov report uploader 0.2.5
[2022-08-11T13:37:52.212Z] ['info'] => Project root located at: /home/runner/work/bimmer_connected/bimmer_connected
[2022-08-11T13:37:52.213Z] ['info'] -> No token specified or token is empty
[2022-08-11T13:37:52.2[14](https://github.com/bimmerconnected/bimmer_connected/runs/7788060599?check_suite_focus=true#step:6:15)Z] ['verbose'] Start of network processing...
[2022-08-11T13:37:52.214Z] ['verbose'] Searching for files in /home/runner/work/bimmer_connected/bimmer_connected
[2022-08-11T13:37:52.313Z] ['verbose'] Skipping coveragepy, files already specified
[2022-08-11T13:37:52.313Z] ['info'] Searching for coverage files...
[2022-08-11T13:37:52.379Z] ['verbose'] Preparing to clean the following coverage paths: ./coverage.xml
[2022-08-11T13:37:52.380Z] ['info'] => Found 1 possible coverage files:
./coverage.xml
[2022-08-11T13:37:52.380Z] ['verbose'] End of network processing
[2022-08-11T13:37:52.380Z] ['info'] Processing ./coverage.xml...
[2022-08-11T13:37:52.384Z] ['info'] Detected GitHub Actions as the CI provider.
[2022-08-11T13:37:52.384Z] ['verbose'] -> Using the following env variables:
[2022-08-11T13:37:52.385Z] ['verbose'] GITHUB_ACTION: __codecov_codecov-action
[2022-08-11T13:37:52.385Z] ['verbose'] GITHUB_HEAD_REF: add-enum-attributes
[2022-08-11T13:37:52.385Z] ['verbose'] GITHUB_REF: refs/pull/478/merge
[2022-08-11T13:37:52.385Z] ['verbose'] GITHUB_REPOSITORY: bimmerconnected/bimmer_connected
[2022-08-11T13:37:52.385Z] ['verbose'] GITHUB_RUN_ID: 2840193121
[2022-08-11T13:37:52.385Z] ['verbose'] GITHUB_SERVER_URL: https://github.com
[2022-08-11T13:37:52.386Z] ['verbose'] GITHUB_SHA: b08cf6768f784e2b77526c0219a76733[15](https://github.com/bimmerconnected/bimmer_connected/runs/7788060599?check_suite_focus=true#step:6:16)070a57
[2022-08-11T13:37:52.386Z] ['verbose'] GITHUB_WORKFLOW: Tests
[2022-08-11T13:37:52.386Z] ['verbose'] Using the following upload parameters:
[2022-08-11T13:37:52.386Z] ['verbose'] branch
[2022-08-11T13:37:52.386Z] ['verbose'] build
[2022-08-11T13:37:52.386Z] ['verbose'] buildURL
[2022-08-11T13:37:52.386Z] ['verbose'] commit
[2022-08-11T13:37:52.387Z] ['verbose'] job
[2022-08-11T13:37:52.387Z] ['verbose'] pr
[2022-08-11T13:37:52.387Z] ['verbose'] service
[2022-08-11T13:37:52.387Z] ['verbose'] slug
[2022-08-11T13:37:52.388Z] ['verbose'] name
[2022-08-11T13:37:52.388Z] ['verbose'] tag
[2022-08-11T13:37:52.388Z] ['verbose'] flags
[2022-08-11T13:37:52.388Z] ['verbose'] parent
[2022-08-11T13:37:52.389Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.0-uploader-0.2.5&token=*******&branch=add-enum-attributes&build=2840193121&build_url=https%3A%2F%2Fgithub.com%2Fbimmerconnected%2Fbimmer_connected%2Factions%2Fruns%2F2840193121&commit=91d28b638a40a645d584c92d7c98e11460b5458b&job=Tests&pr=478&service=github-actions&slug=bimmerconnected%2Fbimmer_connected&name=pytest-3.10.x&tag=&flags=3.10.x&parent=
[2022-08-11T13:37:52.389Z] ['verbose'] Passed token was 0 characters long
[2022-08-11T13:37:52.389Z] ['verbose'] https://codecov.io/upload/v4?package=github-action-3.1.0-uploader-0.2.5&branch=add-enum-attributes&build=2840193121&build_url=https%3A%2F%2Fgithub.com%2Fbimmerconnected%2Fbimmer_connected%2Factions%2Fruns%2F2840193121&commit=91d28b638a40a645d584c92d7c98e11460b5458b&job=Tests&pr=478&service=github-actions&slug=bimmerconnected%2Fbimmer_connected&name=pytest-3.10.x&tag=&flags=3.10.x&parent=
Content-Type: 'text/plain'
Content-Encoding: 'gzip'
X-Reduced-Redundancy: 'false'
[2022-08-11T13:37:53.068Z] ['info'] https://codecov.io/github/bimmerconnected/bimmer_connected/commit/91d28b638a40a645d584c92d7c98e11460b5458b
https://storage.googleapis.com/codecov/v4/raw/2022-08-11/1E39C3C9A3CDF7BA764A573AC601CD20/91d28b638a40a645d584c92d7c98e11460b5458b/8c7cd6b5-b735-41ae-bb15-74c9e00c5c21.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EJOGFN2JQ4OCTGA2MU5AEIT7OT5Z7HTFOAN2SPG4NWSN2UJYOY5U6LZQ%2F20220811%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20220811T133753Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=cdb97546dffa9a941cb3e365a9d3f5fe464f4145a9ee0cf1caae91e2a3a8e2f5
[2022-08-11T13:37:53.068Z] ['verbose'] Returned upload url: https://storage.googleapis.com/codecov/v4/raw/2022-08-11/1E39C3C9A3CDF7BA764A573AC601CD20/91d28b638a40a645d584c92d7c98e11460b5458b/8c7cd6b5-b735-41ae-bb15-74c9e00c5c21.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EJOGFN2JQ4OCTGA2MU5AEIT7OT5Z7HTFOAN2SPG4NWSN2UJYOY5U6LZQ%2F20220811%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20220811T133753Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=cdb97546dffa9a941cb3e365a9d3f5fe464f4145a9ee0cf1caae91e2a3a8e2f5
[2022-08-11T13:37:53.069Z] ['info'] Uploading...
[2022-08-11T13:37:53.293Z] ['info'] {"status":"success","resultURL":"https://codecov.io/github/bimmerconnected/bimmer_connected/commit/91d28b638a40a645d584c92d7c98e11460b5458b"}
[2022-08-11T13:37:53.293Z] ['verbose'] End of uploader: 1089 milliseconds
v2 run: https://github.com/bimmerconnected/bimmer_connected/actions/runs/2839937235 v3 run: https://github.com/bimmerconnected/bimmer_connected/actions/runs/2840193121
Thanks for checking!
I'm also seeing this issue on a new project: https://github.com/Edward-Knight/landlock/runs/8080492073
Before I added the token as an environment variable I was getting:
There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 404 - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
despite it being a public project.
I haven't used codecov before but I believe I'm doing everything correctly?
@rikroe do you mind opening a topic in our community boards if you still have this issue?
@Edward-Knight I see that you switched to Coveralls. If you decide to come back to Codecov, please let me know if I can help get this working for you.