Uncaught error Cannot read property 'blue' of undefined
See original GitHub issueEverything worked fine for couple months and suddenly it is no longer working
Describe the bug
Uncaught error Cannot read property ‘blue’ of undefined
Stack:
TypeError: at https://369leh.vercel.app/static/js/app.bundle.js?de392c25b71c5062dc63:78:25696 at Array.reduce (<anonymous>) at Object.<anonymous> (https://369leh.vercel.app/static/js/app.bundle.js?de392c25b71c5062dc63:78:25658) at l (https://369leh.vercel.app/static/js/vendor.bundle.js?4f7e199f796bdcb9a3f5:1:410) at Object.<anonymous> (https://369leh.vercel.app/static/js/app.bundle.js?de392c25b71c5062dc63:78:24173) at l (https://369leh.vercel.app/static/js/vendor.bundle.js?4f7e199f796bdcb9a3f5:1:410) at Object.<anonymous> (https://369leh.vercel.app/static/js/app.bundle.js?de392c25b71c5062dc63:78:23935) at l (https://369leh.vercel.app/static/js/vendor.bundle.js?4f7e199f796bdcb9a3f5:1:410) at Object.<anonymous> (https://369leh.vercel.app/static/js/app.bundle.js?de392c25b71c5062dc63:78:23739) at l (https://369leh.vercel.app/static/js/vendor.bundle.js?4f7e199f796bdcb9a3f5:1:410)
(Your browsers Developer Tools may contain more info) Uncaught TypeError: Cannot read property ‘blue’ of undefined at app.bundle.js?de392c25b71c5062dc63:78 at Array.reduce (<anonymous>) at Object.<anonymous> (app.bundle.js?de392c25b71c5062dc63:78) at l (vendor.bundle.js?4f7e199f796bdcb9a3f5:1) at Object.<anonymous> (app.bundle.js?de392c25b71c5062dc63:78) at l (vendor.bundle.js?4f7e199f796bdcb9a3f5:1) at Object.<anonymous> (app.bundle.js?de392c25b71c5062dc63:78) at l (vendor.bundle.js?4f7e199f796bdcb9a3f5:1) at Object.<anonymous> (app.bundle.js?de392c25b71c5062dc63:78) at l (vendor.bundle.js?4f7e199f796bdcb9a3f5:1)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I was expecting to be asked for login.
Run sanity versions
in the terminal and copy-paste the result here.
@sanity/cli 2.10.0 (up to date)
@sanity/base 2.10.2 (up to date)
@sanity/cli 2.10.0 (up to date)
@sanity/code-input 2.9.0 (up to date)
@sanity/components 2.2.6 (up to date)
@sanity/core 2.10.2 (up to date)
@sanity/default-layout 2.10.2 (up to date)
@sanity/default-login 2.8.0 (up to date)
@sanity/desk-tool 2.10.4 (up to date)
@sanity/production-preview 2.2.6 (up to date)
@sanity/vision 2.10.0 (up to date)
What operating system are you using?
Which versions of Node.js / npm are you running?
Run npm -v && node -v
in the terminal and copy-paste the result here.
6.14.13
v14.17.0
Additional context
Add any other context about the problem here. It may be related, or not, not sure, I can access the studio in development using localhost:3333, but the preview feature is not working. When clicking on “Open Preview” I am getting the error: Internal Server Error And here are the details in the console:
Loaded env from /Users/levi/react_projects/test/369leh/frontend/.env.local ready - started server on 0.0.0.0:3000, url: http://localhost:3000 event - compiled successfully event - build page: / wait - compiling… event - compiled successfully Using the Sanity client without specifying an API version is deprecated. See https://docs.sanity.io/help/js-client-api-version event - build page: /api/blogs wait - compiling… event - compiled successfully event - build page: /api/preview wait - compiling… event - compiled successfully ClientError: Unauthorized - Session not found at onResponse (/Users/levi/react_projects/test/369leh/frontend/node_modules/@sanity/client/lib/http/request.js:27:13) at applyMiddleware (/Users/levi/react_projects/test/369leh/frontend/node_modules/get-it/lib-node/util/middlewareReducer.js:14:23) at onResponse (/Users/levi/react_projects/test/369leh/frontend/node_modules/get-it/lib-node/index.js:81:22) at /Users/levi/react_projects/test/369leh/frontend/node_modules/get-it/lib-node/index.js:48:55 at callback (/Users/levi/react_projects/test/369leh/frontend/node_modules/get-it/lib-node/request/node-request.js:57:46) at /Users/levi/react_projects/test/369leh/frontend/node_modules/get-it/lib-node/request/node-request.js:141:14 at DestroyableTransform.<anonymous> (/Users/levi/react_projects/test/369leh/frontend/node_modules/simple-concat/index.js:8:13) at Object.onceWrapper (events.js:482:28) at DestroyableTransform.emit (events.js:388:22) at endReadableNT (/Users/levi/react_projects/test/369leh/frontend/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:1010:12) at processTicksAndRejections (internal/process/task_queues.js:82:21) { response: { body: { errorCode: ‘SIO-401-ANF’, message: ‘Session not found’, statusCode: 401, error: ‘Unauthorized’ }, url: “https://ulym7tod.api.sanity.io/v1/data/query/production?query=*[_type %3D%3D “blog” %26%26 slug.current %3D%3D %24slug] { title%2C subtitle%2C ‘slug’%3A slug.current%2C date%2C ‘author’%3A author->{name%2C ‘avatar’%3A avatar.asset->url}%2C coverImage%2C content[]{...%2C “asset”%3A asset->} }&%24slug=“first-tought””, method: ‘GET’, headers: { date: ‘Fri, 21 May 2021 16:36:38 GMT’, ‘content-type’: ‘application/json; charset=utf-8’, ‘x-ratelimit-limit-second’: ‘500’, ‘x-ratelimit-remaining-second’: ‘499’, ‘ratelimit-remaining’: ‘499’, ‘ratelimit-limit’: ‘500’, ‘ratelimit-reset’: ‘1’, ‘content-length’: ‘97’, vary: ‘Origin’, xkey: ‘project-ulym7tod, project-ulym7tod-production’, via: ‘1.1 google’, ‘alt-svc’: ‘clear’, connection: ‘close’ }, statusCode: 401, statusMessage: ‘Unauthorized’ }, statusCode: 401, responseBody: ‘{\n’ + ’ “errorCode”: “SIO-401-ANF”,\n’ + ’ “message”: “Session not found”,\n’ + ’ “statusCode”: 401,\n’ + ’ “error”: “Unauthorized”\n’ + ‘}’ }
Not sure what is going on here but something is not right. Any help will be much appreciated.
Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (2 by maintainers)
This one fixed the problem, many thanks.
$ rm -rf node_modules yarn.lock && npm i
Many thnaks!
Could you try reinstalling dependencies by doing
rm -rf node_modules yarn.lock && yarn
(orrm -rf node_modules yarn.lock && npm i
if you prefer npm)?