sanity-io / startup-starter-kit

The Structured Content Startup Starter Kit
46 stars 14 forks source link

Errors after creation #3

Open silvio-e opened 5 years ago

silvio-e commented 5 years ago

Fresh install of the kit and just added a page with a hero section. Added a route to show it as frontpage. Took a while until the page got updated but it worked.

Then suddenly, after changing some content in the Company info page all disappeared and I get this in the browser console but nothing in the terminal:

The above error occurred in the <Context.Consumer> component:
    in StaticQuery (at Theme.js:40)
    in ThemeProvider (at page.js:26)
    in Page (created by PageRenderer)
    in PageRenderer (at json-store.js:93)
    in JSONStore (created by EnsureResources)
    in ScrollContext (at root.js:63)
    in RouteUpdates (at root.js:62)
    in EnsureResources (at root.js:60)
    in RouteHandler (created by Root)
    in div (created by FocusHandlerImpl)
    in FocusHandlerImpl (created by Context.Consumer)
    in FocusHandler (created by RouterImpl)
    in RouterImpl (created by LocationProvider)
    in LocationProvider (created by Context.Consumer)
    in Location (created by Context.Consumer)
    in Router (created by Root)
    in Root (at root.js:119)
    in _default (created by HotExported_default)
    in AppContainer (created by HotExported_default)
    in HotExported_default (at app.js:55)

React will try to recreate this component tree from scratch using the error boundary you provided, LocationProvider. Users/silvio/Development/startup-starter-kit/frontend/node_modules/react-error-overlay/lib/index.js:2172:16
__stack_frame_overlay_proxy_console__27React    <anonymous> Users/silvio/Development/startup-starter-kit/frontend/.cache/app.js:97

The above error occurred in the <LocationProvider> component:
    in LocationProvider (created by Context.Consumer)
    in Location (created by Context.Consumer)
    in Router (created by Root)
    in Root (at root.js:119)
    in _default (created by HotExported_default)
    in AppContainer (created by HotExported_default)
    in HotExported_default (at app.js:55)

React will try to recreate this component tree from scratch using the error boundary you provided, AppContainer. Users/silvio/Development/startup-starter-kit/frontend/node_modules/react-error-overlay/lib/index.js:2172:16

TypeError: "_ref3$brand is null"
    render Users/silvio/Development/startup-starter-kit/frontend/src/providers/Theme.js:42
    StaticQuery Users/silvio/Development/startup-starter-kit/frontend/.cache/gatsby-browser-entry.js:52
updateContextConsumer18React    <anonymous> Users/silvio/Development/startup-starter-kit/frontend/.cache/app.js:97
 Users/silvio/Development/startup-starter-kit/frontend/node_modules/react-error-overlay/lib/index.js:2172:16

The above error occurred in the <Context.Consumer> component:
    in StaticQuery (at Theme.js:40)
    in ThemeProvider (at page.js:26)
    in Page (created by PageRenderer)
    in PageRenderer (at json-store.js:93)
    in JSONStore (created by EnsureResources)
    in ScrollContext (at root.js:63)
    in RouteUpdates (at root.js:62)
    in EnsureResources (at root.js:60)
    in RouteHandler (created by Root)
    in div (created by FocusHandlerImpl)
    in FocusHandlerImpl (created by Context.Consumer)
    in FocusHandler (created by RouterImpl)
    in RouterImpl (created by LocationProvider)
    in LocationProvider (created by Context.Consumer)
    in Location (created by Context.Consumer)
    in Router (created by Root)
    in Root (at root.js:119)
    in _default (created by HotExported_default)
    in AppContainer (created by HotExported_default)
    in HotExported_default (at app.js:55)

React will try to recreate this component tree from scratch using the error boundary you provided, LocationProvider. Users/silvio/Development/startup-starter-kit/frontend/node_modules/react-error-overlay/lib/index.js:2172:16

The above error occurred in the <LocationProvider> component:
    in LocationProvider (created by Context.Consumer)
    in Location (created by Context.Consumer)
    in Router (created by Root)
    in Root (at root.js:119)
    in _default (created by HotExported_default)
    in AppContainer (created by HotExported_default)
    in HotExported_default (at app.js:55)

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries. Users/silvio/Development/startup-starter-kit/frontend/node_modules/react-error-overlay/lib/index.js:2172:16
kmelve commented 5 years ago

It seems to me that some data for the brand is missing in Theme.js? Can you try adding it and publishing in the Studio, and see if that solves it?