Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bot:peek failing "UnhandledPromiseRejectionWarning: Error: Request failed with status code 403" #414

Closed
amacado opened this issue Dec 30, 2020 · 10 comments · Fixed by #412
Closed
Assignees
Labels
bug Use this label for pointing out bugs

Comments

@amacado
Copy link
Member

amacado commented Dec 30, 2020

As you can see in PR #413 the bot:peek action is failing which can be traced to

image

Is this error caused by not using the latest version of devicons/public-upload-to-imgur? @Thomas-Boi

image

@amacado amacado added the bug Use this label for pointing out bugs label Dec 30, 2020
@amacado amacado changed the title bug: bot:peek failing "UnhandledPromiseRejectionWarning: Error: Request failed with status code 403" bot:peek failing "UnhandledPromiseRejectionWarning: Error: Request failed with status code 403" Dec 30, 2020
@Thomas-Boi
Copy link
Member

Yes it is. I'll work on the peek bot pr and commit your suggestions so we can merge it asap.

@Thomas-Boi
Copy link
Member

Hi @amacado ,

I've added the some new features to the peek bot pr. The main feature is error handling for when an error is found, such as when the name can't be find in the title.

You can see an example in this PR at the very bottom. If you check the corresponding action, you can see that the script failed when it can't find the title.

@amacado
Copy link
Member Author

amacado commented Dec 30, 2020

@Thomas-Boi
Copy link
Member

I think this is because the source branch didn't get the new commits yet. In fact, it seems like their source branch is forked from an older master:

image

The only solution is to ask them to pull our develop into their master.

@amacado
Copy link
Member Author

amacado commented Dec 31, 2020

Even with updated branch it fails (but a new error) 🤣
https://github.com/devicons/devicon/runs/1630175599

image

@Thomas-Boi
Copy link
Member

Hmm, this is interesting. I'll take another look at the script.

@Thomas-Boi
Copy link
Member

@amacado please see my notes at the bottom of #421

@amacado
Copy link
Member Author

amacado commented Jan 3, 2021

@Thomas-Boi I have good and bad news. I found the reason why the bot:peek command is still failing. It's because of the restrictions of Github Secrets:

Secrets are not passed to workflows that are triggered by a pull request from a fork
https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets

That's the reason why PR which are initiated from this repository working well but when the action is executed from a forked pull request it will fail on the image upload step with error code 403. Since the CLIENT_ID is stored as secret and is required when the upload is beeing executed it fails and following execution steps fill fail accordingly.

I could not find a easy solution for this problem, maybe we can use the build artifacts or the GitHub CDN as alternative to imgur. Or we need to find a different hosting provider without the need of a secret (I wasn't able to find one).

@Thomas-Boi
Copy link
Member

Hey amacado,

You are correct. I'm surprised that I didn't notice this while making the workflow. Seems like we will be going back to the upload-artifacts then. Oh well😞

I will change the workflow file so we use the old method. As for the GitHub CDN, that was my first go to method but it seems like it's currently only available using their website (kinda like Icomoon). Maybe using Selenium might help but that can't be done right now.

@Thomas-Boi
Copy link
Member

Closing this issue since the fix is in develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Use this label for pointing out bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants