Suddenly whenever my worker invokes my

Suddenly whenever my worker invokes my workflow I am getting a 500 error (Error: internal error {} ) I've tried looking all over for a better error log to explain what's going on but so far can't get it to tell me. If I wrap the workflow create call in a try catch all I get is the above error. My only slight lead is that maybe this started to happen after I tried to cross script bind the workflow to another worker, but that's not the script I'm calling this one from. Could a bad binding to something else be messing up this binding? Any leads on where to get a better error message on what's wrong or is there something going on with workflows?
17 Replies
Marc
MarcOP2w ago
I tried deleting the worker and recreating it to see if that helped. It did not. Still not working.... Also adding that when I delete the binding all together I get:
TypeError: Cannot read properties of undefined (reading 'create') {}
TypeError: Cannot read properties of undefined (reading 'create') {}
Also changing the name of the Workflow and updating the binding has not helped Account ID: 3e932c8878a8bf3d2a3f619cc6adda70
Matt Silverlock
@Sid Chatterjee or @Seekerdasbatatas - can you take a look at this? Can you provide your code + bindings + show that your bindings are detected on upload? There’s not enough to go off here. This error is almost always a typo or bindings config issue
Marc
MarcOP2w ago
Yeah happy to. The output from wrangler on upload looks correct
Matt Silverlock
I would still like you to paste it here
Marc
MarcOP2w ago
Yup one second
Matt Silverlock
The number of times that people have said it’s correct, but there has been a typo or other issue = too many to count 🙂
Marc
MarcOP2w ago
I'll hate myself if that's the case haha
main = "src/index.ts"
compatibility_date = "2025-02-28"
compatibility_flags = [ "nodejs_compat_v2", "nodejs_compat_populate_process_env"]
workers_dev = false
dev.port = 5142


[vars]


[observability]
enabled = true
logs = {invocation_logs = false}

[placement]
mode = "smart"

[[services]]
binding = "GATEKEEP"
service = "gatekeep"
entrypoint = "Gatekeeper"

[[workflows]]
name = "hubspot-linkedin-enricher-workflow"
binding = "HUBSPOT_LINKEDIN_ENRICHER"
class_name = "HubSpotLinkedInEnricherWorkflow"
main = "src/index.ts"
compatibility_date = "2025-02-28"
compatibility_flags = [ "nodejs_compat_v2", "nodejs_compat_populate_process_env"]
workers_dev = false
dev.port = 5142


[vars]


[observability]
enabled = true
logs = {invocation_logs = false}

[placement]
mode = "smart"

[[services]]
binding = "GATEKEEP"
service = "gatekeep"
entrypoint = "Gatekeeper"

[[workflows]]
name = "hubspot-linkedin-enricher-workflow"
binding = "HUBSPOT_LINKEDIN_ENRICHER"
class_name = "HubSpotLinkedInEnricherWorkflow"
Here's the wrangler.toml. I have wiped a few fields like name and vars for secruity but I can add them back if need be Here's the top part of the workflow:
export class HubSpotLinkedInEnricherWorkflow extends WorkflowEntrypoint<Env, HubSpotEnrichParams> {
async run(event: WorkflowEvent<HubSpotEnrichParams>, step: WorkflowStep) {
export class HubSpotLinkedInEnricherWorkflow extends WorkflowEntrypoint<Env, HubSpotEnrichParams> {
async run(event: WorkflowEvent<HubSpotEnrichParams>, step: WorkflowStep) {
I can give the whole thing if needed
Marc
MarcOP2w ago
No description
Marc
MarcOP2w ago
Here's the wrangler output showing that it seems to be all good
Marc
MarcOP2w ago
Here's the relevant invoking code
No description
Marc
MarcOP2w ago
Here's also a request ID from when it failed. Not sure if that's useful to your team: 92cae32bc7c1e5f0
Seekerdasbatatas
on it 🫡
Marc
MarcOP2w ago
Thanks @Seekerdasbatatas. Happy to DM you full code if you think it would help
Seekerdasbatatas
One question, what's the average size in bytes that you are expecting the params to take? I think I found the issue, the params you're providing has a length of 2189262 bytes (or ~2MIB) while the limit is 1MiB 🙂 - this should not be a internal error though, thanks for reporting I'll try to fix it
Marc
MarcOP2w ago
Ahhh that could be it Let me check, but it could be quite large I could just pass an ID and have it load it up on the other side (inside the workflow)
Seekerdasbatatas
yeah that's what I would recommend :MeowHeartCloudflare:
Marc
MarcOP2w ago
I'll try it and let you know if that fixes it Okay I think that fixed it! Thank you so much for helping to diagnose that. Would've struggled to find that. Long story short the data we were passing into the workflow was slowly growing which is why it seemed to happen out of nowhere. Obviously my only feedback is to make the error more descript

Did you find this page helpful?