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

[Bug]: Github upload using Cloudflare pages errors with 502 #1174

Open
counterfitninja opened this issue Dec 30, 2022 · 2 comments
Open

[Bug]: Github upload using Cloudflare pages errors with 502 #1174

counterfitninja opened this issue Dec 30, 2022 · 2 comments

Comments

@counterfitninja
Copy link

Operating system

Windows 11

Publii version

Version: 0.41.1 (build 15919)

Post editor

WYSIWYG editor

Bug description

I setup Github as the destination repository and use Cloudflare pages as the site source. Inital setup was done with the Github pages address but this was later changed to the vanity domain as links were showing the Github URL and not the Domain required. I then switched to using Cloudflare pages as the backend without altering Publii settings but when i upload to Github i get the following:

[Fri, 30 Dec 2022 09:47:02 GMT] (i) TRIED AGAIN: (api) => api.gitdata.createTree - undefined
[Fri, 30 Dec 2022 09:47:16 GMT] (i) TRIED AGAIN FAIL: (api) => api.gitdata.createTree - undefined
[Fri, 30 Dec 2022 09:47:16 GMT] ERROR: {"code":502,"status":"Bad Gateway","message":"{\n "message": "Server Error"\n}\n"}

This is shown after the output is generated and its looks like the rest of the site is generated without issue.

Steps to reproduce

Publish Site to Github with a non githut URL.

Relevant log output

[Fri, 30 Dec 2022 09:46:49 GMT] CREATED BLOB: C:/Projects/Sites/sharp-desgin-services/output/travelling-again/index.html - be84ba8f651c1cc4f7c22d30d085b48cdb2556ee
[Fri, 30 Dec 2022 09:46:49 GMT] CREATED BLOB: C:/Projects/Sites/sharp-desgin-services/output/timber-frame-kitchen/index.html - 61ca0d8903d5d5427cbad231e1a1e18ab72f891d
[Fri, 30 Dec 2022 09:46:49 GMT] CREATE BLOB: C:/Projects/Sites/sharp-desgin-services/output/two-site-surveys-today/index.html
[Fri, 30 Dec 2022 09:46:49 GMT] CREATE BLOB: C:/Projects/Sites/sharp-desgin-services/output/visit-to-porton/index.html
[Fri, 30 Dec 2022 09:46:49 GMT] CREATE BLOB: C:/Projects/Sites/sharp-desgin-services/output/working-on-a-saturday/index.html
[Fri, 30 Dec 2022 09:46:49 GMT] CREATED BLOB: C:/Projects/Sites/sharp-desgin-services/output/two-site-surveys-today/index.html - f0c0db7ed2b813529ab4fee4c9167b7c1c8d6289
[Fri, 30 Dec 2022 09:46:49 GMT] CREATED BLOB: C:/Projects/Sites/sharp-desgin-services/output/working-on-a-saturday/index.html - 8b6edbd19aab916ad5c496294094abe1585f5f7a
[Fri, 30 Dec 2022 09:46:49 GMT] CREATED BLOB: C:/Projects/Sites/sharp-desgin-services/output/visit-to-porton/index.html - c96d17ebae8cf668e9da2e89080b001f0f9aacf1
[Fri, 30 Dec 2022 09:47:02 GMT] (i) TRIED AGAIN: (api) => api.gitdata.createTree - undefined
[Fri, 30 Dec 2022 09:47:16 GMT] (i) TRIED AGAIN FAIL: (api) => api.gitdata.createTree - undefined
[Fri, 30 Dec 2022 09:47:16 GMT] ERROR: {"code":502,"status":"Bad Gateway","message":"{\n  \"message\": \"Server Error\"\n}\n"}
@thefourcraft
Copy link

This was an issue with Cloudflare pages. Also, it's recommended to use a git manager to upload the pages

@counterfitninja
Copy link
Author

Thanks @thefourcraft but i already use Github as the Git manager which then pushed to Cloudflare. I have other sites which work perfectly fine using the same method. I suspect the error is a GitHub one but i have no idea where it comes from. i have tried again this morning and i get the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants