webbertakken / email-worker

Lightweight tool to process emails directly from Cloudflare
MIT License
41 stars 9 forks source link

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

Open bn-l opened 2 months ago

bn-l commented 2 months ago

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 commented 2 months ago

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

.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)

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 commented 2 months ago

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 commented 2 months ago

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

bn-l commented 2 months ago

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.