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 [email protected] 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
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Sep 17, 2023
@jspspike jspspike added the pages Relating to Pages label Sep 18, 2023
@jspspike jspspike removed this from workers-sdk Sep 18, 2023
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Oct 26, 2023
@lrapoport-cf lrapoport-cf moved this from Untriaged to Backlog in workers-sdk Oct 26, 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 CarmenPopoviciu moved this from Backlog to Untriaged in workers-sdk May 8, 2024
@CarmenPopoviciu CarmenPopoviciu moved this from Untriaged to Backlog in workers-sdk May 8, 2024
@CarmenPopoviciu CarmenPopoviciu moved this from Backlog to In Progress in workers-sdk May 13, 2024
@CarmenPopoviciu CarmenPopoviciu self-assigned this May 13, 2024
@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

@CarmenPopoviciu CarmenPopoviciu moved this from In Progress to In Review in workers-sdk May 14, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in workers-sdk May 15, 2024
@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