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] Inngest not working with hono #556
Comments
I found a workaround for it, I'm running Maybe is related to this issue: inngest/inngest#1274 |
@BernardoSM This is working for me with Cloudflare Workers and Hono app.on(["GET", "PUT", "POST"], "/api/inngest", (c) => {
const handler = serve({
client: inngest,
functions,
signingKey: c.env.INNGEST_SIGNING_KEY,
});
return handler(c);
}); |
Ok I am not sure what the issue is but the example is using port 3000. If you serve the Cloudflare worker at its regular port of 8787 it works with |
Thanks for the reports, folks! I've added a fix for some of these issues over at #571 and you're right, @BernardoSM: inngest/inngest#1274 would definitely have been causing the double-app issue. I'd love it if folks could test out that the fix at #571 works. You can check it out using For the large
I'm still seeing those even when everything's working fine, and also it's kind of sporadic and not on every poll. 🤔 It may be an issue with the way the Dev Server is closing requests (especially the discovery requests which are intended to be very low cost), so definitely something we can address. Mentioning an issue that might be related: cloudflare/workerd#1401. By the sounds of it, it's an overly-loud log that sounds more threatening that it is, but still something we can resolve. |
…571) ## Summary <!-- Succinctly describe your change, providing context, what you've changed, and why. --> The `"inngest/hono"` serve handler was not fetching environment variables, which are not reliably accessible via globals in common environments such as Cloudflare Workers. In addition, `url` handling was a little wonky and didn't seem to handle many variants. The hope was that Hono handled that to ensure that `c.req.url` is always/never absolute, but this doesn't seem to be the case. ## Checklist <!-- Tick these items off as you progress. --> <!-- If an item isn't applicable, ideally please strikeout the item by wrapping it in "~~"" and suffix it with "N/A My reason for skipping this." --> <!-- e.g. "- [ ] ~~Added tests~~ N/A Only touches docs" --> - [ ] ~Added a [docs PR](https://github.com/inngest/website) that references this PR~ N/A - [ ] ~Added unit/integration tests~ N/A - [x] Added changesets if applicable ## Related <!-- A space for any related links, issues, or PRs. --> <!-- Linear issues are autolinked. --> <!-- e.g. - INN-123 --> <!-- GitHub issues/PRs can be linked using shorthand. --> <!-- e.g. "- inngest/inngest#123" --> <!-- Feel free to remove this section if there are no applicable related links.--> - Supersedes #557 as we should no longer be required to manually set signing and event keys - Fixes #560's URL issues - Fixes _some_ of the isues in #556, though there are still some unknowns for the C++ errors there
Describe the bug
3 days ago was merged hono framework for inngest that you can see here.
I tried to run the example and works pretty well, but when I run inngest dev server I'm receiving some errors.
To Reproduce
Steps to reproduce the behavior:
http://localhost:3000/api/inngest
to check if inngest is workingnpx inngest-cli@latest dev
in terminalExpected behavior
Not show any error on terminal that is running hono (cloudflare worker) with inngest.
Not show two apps on inngest dev server
Code snippets / Logs / Screenshots
Hono terminal errors:
Inngest dev server trying to connect at the same app twice:
System info (please complete the following information):
The text was updated successfully, but these errors were encountered: