invalid json response with templates (gatsby)
See original GitHub issueWhen developing
or building
in Gatsby
I’m getting error messages when trying to fetch the templates
However if I try to remove mdx
files to isolate which file is causing the error (the error messages don’t give a clue), I end up without any consistent finding, and this error comes and goes without any apparent explanation
At this point I am suspecting that too many files are causing this error (as if gatsby was claiming the templates multiple times instead of implementing some sort of cache), but only an hypothesis
If I manually go to the template links I can see the file without problem, now I’ll try to use local files instead, but before I wanted to ask here whether this is something known
success building schema - 0.367s
ERROR
Failed to get the sandbox template: vanilla
ERROR
Failed to get the sandbox template: new
ERROR
Failed to get the sandbox template: new
ERROR
Failed to get the sandbox template: new
ERROR
Failed to get the sandbox template: vanilla
ERROR
invalid json response body at https://codesandbox.io/api/v1/sandboxes/vanilla reason: Unexpected token < in JSON at position 0
FetchError: invalid json response body at https://codesandbox.io/api/v1/sandboxes/vanilla reason: Unexpected token < in JSON at position 0
- body.js:48
[kuworking]/[isomorphic-fetch]/[node-fetch]/lib/body.js:48:31
- task_queues.js:97 processTicksAndRejections
internal/process/task_queues.js:97:5
- getTemplate.js:67 getTemplate
[kuworking]/[remark-codesandbox]/src/getTemplate.js:67:24
- index.js:84 transformer
[kuworking]/[remark-codesandbox]/src/index.js:84:24
- get-source-plugins-as-remark-plugins.js:59 transformer
[kuworking]/[gatsby-plugin-mdx]/utils/get-source-plugins-as-remark-plugins.js:59:11
ERROR
invalid json response body at https://codesandbox.io/api/v1/sandboxes/new reason: Unexpected token < in JSON at position 0
FetchError: invalid json response body at https://codesandbox.io/api/v1/sandboxes/new reason: Unexpected token < in JSON at position 0
- body.js:48
[kuworking]/[isomorphic-fetch]/[node-fetch]/lib/body.js:48:31
- runMicrotasks
- task_queues.js:97 processTicksAndRejections
internal/process/task_queues.js:97:5
- getTemplate.js:67 getTemplate
[kuworking]/[remark-codesandbox]/src/getTemplate.js:67:24
- getTemplate.js:38 getTemplate
[kuworking]/[remark-codesandbox]/src/getTemplate.js:38:26
- index.js:84 transformer
[kuworking]/[remark-codesandbox]/src/index.js:84:24
- get-source-plugins-as-remark-plugins.js:59 transformer
[kuworking]/[gatsby-plugin-mdx]/utils/get-source-plugins-as-remark-plugins.js:59:11
ERROR
invalid json response body at https://codesandbox.io/api/v1/sandboxes/new reason: Unexpected token < in JSON at position 0
FetchError: invalid json response body at https://codesandbox.io/api/v1/sandboxes/new reason: Unexpected token < in JSON at position 0
- body.js:48
[kuworking]/[isomorphic-fetch]/[node-fetch]/lib/body.js:48:31
- runMicrotasks
- task_queues.js:97 processTicksAndRejections
internal/process/task_queues.js:97:5
- getTemplate.js:67 getTemplate
[kuworking]/[remark-codesandbox]/src/getTemplate.js:67:24
- getTemplate.js:38 getTemplate
[kuworking]/[remark-codesandbox]/src/getTemplate.js:38:26
- index.js:84 transformer
[kuworking]/[remark-codesandbox]/src/index.js:84:24
- get-source-plugins-as-remark-plugins.js:59 transformer
[kuworking]/[gatsby-plugin-mdx]/utils/get-source-plugins-as-remark-plugins.js:59:11
ERROR
invalid json response body at https://codesandbox.io/api/v1/sandboxes/new reason: Unexpected token < in JSON at position 0
FetchError: invalid json response body at https://codesandbox.io/api/v1/sandboxes/new reason: Unexpected token < in JSON at position 0
- body.js:48
[kuworking]/[isomorphic-fetch]/[node-fetch]/lib/body.js:48:31
- runMicrotasks
- task_queues.js:97 processTicksAndRejections
internal/process/task_queues.js:97:5
- getTemplate.js:67 getTemplate
[kuworking]/[remark-codesandbox]/src/getTemplate.js:67:24
- getTemplate.js:38 getTemplate
[kuworking]/[remark-codesandbox]/src/getTemplate.js:38:26
- index.js:84 transformer
[kuworking]/[remark-codesandbox]/src/index.js:84:24
- get-source-plugins-as-remark-plugins.js:59 transformer
[kuworking]/[gatsby-plugin-mdx]/utils/get-source-plugins-as-remark-plugins.js:59:11
ERROR
invalid json response body at https://codesandbox.io/api/v1/sandboxes/vanilla reason: Unexpected token < in JSON at position 0
FetchError: invalid json response body at https://codesandbox.io/api/v1/sandboxes/vanilla reason: Unexpected token < in JSON at position 0
- body.js:48
[kuworking]/[isomorphic-fetch]/[node-fetch]/lib/body.js:48:31
- runMicrotasks
- task_queues.js:97 processTicksAndRejections
internal/process/task_queues.js:97:5
- getTemplate.js:67 getTemplate
[kuworking]/[remark-codesandbox]/src/getTemplate.js:67:24
- index.js:84 transformer
[kuworking]/[remark-codesandbox]/src/index.js:84:24
- get-source-plugins-as-remark-plugins.js:59 transformer
[kuworking]/[gatsby-plugin-mdx]/utils/get-source-plugins-as-remark-plugins.js:59:11
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
"gatsby-source-graphql" threw an error while running ... - GitHub
This error means that the client fails to parse the server response. Have you tried running the same GraphQL query against your remote...
Read more >Troubleshooting Common Errors - Gatsby
This generally happens when plugins that are used together are added in the gatsby-config in the wrong order, or haven't been added at...
Read more >0 - Stack Overflow
npm install: npm ERR! invalid json response body at https://registry.npmjs.org/axios reason: Unexpected end of JSON input.
Read more >API Routes: Response Helpers - Next.js
API Routes include a set of Express.js-like methods for the response to help you creating new API endpoints. Learn how it works here....
Read more >Advanced GraphQL Usage In Gatsby Websites
With GraphQL, a client/consumer can request exactly the data it requires. The server/provider responds with a JSON response signature matching ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, versions are now updated 🙌🙌🙌
Ahh! My bad! I just updated
gatsby-remark-inline-codesandbox
to0.6.1
then! Please upgrade it and try again.