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

Desk tool crash: editOpsOf does not expect a draft id #6704

Open
pacocoursey opened this issue May 16, 2024 · 6 comments
Open

Desk tool crash: editOpsOf does not expect a draft id #6704

pacocoursey opened this issue May 16, 2024 · 6 comments
Labels

Comments

@pacocoursey
Copy link

Describe the bug

The desk tool crashes when opening a draft document.

Error: editOpsOf does not expect a draft id.
    at getIdPairFromPublished (http://localhost:3333/node_modules/.sanity/vite/deps/chunk-SZUASH76.js?v=5cad09ac:109455:11)
    at Object.editState (http://localhost:3333/node_modules/.sanity/vite/deps/chunk-SZUASH76.js?v=5cad09ac:109517:31)
    at http://localhost:3333/node_modules/.sanity/vite/deps/chunk-SZUASH76.js?v=5cad09ac:133233:31
    at getValue (http://localhost:3333/node_modules/.sanity/vite/deps/chunk-SZUASH76.js?v=5cad09ac:36907:40)
    at http://localhost:3333/node_modules/.sanity/vite/deps/chunk-SZUASH76.js?v=5cad09ac:36957:12
    at mountMemo (http://localhost:3333/node_modules/.sanity/vite/deps/chunk-FIY3V743.js?v=5cad09ac:17409:27)
    at Object.useMemo (http://localhost:3333/node_modules/.sanity/vite/deps/chunk-FIY3V743.js?v=5cad09ac:17733:24)
    at useMemo (http://localhost:3333/node_modules/.sanity/vite/deps/chunk-LD72NT7V.js?v=5cad09ac:1094:29)
    at useMemoObservable (http://localhost:3333/node_modules/.sanity/vite/deps/chunk-SZUASH76.js?v=5cad09ac:36956:51)
    at useEditState (http://localhost:3333/node_modules/.sanity/vite/deps/chunk-SZUASH76.js?v=5cad09ac:133222:10)

To Reproduce

This is the schema of the document that is crashing the desk tool:

export const partnerList = defineType({
  name: "partners.list",
  title: "Partners",
  type: "document",
  fields: [
    {
      name: "list",
      title: "List",
      description: "List of partners",
      type: "array",
      of: [{ type: "partners.partner" }],
    },
  ],
});

Expected behavior

The desk tool should not crash.

Screenshots

iRVdtB2N@2x

Which versions of Sanity are you using?

@sanity/cli (global)        3.42.1 (up to date)
@sanity/cli                 3.42.1 (up to date)
@sanity/code-input           4.1.4 (up to date)
@sanity/preview-url-secret  1.6.13 (up to date)
@sanity/ui                  2.1.10 (up to date)
@sanity/vision              3.42.1 (up to date)
sanity                      3.42.1 (up to date)

What operating system are you using?

macOS 14.4.1

Which versions of Node.js / npm are you running?

pnpm 9.1.1
node 20.11.1

Additional context

N/A

@pacocoursey pacocoursey changed the title Desk tool creash: editOpsOf does not expect a draft id Desk tool crash: editOpsOf does not expect a draft id May 16, 2024
@bjoerge
Copy link
Member

bjoerge commented May 22, 2024

Hi @pacocoursey – sorry you're running into this.

I'm not able to reproduce this, unfortunately. Any chance you could provide more details about the steps you took to get this error? Or provide a minimal and runnable repro project?

@bjoerge
Copy link
Member

bjoerge commented May 27, 2024

Closing due to inactivity

@bjoerge bjoerge closed this as not planned Won't fix, can't repro, duplicate, stale May 27, 2024
@skyatlinear
Copy link

skyatlinear commented May 29, 2024

@bjoerge Sky here. This activity is happening for me and paco reached out on my behalf. I'm uploading how I got to the page here.

CleanShot.2024-05-29.at.13.09.15.mp4

@bjoerge bjoerge reopened this May 30, 2024
@bjoerge
Copy link
Member

bjoerge commented May 30, 2024

@skyatlinear do you happen to have any customizations in this studio? For example, any custom document actions?

@skyatlinear
Copy link

I just edited something and didn't see anything similar, but I'm not confident that's the best way to check. Is there a better way to confirm?

@juice49
Copy link
Contributor

juice49 commented Jun 10, 2024

Hi @skyatlinear. Customisations would be made in your Studio configuration file, which is usually named sanity.config.ts. It'd be best to check by looking in there. Do you have access to your Studio project's source code?

@linear linear bot added the bug label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants