Problem getting the source code from your provider. Unable to show line by line coverage

Before submitting a topic, please confirm the following

I have searched for similar issues before creating this topic.
I have verified that my repository is using the Codecov GitHub app, if using GitHub
I have validated my codecov.yaml configuration file.
I have filled out the below sections to the best of my ability.

Description

The problem I am encountering, is that I cannot see the line coverage. I always get the error “There was a problem getting the source code from your provider. Unable to show line by line coverage.”.

There actually are quite a few other questions with the same problem, yet they appear quite inconsistent.
For some, it is obvious that the fixes in the yaml had to be configured properly, while for others, there seemed to be a bug of codecov (e.g. here: File viewer - line coverage).

It is not clear to me, what case I am encountering, and would be grateful for some debugging insights, e.g., how to figure out how the paths should look like, what file the app is trying to open, etc.

CI/CD URL

Unfortunately again a private repository: https://github.com/GenieTim/pylimer-tools/actions/runs/4173541256
I tried to make a reproducible public repo, but I could not produce the error there, so it seems it might be connected to the repo being private.

Codecov Output

==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (20f9c9d78483fce977b6cc39e231a734a23bcd36f4d536bb7355222fb88d02bc  codecov)
==> Running version latest
==> Running version v0.3.2
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n  -Q github-action-3.1.1 -v
[2022-12-21T15:13:55.562Z] ['verbose'] Start of uploader: 1671635635562...
[2022-12-21T15:13:55.564Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.3.2
[2022-12-21T15:13:55.570Z] ['info'] => Project root located at: /home/runner/work/pylimer-tools/pylimer-tools
[2022-12-21T15:13:55.574Z] ['info'] ->  Token found by environment variables
[2022-12-21T15:13:55.575Z] ['verbose'] Start of network processing...
[2022-12-21T15:13:55.575Z] ['verbose'] Searching for files in /home/runner/work/pylimer-tools/pylimer-tools
[2022-12-21T15:13:55.712Z] ['info'] Running coverage xml...
[2022-12-21T15:13:55.986Z] ['verbose'] Wrote XML report to coverage.xml
[2022-12-21T15:13:55.986Z] ['info'] Searching for coverage files...
[2022-12-21T15:13:56.337Z] ['info'] Warning: Some files located via search were excluded from upload.
[2022-12-21T15:13:56.337Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2022-12-21T15:13:56.337Z] ['verbose'] Preparing to clean the following coverage paths: codecov.yaml,coverage.xml,tests/build/#home#runner#work#pylimer-tools#pylimer-tools#src#pylimer_tools_cpp#MyClass.cpp.gcov 
// ...etc., very many .gcov files redacted
[2022-12-21T15:13:56.341Z] ['info'] => Found 489 possible coverage files:
// long list of gcov files again, redacted for brevity
[2022-12-21T15:13:56.341Z] ['verbose'] End of network processing
[2022-12-21T15:13:56.341Z] ['info'] Processing /home/runner/work/pylimer-tools/pylimer-tools/codecov.yaml...
[2022-12-21T15:13:56.343Z] ['info'] Processing /home/runner/work/pylimer-tools/pylimer-tools/coverage.xml...
[2022-12-21T15:13:56.343Z] ['info'] Processing /home/runner/work/pylimer-tools/pylimer-tools/tests/build/#home#runner#work#pylimer-tools#pylimer-tools#src#pylimer_tools_cpp#MyClass.cpp.gcov 
// etc., redacted for brevity
[2022-12-21T15:13:57.166Z] ['info'] Detected GitHub Actions as the CI provider.
[2022-12-21T15:13:57.166Z] ['verbose'] -> Using the following env variables:
[2022-12-21T15:13:57.166Z] ['verbose']      GITHUB_ACTION: __codecov_codecov-action
[2022-12-21T15:13:57.166Z] ['verbose']      GITHUB_HEAD_REF: 
[2022-12-21T15:13:57.166Z] ['verbose']      GITHUB_REF: refs/heads/main
[2022-12-21T15:13:57.166Z] ['verbose']      GITHUB_REPOSITORY: GenieTim/pylimer-tools
[2022-12-21T15:13:57.166Z] ['verbose']      GITHUB_RUN_ID: ...
[2022-12-21T15:13:57.166Z] ['verbose']      GITHUB_SERVER_URL: https://github.com
[2022-12-21T15:13:57.166Z] ['verbose']      GITHUB_SHA: ...
[2022-12-21T15:13:57.166Z] ['verbose']      GITHUB_WORKFLOW: Run Tests
[2022-12-21T15:13:57.166Z] ['verbose'] Using the following upload parameters:
[2022-12-21T15:13:57.166Z] ['verbose'] branch
[2022-12-21T15:13:57.166Z] ['verbose'] build
[2022-12-21T15:13:57.166Z] ['verbose'] buildURL
[2022-12-21T15:13:57.166Z] ['verbose'] commit
[2022-12-21T15:13:57.166Z] ['verbose'] job
[2022-12-21T15:13:57.166Z] ['verbose'] pr
[2022-12-21T15:13:57.166Z] ['verbose'] service
[2022-12-21T15:13:57.166Z] ['verbose'] slug
[2022-12-21T15:13:57.166Z] ['verbose'] name
[2022-12-21T15:13:57.166Z] ['verbose'] tag
[2022-12-21T15:13:57.166Z] ['verbose'] flags
[2022-12-21T15:13:57.166Z] ['verbose'] parent
[2022-12-21T15:13:57.168Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.1-uploader-0.3.2&token=*******&branch=main&build=3750309808&build_url=https%3A%2F%2Fgithub.com%2FGenieTim%2Fpylimer-tools%2Factions%2Fruns%2F3750309808&commit=...&job=Run+Tests&pr=&service=github-actions&slug=GenieTim%2Fpylimer-tools&name=&tag=&flags=&parent=
[2022-12-21T15:13:57.169Z] ['verbose'] Passed token was 36 characters long
[2022-12-21T15:13:57.169Z] ['verbose'] https://codecov.io/upload/v4?package=github-action-3.1.1-uploader-0.3.2&branch=main&build=3750309808&build_url=https%3A%2F%2Fgithub.com%2FGenieTim%2Fpylimer-tools%2Factions%2Fruns%2F3750309808&commit=...&job=Run+Tests&pr=&service=github-actions&slug=GenieTim%2Fpylimer-tools&name=&tag=&flags=&parent=
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
        X-Reduced-Redundancy: 'false'
[2022-12-21T15:13:57.828Z] ['info'] https://app.codecov.io/github/GenieTim/pylimer-tools/commit/...
https://storage.googleapis.com/codecov/v4/raw/2022-12-21/.../.../....-ed21-4dac-91a4-baa1639ea048.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...&X-Amz-Date=20221221T151357Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=...
[2022-12-21T15:13:57.829Z] ['verbose'] Returned upload url: https://storage.googleapis.com/codecov/v4/raw/2022-12-21/.../.../...-ed21-4dac-91a4-baa1639ea048.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...&X-Amz-Date=20221221T151357Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=...
[2022-12-21T15:13:57.829Z] ['info'] Uploading...
[2022-12-21T15:13:58.141Z] ['info'] {"status":"success","resultURL":"https://app.codecov.io/github/GenieTim/pylimer-tools/commit/..."}
[2022-12-21T15:13:58.141Z] ['verbose'] End of uploader: 2579 milliseconds

Expected Results

I expect Codecov to show line by line coverage.

Actual Results

Codecov does not show line by line coverage, but an error, “There was a problem getting the source code from your provider. Unable to show line by line coverage.”.

Additional Information

I reported a different problem already a few weeks ago (here: Something broke ca. 25 days ago. How can I find out what exactly?) with the same repository and setup. I did not change many things since then, but anyway, the line coverage did not work back than either after fixing the linked issue.

@GenieTim looks like there’s an issue with permissions. You will need to log out, log back in here and grant private repo access so we can show you source code overlayed.

Dear @tom ,

Thanks for your response. I have only now gotten the notification, so sorry for not getting back to you. I have not used codecov in the meantime, since it just seems to make problems rather than help. It is the case that it works now, but only for my Python code. The C++ code is not listed at all anymore. While a few months back I did not get any coverage for the C++ files, this time, they are just not listed at all anymore, as if they did not exist.
I have not yet looked further into it, as I feel like I am loosing too much time for now trying to fix things when I can just look at the coverage locally with lcov, but if you have any clue what could be going on, I would be happy for guidance, as the codecov interface in general is nice.

Best regards,

Tim

@GenieTim happy to take a look. Can you point me to a commit and CI run with Codecov that has the python code and no C++ code?

E.g. this commit here: Codecov does not have C++ code. The commit Codecov did have it still.

The first commit you shared (without C++) doesn’t have any coverage reports that have C++ code in it. If you go and Download the report

image

and search pylimer_tools_cpp, you’ll notice that none of the coverage reports show that file directory, only in the list of files at the top of the coverage report.

Hm. Then I guess it is again the uploader or the GitHub Action that somehow changed in the background… for some reason, things are working again somewhat, without me having changed something as far as I remember, so I guess I thank you for your input, and just hope things become/stay stable.

1 Like