Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Toast: missing context value #12

Open
jamesryan-dev opened this issue May 23, 2021 · 3 comments
Open

Error: Toast: missing context value #12

jamesryan-dev opened this issue May 23, 2021 · 3 comments

Comments

@jamesryan-dev
Copy link

Screenshot 2021-05-23 at 22 16 02

Error Message:

Error: Toast: missing context value
    at useToast (/static/js/app.bundle.js:388458:15)
    at BulkActionsMenu (/static/js/app.bundle.js:373645:85)
    at renderWithHooks (/static/js/vendor.bundle.js:17961:18)
    at mountIndeterminateComponent (/static/js/vendor.bundle.js:20640:13)
    at beginWork (/static/js/vendor.bundle.js:21754:16)
    at HTMLUnknownElement.callCallback (/static/js/vendor.bundle.js:3346:14)
    at Object.invokeGuardedCallbackDev (/static/js/vendor.bundle.js:3395:16)
    at invokeGuardedCallback (/static/js/vendor.bundle.js:3450:31)
    at beginWork$1 (/static/js/vendor.bundle.js:26361:7)
    at performUnitOfWork (/static/js/vendor.bundle.js:25312:12)

stack:

  in BulkActionsMenu (created by SuperPane)
    in div (created by SuperPane)
    in div (created by SuperPane)
    in div (created by SuperPane)
    in SuperPane (created by SuperPaneWrapper)
    in RouterProvider (created by SuperPaneWrapper)
    in SuperPaneWrapper (created by UserComponentPane)
    in div (created by ForwardRef(ScrollContainer))
    in ForwardRef(ScrollContainer) (created by DefaultPane)
    in div (created by DefaultPane)
    in div (created by DefaultPane)
    in LayerProvider (created by LegacyLayerProvider)
    in LegacyLayerProvider (created by DefaultPane)
    in DefaultPane (created by Styleable(DefaultPane))
    in Styleable(DefaultPane) (created by UserComponentPane)
    in UserComponentPane (created by DeskToolPane)
    in DeskToolPane (created by DeskToolPanes)
    in SplitPaneWrapper (created by DeskToolPanes)
    in div (created by Pane)
    in Pane (created by SplitPane)
    in div (created by SplitPane)
    in SplitPane (created by PanesSplitController)
    in div (created by PanesSplitController)
    in div (created by Pane)
    in Pane (created by SplitPane)
    in div (created by SplitPane)
    in SplitPane (created by PanesSplitController)
    in div (created by PanesSplitController)
    in PanesSplitController (created by DeskToolPanes)
    in PortalProvider (created by DeskToolPanes)
    in div (created by DeskToolPanes)
    in DeskToolPanes (created by DeskTool)
    in DeskTool (created by withRouter(DeskTool))
    in withRouter(DeskTool) (created by DeskToolPaneStateSyncer)
    in DeskToolPaneStateSyncer (created by DeskTool)
    in DeskToolFeaturesProvider (created by DeskTool)
    in DeskTool (created by RenderTool)
    in RenderTool (created by SchemaErrorReporter)
    in RouteScope (created by SchemaErrorReporter)
    in div (created by SchemaErrorReporter)
    in div (created by SchemaErrorReporter)
    in div (created by SchemaErrorReporter)
    in SchemaErrorReporter (created by DefaultLayout)
    in DefaultLayout (created by withRouter(DefaultLayout))
    in withRouter(DefaultLayout) (created by DefaultLayoutRoot)
    in RouterProvider (created by DefaultLayoutRoot)
    in LoginWrapper (created by DefaultLayoutRoot)
    in DefaultLayoutRoot (created by AppProvider)
    in div (created by styled.div)
    in styled.div (created by Box)
    in Box (created by Styled(Box))
    in Styled(Box) (created by Card)
    in Ge (created by ThemeProvider)
    in ThemeProvider (created by ThemeColorProvider)
    in ThemeColorProvider (created by Card)
    in Card (created by Styled(Card))
    in Styled(Card) (created by AppProvider)
    in SnackbarProvider (created by AppProvider)
    in ToastProvider (created by AppProvider)
    in LayerProvider (created by AppProvider)
    in PortalProvider (created by AppProvider)
    in UserColorManagerProvider (created by AppProvider)
    in AppProvider (created by SanityRoot)
    in Ge (created by ThemeProvider)
    in ThemeProvider (created by SanityRoot)
    in SanityRoot
    in AppContainer

sanity structure:


import S from "@sanity/desk-tool/structure-builder";
import { BiLoader } from "react-icons/bi";
import { ImStack } from "react-icons/im"
import { BsPersonBoundingBox } from "react-icons/bs";
import { createSuperPane } from 'sanity-super-pane';

export default () =>
  S.list()
    .title("Content")
    .items([
      S.listItem()
        .title("Loading Screen")
        .icon(BiLoader)
        .child(
          S.editor()
            .title("Loading screen")
            .id("loadingScreen")
            .schemaType("loadingScreen")
            .documentId("singleton-loadingScreen")
        ),
        S.listItem().title('Normal List').child(createSuperPane('loadingScreen', S)),

      S.listItem()
      .title("Page Builder")
      .icon(ImStack)
      .child(
        S.editor()
          .title("Page builder")
          .id("page")
          .schemaType("page")
          .documentId("singleton-page")
      ),
      S.listItem()
        .title("About")
        .icon(BsPersonBoundingBox)
        .child(
          S.editor()
            .title("About")
            .id("about")
            .schemaType("about")
            .documentId("singleton-about")
        ),

      ...S.documentTypeListItems().filter(
        (listItem) => !["loadingScreen", "about", "page"].includes(listItem.getId())
      ),
    ]);

Getting this error upon trying to get setup not sure if a bug or not

@ricokahler
Copy link
Owner

It seems like this is a bug on my end. Can you provide some details on what studio version your using (e.g. the contents of your package.json)? Need to replicate this first!

@jamesryan-dev
Copy link
Author

{
  "name": "pmo",
  "private": true,
  "version": "1.0.0",
  "description": "",
  "main": "package.json",
  "author": "James <[email protected]>",
  "license": "UNLICENSED",
  "scripts": {
    "start": "sanity start",
    "test": "sanity check",
    "build": "sanity build"
  },
  "keywords": [
    "sanity"
  ],
  "dependencies": {
    "@sanity/base": "^2.3.6",
    "@sanity/cli": "^2.10.0",
    "@sanity/color-input": "^2.2.6",
    "@sanity/components": "^2.2.6",
    "@sanity/core": "^2.3.3",
    "@sanity/dashboard": "^2.2.6",
    "@sanity/default-layout": "^2.3.6",
    "@sanity/default-login": "^2.2.6",
    "@sanity/desk-tool": "^2.3.6",
    "@sanity/ui": "0.32.8",
    "@sanity/vision": "^2.2.6",
    "prop-types": "^15.7",
    "react": "^17.0",
    "react-dom": "^17.0",
    "react-icons": "^4.1.0",
    "sanity-plugin-dark-theme-blue": "^1.0.1",
    "sanity-plugin-mux-input": "^0.3.1",
    "sanity-super-pane": "^1.0.0-alpha.3"
  },
  "devDependencies": {},
  "repository": {
    "type": "git",
    "url": "[email protected]:namesfm/pmo.git"
  }
}

@jamesryan-dev
Copy link
Author

Could it be because I've changed my username so the url isn't correct?

 "repository": {
    "type": "git",
    "url": "[email protected]:namesfm/pmo.git"
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants