-
Notifications
You must be signed in to change notification settings - Fork 349
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
Unable to run cli 0.83.x on a Mac - Error: Returning from a request handler without responding or attaching an abort handler is forbidden! #5562
Comments
Please create a reproduction on CodeSandbox. |
Don't think that is possible, I do not see any option on CodeSandbox to run MacOS |
Maybe it's related to the new dependency: |
Hi there. I'm having the same issue and manage to make it work. I was looking for a reason why this is happening and found that every request handler MUST end send a response. Debugging the project, I manage to make it work by adding an else condition for when (I think) the server is not ready yet. This is not a solution, but a starting point for someone that knows a lot more about the library (I'm just starting using it). After that, add an else condition that sends a response. What I'm doing at the moment is add this: else {
endResponse(
new Response(null, {
status: 503,
statusText: 'Service Unavailable',
}),
);
} That way, the server continues execution and if I refresh the page after a couple of seconds, everything works as intended. I guess we could wait until the server is ready somehow, so this else condition wouldn't be required, or something else. But since I don't know enough of the codebase, I can't write a PR to fix this as it should be. I hope this helps anyone to fix this error. BTW, this happens only if I run mesh dev, if I build and start this doesn't happen. EDIT1: Maybe it is due that the browser is making a request too early. Maybe delay the browser start or leave it to the user to open the URL from the command line. If you can suggest me where this is set up, I could test it. Greetings, |
I have the same problem. What is last working version of dependencies? |
|
Perfect! Thx a lot. That helped! |
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
below
Describe the bug
When running cli with
mesh dev
on a Mac 13.4 with @graphql-mesh/cli version 0.83.1 or newer the following error is seen:if version of cli is downgraded 0.82.35 - it works fine
When tested in a linux container, it appears to also work fine - perhaps related to the code that is opening the browser?
To Reproduce Steps to reproduce the behavior:
Using the following config, run
npm install; npm run dev
package.json
.meshrc.yml
Environment:
Additional context
N/A
The text was updated successfully, but these errors were encountered: