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: tail workers not work and break the dashboard #3745

Closed
madawei2699 opened this issue Aug 12, 2023 · 3 comments
Closed

🐛 BUG: tail workers not work and break the dashboard #3745

madawei2699 opened this issue Aug 12, 2023 · 3 comments
Labels
awaiting reporter response Needs clarification or followup from OP bug Something that isn't working

Comments

@madawei2699
Copy link

Which Cloudflare product(s) does this pertain to?

Workers for Platforms

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

3.1.2 [wrangler]

What version of Node are you using?

v18.15.0

What operating system are you using?

Mac

Describe the Bug

I tried to set up a consumer worker as described in the docs, however, that will crash the Cloudflare Dashboard UI after I deploy the worker :NotLikeThis: Also the tailing does not work, the tail worker does not receive any events.

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

@madawei2699 madawei2699 added the bug Something that isn't working label Aug 12, 2023
@1000hz 1000hz added the awaiting reporter response Needs clarification or followup from OP label Aug 14, 2023
@1000hz
Copy link
Contributor

1000hz commented Aug 14, 2023

Sorry you're running into this. Since this issue isn't directly related to wrangler or any projects contained in this repo, I'll close this and open an internal ticket to track this elsewhere. If you could provide more detail about the specific error you received in the Dashboard, the URL you were visiting when you saw the error page, and how you deployed the worker it would help us a lot in fixing the issue. Thanks!

@1000hz 1000hz closed this as completed Aug 14, 2023
@madawei2699
Copy link
Author

madawei2699 commented Aug 15, 2023

Hi, @1000hz Sorry for that, but the tail worker broke the other worker's dashboard and did not work.

The context is, I create a tail worker, the code is very simple:

export interface Env {
  NEWRELIC_API_ENDPOINT: string
  NEWRELIC_API_KEY: string
}

export default {
  async tail(events: TailEvent, env: Env, ctx: any) {
		const { NEWRELIC_API_ENDPOINT, NEWRELIC_API_KEY } = env
		console.log('NEWRELIC_API_KEY', NEWRELIC_API_KEY)
		console.log('tail', events)
		// TODO: send log one by one, newrelic can parse json array
    const res = await fetch(NEWRELIC_API_ENDPOINT, {
      method: "POST",
			headers: {
				"Content-Type": "application/json",
				"Api-Key": NEWRELIC_API_KEY,
			},
      body: JSON.stringify({}),
    })
		const json = await res.json()
		console.log('res', json)
  }
}

But when I deploy the production, I need to connect it to other workers like:
image

After I click the button Save and deploy in the dashboard and the dashboard is broken like:
image

And if I need the dashboard back, I need to use the wrangler in CLI to redeploy the worker without the tail worker.

And most important, the tail worker can not receive any logs from other workers bound to it.

So could you help to report this issue to the internal team? Because it stop me to use the tail worker to collect the logs and it is important to me.

And this is my worker URL with the issue: https://dash.cloudflare.com/20cf736b0cc331fdc0fd15533bb1a2dc/workers/services/view/my-invest-gateway/production/settings/bindings

Thanks.

@1000hz
Copy link
Contributor

1000hz commented Aug 25, 2023

Hi @madawei2699, thanks for adding that information! This should now be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reporter response Needs clarification or followup from OP bug Something that isn't working
Projects
None yet
Development

No branches or pull requests

2 participants