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: wrangler logs success for pages deploy even with Functions failures #3966

Closed
Cherry opened this issue Sep 17, 2023 · 4 comments · Fixed by #5819
Closed

🐛 BUG: wrangler logs success for pages deploy even with Functions failures #3966

Cherry opened this issue Sep 17, 2023 · 4 comments · Fixed by #5819
Assignees
Labels
bug Something that isn't working internal Requires support from the Cloudflare Platform pages Relating to Pages pages-dev Relating to `pages dev` command

Comments

@Cherry
Copy link
Contributor

Cherry commented Sep 17, 2023

Which Cloudflare product(s) does this pertain to?

Wrangler core

What version(s) of the tool(s) are you using?

3.8.0

What version of Node are you using?

18.17.1

What operating system are you using?

Windows 10

Describe the Bug

When publishing a Pages project with Functions, wrangler will seemingly always report a success, even if the Functions upload fails.

Example:

index.html:

<html>
<body>
	<h1>Hello World</h1>
</body>
</html>

functions/_middleware.js:

const a = true;
a();
export function onRequest(context){
	return context.next()
}

Result via wrangler (npx wrangler@3.8.0 pages deploy .):

✨ Successfully created the 'test-functions-errors' project.
✨ Compiled Worker successfully
🌏  Uploading... (1/1)

✨ Success! Uploaded 1 files (1.56 sec)

✨ Uploading Functions bundle
✨ Deployment complete! Take a peek over at https://3f676375.test-functions-errors.pages.dev

But the Cloudflare Pages dashboard shows an error:

And the project isn't actually available. There's no way to get logs about what happened here, so folks are left confused.

This happens periodically in Discord, requiring a Pages team member to pull logs for a deployment ID, as well as on the forum such as at https://community.cloudflare.com/t/wrangler-pages-publish-always-fails-tried-both-with-nextjs-and-with-astro-templates/554749?u=cherryjimbo.

@Cherry Cherry added the bug Something that isn't working label Sep 17, 2023
@jspspike jspspike added the pages Relating to Pages label Sep 18, 2023
@lrapoport-cf lrapoport-cf added the internal Requires support from the Cloudflare Platform label Nov 15, 2023
@superjose
Copy link

Oh this is currently happening to me
image

image

@CarmenPopoviciu CarmenPopoviciu added the pages-dev Relating to `pages dev` command label Apr 24, 2024
@rishi-raj-jain
Copy link

Happening with me as well. The CLI fails to return a warning.

@CarmenPopoviciu
Copy link
Contributor

CarmenPopoviciu commented May 14, 2024

hey folks,

Thank you so much for raising this issue 🫶 . Really appreciate all the details provided 💖

I'm happy to report there's an open PR that addresses this bug. Really excited to be fixing this, as I think it'll be incredibly helpful for our users moving forward 🤗

Feel free to have a look and make your voice heard wrt the proposed solution. Particularly interested in knowing if the logging we put in place there provides you with sufficient information. Feedback is always much appreciated

<3

@superjose
Copy link

OMG IT Worked now!!! hahahah, My script is over the 1 MiB size limit!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working internal Requires support from the Cloudflare Platform pages Relating to Pages pages-dev Relating to `pages dev` command
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants