Error - Something went wrong. Please contact UploadThing

I am making an app and I got a error:
[Error] Something went wrong. Please contact UploadThing and provide the following cause: – "RuntimeException: received a non PollingResponse from the polling endpoint"
(anonymous function) (app-index.js:33)
(anonymous function) (hydration-error-info.js:63)
(anonymous function) (button-client-SozDaD-i.js:225)
[Error] Something went wrong. Please contact UploadThing and provide the following cause: – "RuntimeException: received a non PollingResponse from the polling endpoint"
(anonymous function) (app-index.js:33)
(anonymous function) (hydration-error-info.js:63)
(anonymous function) (button-client-SozDaD-i.js:225)
13 Replies
D4rzk
D4rzkOP7mo ago
server console:
ℹ UPLOADTHING 7:05:25 PM UploadThing dev server is now running!
POST /api/uploadthing?actionType=upload&slug=imageUploader 200 in 1981ms
ℹ UPLOADTHING 7:05:31 PM [
ℹ UPLOADTHING 7:05:31 PM "SIMULATING FILE UPLOAD WEBHOOK CALLBACK",
ℹ UPLOADTHING 7:05:31 PM "http://localhost:3000/api/uploadthing?slug=imageUploader"
ℹ UPLOADTHING 7:05:31 PM ]
ℹ UPLOADTHING 7:05:31 PM UploadThing dev server is now running!
POST /api/uploadthing?slug=imageUploader 200 in 620ms
ℹ UPLOADTHING 7:05:32 PM [
ℹ UPLOADTHING 7:05:32 PM "Successfully simulated callback for file",
ℹ UPLOADTHING 7:05:32 PM "e9cd5020-282f-4d37-ab97-d5a727f12583-2487m.jpg"
ℹ UPLOADTHING 7:05:32 PM ]
ℹ UPLOADTHING 7:05:25 PM UploadThing dev server is now running!
POST /api/uploadthing?actionType=upload&slug=imageUploader 200 in 1981ms
ℹ UPLOADTHING 7:05:31 PM [
ℹ UPLOADTHING 7:05:31 PM "SIMULATING FILE UPLOAD WEBHOOK CALLBACK",
ℹ UPLOADTHING 7:05:31 PM "http://localhost:3000/api/uploadthing?slug=imageUploader"
ℹ UPLOADTHING 7:05:31 PM ]
ℹ UPLOADTHING 7:05:31 PM UploadThing dev server is now running!
POST /api/uploadthing?slug=imageUploader 200 in 620ms
ℹ UPLOADTHING 7:05:32 PM [
ℹ UPLOADTHING 7:05:32 PM "Successfully simulated callback for file",
ℹ UPLOADTHING 7:05:32 PM "e9cd5020-282f-4d37-ab97-d5a727f12583-2487m.jpg"
ℹ UPLOADTHING 7:05:32 PM ]
code: core.ts
import { createUploadthing, type FileRouter } from 'uploadthing/next'
import { z } from 'zod'

const f = createUploadthing()

export const ourFileRouter = {
imageUploader: f({ image: { maxFileSize: '4MB' } })
.input(z.object({ configId: z.string().optional() }))
.middleware(async ({ input }) => {
return { input }
})
.onUploadComplete(async ({ metadata }) => {
const { configId } = metadata.input

return { configId }
}),
} satisfies FileRouter

export type OurFileRouter = typeof ourFileRouter
import { createUploadthing, type FileRouter } from 'uploadthing/next'
import { z } from 'zod'

const f = createUploadthing()

export const ourFileRouter = {
imageUploader: f({ image: { maxFileSize: '4MB' } })
.input(z.object({ configId: z.string().optional() }))
.middleware(async ({ input }) => {
return { input }
})
.onUploadComplete(async ({ metadata }) => {
const { configId } = metadata.input

return { configId }
}),
} satisfies FileRouter

export type OurFileRouter = typeof ourFileRouter
route.ts
import { createRouteHandler } from 'uploadthing/next'

import { ourFileRouter } from './core'

export const { GET, POST } = createRouteHandler({
router: ourFileRouter,
})
import { createRouteHandler } from 'uploadthing/next'

import { ourFileRouter } from './core'

export const { GET, POST } = createRouteHandler({
router: ourFileRouter,
})
@julius
julius
julius7mo ago
can you check the network tab and see what response you're getting from GET https://uploadthing.com/api/serverCallback
D4rzk
D4rzkOP7mo ago
No description
No description
julius
julius7mo ago
it dies after that one request? no additional polls?
D4rzk
D4rzkOP7mo ago
julius
julius7mo ago
ok repro'd. not sure why i didn't get this when testing before latest release.... you can set skipPolling on the hook/component to skip the polling if you're not relying on server data but i'll get on and fix this right away
D4rzk
D4rzkOP7mo ago
Do u want my code?
julius
julius7mo ago
no i got it
D4rzk
D4rzkOP7mo ago
Unfortunately, I need ok thanks
julius
julius7mo ago
kk gimme a few minutes and i'll have a patch release out kk [email protected] and @uploadthing/[email protected] should be out in a minute
julius
julius7mo ago
GitHub
chore(release): 📦 version packages (#793) · pingdotgg/uploadthing@...
File uploads for modern web devs. Contribute to pingdotgg/uploadthing development by creating an account on GitHub.
D4rzk
D4rzkOP7mo ago
Yep it works now thanks u are my hero ❤️
Want results from more Discord servers?
Add your server