You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Couldn't fetch access token for Github application #172
I followed the instructions, created a token, made it available as a secret in the application, but I'm running into this error
(node:6456) UnhandledPromiseRejectionWarning: Error: Couldn't fetch access token for Github application. Check if you use the correct `BARECHECK_GITHUB_APP_TOKEN`
at createGithubAccessToken (/actions-runner/_work/_actions/barecheck/code-coverage-action/v0.6.1/dist/index.js:11291:11)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async createNewAccessToken (/actions-runner/_work/_actions/barecheck/code-coverage-action/v0.6.1/dist/index.js:11011:21)
Hi,
I updated the version, now the error changed to
```
Error: Couldn't fetch accessToken token by using apiKey. Check if you use
the correct `API_KEY`
```
Do I need to change the environment secret name?
Thanks, Daniel
I also faced the similar issue. we used v.0.51 for a while, but the last week it stopped posting the summary commit, after upgrading to v1 (barecheck/code-coverage-action@v1), it throws the error
Error: Couldn't fetch accessToken token by using appToken. Check if you use the correct `BARECHECK_APP_KEY`
I tried to rerun the job several times, but it did not help.
Run barecheck/code-coverage-action@v1
with:
barecheck-github-app-token: ***
lcov-file: coverage/lcov.info
show-annotations: warning
lcov-file: coverage/lcov.info
Current code coverage: NaN%
Base branch code coverage: 0%
Code coverage diff: NaN%
Code coverage diff: NaN%
minimum-ratio: NaN
minimum-ratio is disabled for this workflow
Show annotations feature enabled
There is no comment, but I'm also just testing this on a PR which only adds the check. So not sure if this is or isn't the expected outcome.
Run barecheck/code-coverage-action@v1
with:
barecheck-github-app-token: ***
lcov-file: ./osl.info
show-annotations: warning
lcov-file: ./osl.info
Current code coverage: 33.99%
Base branch code coverage: 0%
Code coverage diff: 33.99%
Code coverage diff: 33.99%
minimum-ratio: NaN
minimum-ratio is disabled for this workflow
Show annotations feature enabled
again, no comment. Only change in the PR is adding the actions to run the check.
It's really weird. I just added PR to test #184 and it looks fine, not sure what is different on your side. I also did regenerate a token and updated secret with a new one?
yes, right. we removed and installed the app several times but it did not help. also, we found the sematic pull request stopped working for some reason as well. we think the problem is somewhere in our repo settings, so we will try to fix this issue by ourselves.
@andrey-sheremeta Sure, let me know if you will need any help. This is really weird that you have this access issue.
Maybe, check if your secrets are passed properly.
Wait, I have the barecheck-github-app-token configured, but it’s looking
for barecheck-api-key, where is this one coming from?
On Tue, Apr 26, 2022 at 8:01 AM Daniel Guettler ***@***.***>
wrote:
Hi,
I updated the version, now the error changed to
```
Error: Couldn't fetch accessToken token by using apiKey. Check if you use
the correct `API_KEY`
```
Do I need to change the environment secret name?
Thanks, Daniel
On Tue, Apr 26, 2022 at 4:15 AM Vitalii Melnychuk <
***@***.***> wrote:
> Hello @dguettler <https://github.com/dguettler>!
>
> I am sorry for the issue we have with that version of barecheck. Can you
> please update barecheck github action to v1?
>
> Like here: ***@***.*** I will update all docs to
> use proper version.
>
> —
> Reply to this email directly, view it on GitHub
> <#172 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAAAP7SDROGD5KNBZRM2JDDVG6QZFANCNFSM5UDKQGCA>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
barecheck-github-app-token - Barecheck application token, received after application installation comment. Basically, this one is just to give access to the Barecheck GitHub application to post comments. You can receive this token after installing the application as I mentioned in the comment above #172 (comment)
barecheck-api-key - Your project API_KEY generated from https://barecheck.com/. Use this property to avoid running coverage for the base branch. This is an optional field, but some people find it useful to use to avoid rerunning coverage for the base branch and keep historical data stored in Barecheck.
@aodhgan, ⭐3 XP earned, 🏆First Comment Added completed!
Contribute more to raise your XP/Level, complete challenges for extra achievements! [Sign up for personal dashboard]
Activity
vitaliimelnychuk commentedon Apr 26, 2022
Hello @dguettler!
I am sorry for the issue we have with that version of barecheck. Can you please update barecheck github action to v1?
Like here:
barecheck/code-coverage-action@v1. I will update all docs to use proper version.dguettler commentedon Apr 26, 2022
vitaliimelnychuk commentedon Apr 26, 2022
Thanks for your feedback @dguettler.
I am sorry you have faced those problems with action.
I already fixed the issue here #175. You don't need to update anything, just run your workflow once more and it should pass and post a comment.
You always are able to use https://www.barecheck.com/ to store results and make comparison with previous executions but it's not required.
Let me know if you still experiencing any issues.
vitaliimelnychuk commentedon Apr 30, 2022
Hello @dguettler!
Do you still have the issue with action after running action one more time?
andrey-sheremeta commentedon May 16, 2022
Hi @vitaliimelnychuk.
Thanks a lot for a great job.
I also faced the similar issue. we used v.0.51 for a while, but the last week it stopped posting the summary commit, after upgrading to v1 (
barecheck/code-coverage-action@v1), it throws the errorI tried to rerun the job several times, but it did not help.
Could you please help with this?
vitaliimelnychuk commentedon May 16, 2022
Hello @andrey-sheremeta!
I released v1 as a stable version and will deprecate all previous releases soon. I am sorry that you faced the issue with the old version.
Can you please try to uninstall and install the application again to get a new token to post comments?
If it will not help please send here your config of the action. I am more than happy to fix the issue you're facing.
dguettler commentedon May 16, 2022
vitaliimelnychuk commentedon May 16, 2022
Hello @dguettler!
If you don't have the base coverage report passed it should still post a comment with all uncovered lines but without the comparison part.
It usually helps to pass base coverage reports or use Barecheck cloud to have diff in percentages.
dguettler commentedon May 16, 2022
Hi @vitaliimelnychuk
this is what I currently get in the logs
There is no comment, but I'm also just testing this on a PR which only adds the check. So not sure if this is or isn't the expected outcome.
dguettler commentedon May 16, 2022
This is on a 2nd project
again, no comment. Only change in the PR is adding the actions to run the check.
vitaliimelnychuk commentedon May 16, 2022
It's strange that you have
NaN%current code coverage. Can you check if the file is properly fulfilled with Lcov data rows?Another thing, what do you pass as
barecheck-github-app-token? Is it a token received after the Barecheck application installation?dguettler commentedon May 16, 2022
I'll check on the file. Yes it's the token received after installation.
vitaliimelnychuk commentedon May 17, 2022
Hello @dguettler!
Maybe you can also try to uninstall/install Barecheck application to make sure that token is valid.
andrey-sheremeta commentedon May 18, 2022
Hi @vitaliimelnychuk
We reinstalled the Barecheck application and updated the token, but it did not help.
attach the config of the action, so you can review it:
Thanks.
vitaliimelnychuk commentedon May 19, 2022
Hey @andrey-sheremeta!
It's really weird. I just added PR to test #184 and it looks fine, not sure what is different on your side. I also did regenerate a token and updated secret with a new one?
You've got the token from here, right?
andrey-sheremeta commentedon May 30, 2022
yes, right. we removed and installed the app several times but it did not help. also, we found the
sematic pull requeststopped working for some reason as well. we think the problem is somewhere in our repo settings, so we will try to fix this issue by ourselves.thanks a lot for the help.
vitaliimelnychuk commentedon May 30, 2022
@andrey-sheremeta Sure, let me know if you will need any help. This is really weird that you have this access issue.
Maybe, check if your secrets are passed properly.
dguettler commentedon Oct 11, 2022
vitaliimelnychuk commentedon Oct 11, 2022
Hello @dguettler! Hope you're doing well.
barecheck-github-app-token- Barecheck application token, received after application installation comment. Basically, this one is just to give access to the Barecheck GitHub application to post comments. You can receive this token after installing the application as I mentioned in the comment above #172 (comment)barecheck-api-key- Your project API_KEY generated from https://barecheck.com/. Use this property to avoid running coverage for the base branch. This is an optional field, but some people find it useful to use to avoid rerunning coverage for the base branch and keep historical data stored in Barecheck.Let me know if this works for you
aodhgan commentedon Jul 23, 2024
@andrey-sheremeta did you ever resolve this? having the same issue
devactivity-app commentedon Jul 23, 2024
@aodhgan, ⭐3 XP earned, 🏆First Comment Added completed!
Contribute more to raise your XP/Level, complete challenges for extra achievements! [Sign up for personal dashboard]
vitaliimelnychuk commentedon Jul 24, 2024
Hello @aodhgan,
I am not still aware with what exactly we're having issue here.
If you look into my comment above about using different tokens, what is the one you're using? if it's
barecheck-api-key, did you try to regenerate it?