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

Question: Did you manage to get the console to trigger the email handler on the worker? #40

Open
bn-l opened this issue May 3, 2024 · 7 comments
Labels
question Further information is requested

Comments

@bn-l
Copy link

bn-l commented May 3, 2024

I saw your question here on a stackoverflow scraper (SO doesn't rank at all on google for the error message: "Email Trigger not available to this workers").

Did you manage to get the console next to the code editor working?

@webbertakken
Copy link
Owner

I'm not really in context of that anymore, but I just checked. Here's what I can say:

  • The repo is still a good working example
  • I can open the "Edit code" view
  • It shows a different error instead of malfunctioning altogether

.internal-f0f1e173-d2b2-4572-b0f4-76f5471a5a8a-facade-1.js:14 Error: No fetch handler!
at facade_modules_fetch (.internal-f0f1e173-d2b2-4572-b0f4-76f5471a5a8a-loader.js:23:38)
at facade_invokeChain (.internal-f0f1e173-d2b2-4572-b0f4-76f5471a5a8a-common.js:16:10)
at Object.next (.internal-f0f1e173-d2b2-4572-b0f4-76f5471a5a8a-common.js:13:14)
at jsonError (.internal-f0f1e173-d2b2-4572-b0f4-76f5471a5a8a-facade-1.js:12:32)
at facade_invokeChain (.internal-f0f1e173-d2b2-4572-b0f4-76f5471a5a8a-common.js:16:10)
at Object.next (.internal-f0f1e173-d2b2-4572-b0f4-76f5471a5a8a-common.js:13:14)
at scheduled (.internal-f0f1e173-d2b2-4572-b0f4-76f5471a5a8a-facade-0.js:9:24)
at facade_invokeChain (.internal-f0f1e173-d2b2-4572-b0f4-76f5471a5a8a-common.js:16:10)
at facade_invoke (.internal-f0f1e173-d2b2-4572-b0f4-76f5471a5a8a-common.js:19:10)

  • The interface for sending a test email seems to be gone entirely

i.e. instead of this:

image

There's now this:

image

Looks like they've moved from their proprietary editor to a webbased implementation of VS Code, which no longer has any notion of emails.

Recommend using the official docs @ https://developers.cloudflare.com/email-routing/email-workers/

@webbertakken
Copy link
Owner

Reading in the docs, I now remember that you have to access email workers through Email > Email Routing > Email Workers to access it through the email specific editor, which seems to still be the old editor.

I see that the email trigger is not available still. However that might be because I haven't updated my wrangler config for a while.

image

@webbertakken
Copy link
Owner

webbertakken commented May 3, 2024

Just updated all deps #41 and wrangler and wrangler config #42.

The result is the same in the console: Email Trigger not available to this workers

So I guess the answer is that CF don't have that UI working yet.

I can confirm that my discord debug channel is still receiving

image

@webbertakken webbertakken added the question Further information is requested label May 3, 2024
@bn-l
Copy link
Author

bn-l commented May 4, 2024

Wow huge thanks for A: getting back to me and B: such a thorough response. Very appreciative.

So as it stands now the console is definitely bugged but emails are triggering the "email" handler (this is from my own testing also).

I hope someone googling that error finds this thread.

@badilaa-ppb
Copy link

Hi all,

I have the same error how did you managed to test it?

@webbertakken
Copy link
Owner

For unit / integration testing, there's the automated tests that you can find in the repo.

For the end-to-end test I just sent an email myself and verified that it sent the message to the discord channel (see screenshot above).

@badilaa-ppb
Copy link

Thank you, how did you log the message?

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

No branches or pull requests

3 participants