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

[GitHub] Exports sometimes fail with CORS errors when requesting https://api.github.com/repos/AUTHOR/REPO/git/trees #2084

Open
bgrgicak opened this issue Dec 16, 2024 · 4 comments · Fixed by #2103
Labels
[Aspect] Website [Feature] GitHub integration [Type] Bug An existing feature does not function as intended

Comments

@bgrgicak
Copy link
Collaborator

GitHub exports sometimes fail with CORS errors when requesting https://api.github.com/repos/AUTHOR/REPO/git/trees.

In my testing, it consistently fails when I attempt to export wp-content/ while WooCommerce is installed (example Blueprint).

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.github.com/repos/bgrgicak/temp/git/trees. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 502.

Image

@adamziel
Copy link
Collaborator

Interesting! Is that repo private? I noticed https://api.github.com/repos/bgrgicak/temp/git/trees says 404

@adamziel
Copy link
Collaborator

potential fix in #2103

@bgrgicak
Copy link
Collaborator Author

Interesting! Is that repo private? I noticed api.github.com/repos/bgrgicak/temp/git/trees says 404

It's public.

@bgrgicak
Copy link
Collaborator Author

Here's a bit more info.

In the browser, I get a 502 response.
Image

When I try the same request in Postman (with a different Auth token) I get a Invalid tree info error.
Image

@github-project-automation github-project-automation bot moved this from Backlog to Done in Playground Board Dec 19, 2024
@bgrgicak bgrgicak reopened this Dec 19, 2024
@github-project-automation github-project-automation bot moved this from Done to Inbox in Playground Board Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Aspect] Website [Feature] GitHub integration [Type] Bug An existing feature does not function as intended
Projects
Status: Inbox
2 participants