You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
at n (/tmp/app/.next/server/app/api/upload/route.js:1:861867)
at al (/tmp/app/.next/server/app/api/upload/route.js:1:516675)
at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
at async /var/task/node_modules/.pnpm/next@14.2.33_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:38411
at async e_.execute (/var/task/node_modules/.pnpm/next@14.2.33_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:27880)
at async e_.handle (/var/task/node_modules/.pnpm/next@14.2.33_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:39943)
at async doRender (/var/task/node_modules/.pnpm/next@14.2.33_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/server/base-server.js:1366:42)
at async cacheEntry.responseCache.get.routeKind (/var/task/node_modules/.pnpm/next@14.2.33_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/server/base-server.js:1588:28)
at async NextNodeServer.renderToResponseWithComponentsImpl (/var/task/node_modules/.pnpm/next@14.2.33_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/server/base-server.js:1496:28)
at async NextNodeServer.renderPageComponent (/var/task/node_modules/.pnpm/next@14.2.33_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/server/base-server.js:1924:24)
Which points to a error with analytics rather than an issue with the upload route itself, creating a PR that makes posthog failures non-fatal immediately, whether this is the actual issue remains to be seen
Good news! Uploads are working again, although posthog stills errors out (amplify log attached). I'll let other maintainers continue the cleanup.
[UPLOAD_ANALYTICS_ERROR] {
name: 'TypeError',
message: 'a.PostHog is not a constructor',
stack: 'TypeError: a.PostHog is not a constructor\n' +
' at n (/tmp/app/.next/server/app/api/upload/route.js:1:862217)\n' +
' at al (/tmp/app/.next/server/app/api/upload/route.js:1:516679)\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n' +
' at async /var/task/node_modules/.pnpm/next@14.2.33_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:38411\n' +
' at async e_.execute (/var/task/node_modules/.pnpm/next@14.2.33_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:27880)\n' +
' at async e_.handle (/var/task/node_modules/.pnpm/next@14.2.33_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:39943)\n' +
' at async doRender (/var/task/node_modules/.pnpm/next@14.2.33_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/server/base-server.js:1366:42)\n' +
' at async cacheEntry.responseCache.get.routeKind (/var/task/node_modules/.pnpm/next@14.2.33_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/server/base-server.js:1588:28)\n' +
' at async NextNodeServer.renderToResponseWithComponentsImpl (/var/task/node_modules/.pnpm/next@14.2.33_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/server/base-server.js:1496:28)\n' +
' at async NextNodeServer.renderPageComponent (/var/task/node_modules/.pnpm/next@14.2.33_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/server/base-server.js:1924:24)'
}
Thanks again for adding that try/catch block for PostHog
I just wanted to give you a heads up that I finally tracked down the root cause of the PostHog is not a constructor error .
It turns out it was a weird Next.js Webpack bug where the bundler was mangling the posthog-node library during ESM/CJS interop.
I've opened a new PR that adds a bulletproof dynamic import to sniff out the constructor properly. Your try/catch block is still super important (to wrap third-party APIs!), but the actual underlying constructor crash should be officially gone now! (hopefully)
Activity
PVER-Programz commentedon Oct 1, 2026
Important
Apparently there are issues with your google cloud credentials.
The GCP api keys might have expired.. Do they expire tho ? 🤔
[-]Unable to add papers[/-][+][Critical issue] Unable to add papers[/+][-][Critical issue] Unable to add papers[/-][+][CRITICAL ISSUE] Unable to add papers[/+]atharvaSharma17 commentedon Oct 4, 2026
Thank you for bringing this to our attention. Our team is actively looking into resolving this issue.
abhitrueprogrammer commentedon Oct 5, 2026
A brief look at the amplify logs shows:
Which points to a error with analytics rather than an issue with the upload route itself, creating a PR that makes posthog failures non-fatal immediately, whether this is the actual issue remains to be seen
abhitrueprogrammer commentedon Oct 5, 2026
#541
abhitrueprogrammer commentedon Oct 5, 2026
Rithish-2914 commentedon Oct 5, 2026
Thanks again for adding that try/catch block for PostHog
I just wanted to give you a heads up that I finally tracked down the root cause of the PostHog is not a constructor error .
It turns out it was a weird Next.js Webpack bug where the bundler was mangling the posthog-node library during ESM/CJS interop.
I've opened a new PR that adds a bulletproof dynamic import to sniff out the constructor properly. Your try/catch block is still super important (to wrap third-party APIs!), but the actual underlying constructor crash should be officially gone now! (hopefully)