Invalid request parameters

Please search for similar issues before creating a ticket.
All fields below are required.

Description

I’m receiving “Invalid request parameters” errors when using the bitrise step (https://github.com/codecov/codecov-bitrise/i). Using the bash script works fine. Is there a bug in the step?

Uploader

https://github.com/codecov/codecov-bitrise/i

Codecov Output


/ | | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / ` |/ _ / / _ \ \ / /
| |
| (
) | (
| | __/ (
| (
) \ V /
______/ _,|_|____/ _/
Bash-1.0.5
==> git version 2.31.1 found
==> curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
==> Bitrise CI detected.
project root: .
→ token set from env
Yaml not found, that’s ok! Learn more at About the Codecov yaml
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
+ .
→ Found 6 reports
==> Detecting git/mercurial file structure
==> Reading reports


==> Appending adjustments
Fixing Reports
+ Found adjustments
==> Gzipping contents
96K /tmp/codecov.WVuoAM.gz
==> Uploading reports
url: https://codecov.io
query: branch=[branch]
→ Pinging Codecov
https://codecov.io/upload/v4?package=bitrise-step-1.0.5&token=&package=bitrise-step-1.0.5&token=[REDACTED]&branch=fix%2Fcodecov&commit=d25127e76e8e&build=453&build_url=&service=bitrise&flags=&pr=126&job=&cmd_args=Q,Z,C
Invalid request parameters
400

Expected Results

It should upload to codecov

Actual Results

I’m receiving an error

@gumil strange, it looks like it’s using the short-form of the commit SHA. Can you share the Codecov output of it working?

I’m getting the same issue, I raised it on github as an issue: https://github.com/codecov/codecov-bitrise/issues/10

+------------------------------------------------------------------------------+

| (13) codecov@3                                                               |
+------------------------------------------------------------------------------+
| id: codecov                                                                  |
| version: 3.0.1                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2021-09-07T14:24:13Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0gpg: directory '/root/.gnupg' created
gpg: keybox '/root/.gnupg/trustedkeys.gpg' created

100  3187  100  3187    0     0  20561      0 --:--:-- --:--:-- --:--:-- 20561
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 806BB28AED779869: public key "Codecov Uploader (Codecov Uploader Verification Key) <security@codecov.io>" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpgv: can't allocate lock for '/root/.gnupg/trustedkeys.gpg'
gpgv: Signature made Tue 24 Aug 2021 08:58:39 PM UTC
gpgv:                using RSA key 27034E7FDB850E0BBC2C62FF806BB28AED779869
gpgv: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) <security@codecov.io>"
codecov: OK
[2021-09-07T14:24:15.093Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/
  Codecov report uploader 0.1.0
[2021-09-07T14:24:15.098Z] ['info'] => Project root located at: /bitrise/src
[2021-09-07T14:24:15.099Z] ['info'] ->  Token found by environment variables
[2021-09-07T14:24:15.189Z] ['info'] Searching for coverage files...
[2021-09-07T14:24:15.341Z] ['info'] => Found 2 possible coverage files:
  codecov.SHA256SUM
  codecov.SHA256SUM.sig
[2021-09-07T14:24:15.341Z] ['info'] Processing /bitrise/src/codecov.SHA256SUM...
[2021-09-07T14:24:15.343Z] ['info'] Processing /bitrise/src/codecov.SHA256SUM.sig...
[2021-09-07T14:24:15.353Z] ['info'] Detected Local as the CI provider.
[2021-09-07T14:24:15.360Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=bitrise-step-3.0.0-uploader-0.1.0&token=*******&branch=HEAD&build=&build_url=&commit= 18832323a83445c00f5e3bcf17b8abad9bab6157&job=&pr=&service=&slug=//git@bitbucket.org/*****/*****-android&name=&tag=&flags=&parent=
[2021-09-07T14:24:15.542Z] ['error'] Error POSTing to https://codecov.io: 400 Invalid request parameters
[2021-09-07T14:24:15.543Z] ['error'] Error: Error uploading to https://codecov.io: Error: Bad Request
WARN[14:24:15] Step (codecov@3) failed, but was marked as skippable 
|                                                                              |
+---+---------------------------------------------------------------+----------+
| ! | codecov@3 (exit code: 255)                                    | 2.75 sec |
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://community.codecov.io                                  |
| Source: https://github.com/codecov/codecov-bitrise                           |
+---+---------------------------------------------------------------+----------+

Hi @kaylanx, can you make a new issue for this?

1 Like