Unexpected token '<', "<html> <h"... is not valid JSON #9666
Unanswered
isaacromerop
asked this question in
Q&A
Replies: 1 comment
-
@isaacromerop To fix the "Unexpected token '<', '<h'... is not valid JSON" error, ensure that server-side error handling in Remix consistently returns JSON responses. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This error is giving me lot of problems. I can't find the reason. Some times, users try to go to a page and get this error as response. There is no happening to specific endpoint. Any endpoint can throw it.
I am using Remix 2.9.2.
This is the stack trace: Error: Unexpected token '<', "
<h"... is not valid JSON
at JSON.parse()
at _Response.json(/var/task/build/server.mjs:25403:21)
at process.processTicksAndRejections(node:internal/process/task_queues:95:5)
at async fetchFn(/var/task/build/server.mjs:221266:22)
at async getUser(/var/task/build/server.mjs:226532:20)
at async loader(/var/task/build/server.mjs:255686:16)
at async callRouteLoader(/var/task/build/server.mjs:32361:16)
at ? (/var/task/build/server.mjs:30200:21)
at async callLoaderOrAction(/var/task/build/server.mjs:30260:16)
at async Promise.all(index 1)
I suspect is a timeout since I have only seen this kind of response (HTML) with timeouts. But I alrady set up the remix entry.server the abort delay in 60000 (60 secs) and still happening.
All my route.tsx files are default exports and the other files are export (export {Component}).
Don't have any other clue about it.
I deployed my app with arc and also with sst ion... Still the same.
Beta Was this translation helpful? Give feedback.
All reactions