TanStackT
TanStack10mo ago
18 replies
urgent-maroon

Cannot read properties of undefined (reading 'result')

I kept getting this random error on my loader function so I changed it to a before load and I keep getting the exact same error. Its so weird because I can't even catch the bloody error. If I place a try catch over my entire fn it still throws.

This is the entire error:
TypeError: Cannot read properties of undefined (reading 'result')
    at eval (/home/tmx/personal/heikecspvpay/node_modules/@tanstack/start-server-functions-handler/dist/esm/index.js:93:18)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async handleServerRequest (/home/tmx/personal/heikecspvpay/node_modules/@tanstack/start-server-functions-handler/dist/esm/index.js:68:20)
    at async handleServerAction (/home/tmx/personal/heikecspvpay/node_modules/@tanstack/start-server-functions-handler/dist/esm/index.js:13:20)
    at async _callHandler (file:///home/tmx/personal/heikecspvpay/node_modules/h3/dist/index.mjs:1837:16)
    at async file:///home/tmx/personal/heikecspvpay/node_modules/h3/dist/index.mjs:1978:19
    at async Object.callAsync (file:///home/tmx/personal/heikecspvpay/node_modules/unctx/dist/index.mjs:72:16)
    at async toNodeHandle (file:///home/tmx/personal/heikecspvpay/node_modules/h3/dist/index.mjs:2270:7)
    at async ufetch (file:///home/tmx/personal/heikecspvpay/node_modules/unenv/runtime/fetch/index.mjs:9:17)
    at async eval (/home/tmx/personal/heikecspvpay/node_modules/@tanstack/start-server-functions-ssr/dist/esm/index.js:14:19)
    at async serverFnFetcher (/home/tmx/personal/heikecspvpay/node_modules/@tanstack/start-server-functions-fetcher/dist/esm/index.js:57:47)
    at async Object.beforeLoad (/home/tmx/personal/heikecspvpay/src/routes/success.tsx:64:7)
    at async file:///home/tmx/personal/heikecspvpay/node_modules/@tanstack/react-router/dist/esm/router.js:998:47


I have identified that the error occurs after I try to update some stuff on a google sheet. But its weird because the update goes through perfectly
Was this page helpful?