UploadThing Callback Failing on Localhost with useUploadThing Hook

I'm experiencing an issue where UploadThing successfully uploads images, but the callback to my local application fails. As a result, uploaded images are not being reflected in my application's UI. The callback error indicates a transport issue when attempting to POST to http://localhost:3000/api/uploadthing. Error Logs:
✓ Compiled /api/uploadthing in 1068ms (3228 modules)
POST /api/uploadthing?actionType=upload&slug=productUploader 200 in 1175ms
ERROR (#42) handleJsonLineStream=2033ms handleUploadAction=2064ms: Failed to forward callback request from dev stream
signature: hmac-sha256=40a14c33081b1e4975a1dc6000812132343411241341409966217ac8f85d2284b351d
hook: callback
payload: {"status":"uploaded","metadata":{},"file":{"url":"https://utfs.io/f/BSckEMHO6XG2adfasdfasfasdfafdafdafas4","appUrl":"https://utfs.io/a/valy6o7o4x/BScadfasfafasdfXG23OekOJasdfafasfsafG9Ilotg865bzk4","name":"fwfwff33f.png","key":"BSckEMHO6XG23OekOJzETPZOjfUwcvhVyLG9Ilotg865bzk4","size":2493007,"type":"image/png","customId":null,"fileHash":"f9460ef834258c9be42a7675124523522304b"}}
error: RequestError: Transport error (POST http://localhost:3000/api/uploadthing)
at fetch failed: TypeError: Cannot perform ArrayBuffer.prototype.slice on a detached ArrayBuffer
✓ Compiled /api/uploadthing in 1068ms (3228 modules)
POST /api/uploadthing?actionType=upload&slug=productUploader 200 in 1175ms
ERROR (#42) handleJsonLineStream=2033ms handleUploadAction=2064ms: Failed to forward callback request from dev stream
signature: hmac-sha256=40a14c33081b1e4975a1dc6000812132343411241341409966217ac8f85d2284b351d
hook: callback
payload: {"status":"uploaded","metadata":{},"file":{"url":"https://utfs.io/f/BSckEMHO6XG2adfasdfasfasdfafdafdafas4","appUrl":"https://utfs.io/a/valy6o7o4x/BScadfasfafasdfXG23OekOJasdfafasfsafG9Ilotg865bzk4","name":"fwfwff33f.png","key":"BSckEMHO6XG23OekOJzETPZOjfUwcvhVyLG9Ilotg865bzk4","size":2493007,"type":"image/png","customId":null,"fileHash":"f9460ef834258c9be42a7675124523522304b"}}
error: RequestError: Transport error (POST http://localhost:3000/api/uploadthing)
at fetch failed: TypeError: Cannot perform ArrayBuffer.prototype.slice on a detached ArrayBuffer
Environment:
UploadThing Version: @uploadthing/react@^7.0.3
Node Version: 20.16
Framework: Next.js
UploadThing Version: @uploadthing/react@^7.0.3
Node Version: 20.16
Framework: Next.js
2 Replies
adonis03
adonis03OP4w ago
@julius Could you please take a look at this issue regarding a transport error with UploadThing callbacks on localhost? https://github.com/pingdotgg/uploadthing/issues/1032
GitHub
UploadThing Callback Failing on Localhost with useUploadThing Hook ...
I understand that this issue may be closed if it should be filed in another category I understand My issue I'm experiencing an issue where UploadThing successfully uploads images, but the callb...
julius
julius4w ago
did you resolve this? i can see you closed the issue
Want results from more Discord servers?
Add your server