inngest / inngest-js

The developer platform for easily building reliable workflows with zero infrastructure for TypeScript & JavaScript
https://www.inngest.com/
GNU General Public License v3.0
443 stars 43 forks source link

Syncing inngest app in Remix using Single Fetch throws an error #735

Open aon opened 4 weeks ago

aon commented 4 weeks ago

Describe the bug If using the new Single Fetch function, calling the endpoint where inngest is located with PUT, it throws the following error:

Unhandled error in Remix request
    module: "remix"
    err: {
      "type": "SyntaxError",
      "message": "Failed calling `body` from serve handler when checking body for request signing as method is PUT; Unexpected end of JSON input",
      "stack":
          SyntaxError: Failed calling `body` from serve handler when checking body for request signing as method is PUT; Unexpected end of JSON input
              at JSON.parse (<anonymous>)
              at parseJSONFromBytes (node:internal/deps/undici/undici:5584:19)
              at successSteps (node:internal/deps/undici/undici:5555:27)
              at fullyReadBody (node:internal/deps/undici/undici:1665:9)
              at async specConsumeBody (node:internal/deps/undici/undici:5564:7)
              at async Promise.all (index 2)
              at InngestHandler (/Users/agustin/Developer/personal/afippi/node_modules/.pnpm/inngest@3.23.1_express@4.21.1_typescript@5.4.5/node_modules/src/components/InngestCommHandler.ts:755:41)
              at async Object.callRouteAction (/Users/agustin/Developer/personal/afippi/node_modules/.pnpm/@remix-run+server-runtime@2.13.1_typescript@5.4.5/node_modules/@remix-run/server-runtime/dist/data.js:36:16)
              at <anonymous> (/Users/agustin/Developer/personal/afippi/node_modules/.pnpm/@remix-run+router@1.20.0/node_modules/@remix-run/router/router.ts:4899:19)
              at callLoaderOrAction (/Users/agustin/Developer/personal/afippi/node_modules/.pnpm/@remix-run+router@1.20.0/node_modules/@remix-run/router/router.ts:4963:16)
              at async Promise.all (index 0)
              at defaultDataStrategy (/Users/agustin/Developer/personal/afippi/node_modules/.pnpm/@remix-run+router@1.20.0/node_modules/@remix-run/router/router.ts:4772:17)
              at callDataStrategyImpl (/Users/agustin/Developer/personal/afippi/node_modules/.pnpm/@remix-run+router@1.20.0/node_modules/@remix-run/router/router.ts:4835:17)
              at callDataStrategy (/Users/agustin/Developer/personal/afippi/node_modules/.pnpm/@remix-run+router@1.20.0/node_modules/@remix-run/router/router.ts:3992:19)
              at submit (/Users/agustin/Developer/personal/afippi/node_modules/.pnpm/@remix-run+router@1.20.0/node_modules/@remix-run/router/router.ts:3755:21)
              at queryImpl (/Users/agustin/Developer/personal/afippi/node_modules/.pnpm/@remix-run+router@1.20.0/node_modules/@remix-run/router/router.ts:3684:22)

To Reproduce Steps to reproduce the behavior:

  1. Start your application
  2. Run curl -X PUT http://localhost:3000/api/inngest

System info

linear[bot] commented 4 weeks ago

INN-3985 Syncing inngest app in Remix using Single Fetch throws an error

linear[bot] commented 4 weeks ago

INN-3986 Syncing inngest app in Remix using Single Fetch throws an error