adonis03
adonis03
TTCTheo's Typesafe Cult
Created by adonis03 on 10/25/2024 in #questions
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
5 replies
TTCTheo's Typesafe Cult
Created by adonis03 on 8/8/2024 in #questions
Session Callback Not Triggering in NextAuth Integration with tRPC
Hello everyone, I'm facing an issue where the NextAuth session callback is not being triggered when using credentials, causing undefined session data to be passed to tRPC context. The session callback works correctly with Google login. If anyone can provide insights or suggestions, I'd appreciate it. For more details, please check the GitHub discussion. Thank you!
5 replies