question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. Itย collects links to all the places you might be looking at while hunting down a tough bug.

And, if youโ€™re still stuck at the end, weโ€™re happy to hop on a call to see how we can help out.

๐Ÿ› BUG: 'wrangler@2 pages publish' returns 504 or 503 failure

See original GitHub issue

What version of Wrangler are you using?

2

What operating system are you using?

ubuntu-latest

Describe the Bug

RUNS

GITHUB-ACTION: cloudflare/pages-action@v1.0.0

Run cloudflare/pages-action@v1.0.0
  with:
    apiToken: ***
    accountId: ***
    projectName: xxx-yyy-gitaction
    directory: ./public
    gitHubToken: ***
npm WARN exec The following package was not found and will be installed: wrangler@[2](...)

wrangler COMMAND inside of cloudflare/pages-action@v1.0.0

Executing: npx wrangler@2 pages publish "./public" --project-name="xxx-yyy-gitaction" in /home/runner/work/xxx-yyy/xxx-yyy

ERROR LOG

504

๐ŸŒŽ  Uploading... (701/708)

โœ˜ [ERROR] โœ˜ [ERROR] Received a malformed response from the API


๐ŸŒŽ  Uploading... (701/708)
  

    <!DOCTYPE html>
    <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
    <!--[if I... (length = 7018)
  
    POST /accounts/***/pages/projects/xxx-yyy-gitaction/file -> 504 Gateway Time-out
    
    If you think this is a bug, please open an issue at: https://github.com/cloudflare/wrangler2/issues/new
  
  


npm notice 
npm notice New minor version of npm available! 8.5.5 -> 8.9.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.9.0>
npm notice Run `npm install -g npm@8.9.0` to update!
npm notice 
EXIT WHEN NOT EXPECTED

SHELLAC COMMAND FAILED!
Executing: npx wrangler@2 pages publish "./public" --project-name="xxx-yyy-gitaction" in /home/runner/work/xxx-yyy/xxx-yyy

fetch ERROR


If you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new.
๐ŸŒ  Uploading... (706/709)



STDERR:

npm WARN exec The following package was not found and will be installed: wrangler@2
npm WARN deprecated rollup-plugin-inject@3.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
โœ˜ [ERROR] fetch failed


npm notice 
npm notice New minor version of npm available! 8.5.5 -> 8.9.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.9.0>
npm notice Run `npm install -g npm@8.9.0` to update!
npm notice 

another error

๐ŸŒ  Uploading... (696/708)


๐ŸŒ  Uploading... (696/708)



STDERR:

npm WARN exec The following package was not found and will be installed: wrangler@2
npm WARN deprecated rollup-plugin-inject@3.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
โœ˜ [ERROR] โœ˜ [ERROR] Received a bad response from the API

  
    An unknown error occurred [code: 8000000]
    
    If you think this is a bug, please open an issue at: https://github.com/cloudflare/wrangler2/issues/new

Descriptions:

  • wrangler returns 503, 504, or just โ€œ[ERROR] fetch failedโ€
  • I tried manual upload deployments
    • sometimes success, upload failed tens of files

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
GregBrimblecommented, May 12, 2022

Hey folks! Sorry about the difficulties here. We had hoped to move onto a system that let you publish files outside of using our API directly, but we didnโ€™t quite get there in time for the launch. This is pretty much the first thing on our list as fast-follow from this announcement, so please bear with us for a little while as we move things over.

1reaction
leviwolfecommented, Jun 8, 2022

@GregBrimble Unfortunately wrangler 2.0.7 definitely did not fix this issue. I have been using it since the day it came out, and still get the same error more often than not:

๐ŸŒŽ Uploadingโ€ฆ (184/184) โœจ Success! Uploaded 184 files (5.52 sec) โœ˜ [ERROR]โœ˜ [ERROR]Received a bad response from the API An unknown error occurred [code: 8000000] If you think this is a bug, please open an issue at: https://github.com/cloudflare/wrangler2/issues/new

Read more comments on GitHub >

github_iconTop Results From Across the Web

[ERROR] โœ˜ [ERROR] Received a malformed response from ...
An error occurs when using it sometime. ... May 25. ๐Ÿ› BUG: 'wrangler@2 pages publish' returns 504 or 503 failure cloudflare/wrangler2#960.
Read more >
How to Fix the 504 Gateway Timeout Error on Your Site - Kinsta
Learn how to fix the 504 Gateway Timeout error code on your WordPress site. Simple, easy to follow solutions to bring your site...
Read more >
Community Tip - Fixing Error 502 / 504: Bad Gateway
Generally, a HTTP 502 / 504 errors occurs because your origin server (e.g., your web host) is returning this code to us, and...
Read more >
504 Gateway Timeout Error and How to Fix It - 10Web
An HTTP 504 Gateway Timeout error is the most common error encountered by website developers. And in many cases, it can become a...
Read more >
Solved: Why would a published page give a 504 after a depl...
One of the publisher faulty to responed with 504 for Timeout error code.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found