react-notion-x: Board views are not being rendered: (skipping missing collection view for block)

Public Notion Page Link: https://www.notion.so/b966297c5e874435837c9c531cd0c25f

I just discovered that sometimes board views are not being rendered with react-notion-x. I am not sure if I have to enable something for it to work.

FYI:

  • I have already added Collection and CollectionRow components to NotionRenderer.
  • This seems to be happening only for Board views. Gallery and Table views are working properly.
  • I am getting the error message skipping missing collection view for block

It would be really helpful if someone can point me to what is happening here.

Thanks.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 4
  • Comments: 29 (9 by maintainers)

Most upvoted comments

Note: Turns out my problem was unrelated to this issue.

I’ve investigated things a little bit and it seems that the collection property is no longer fetched properly: CleanShot 2021-07-09 at 11 07 11

When comparing results with the DevTools results on an opened Notion web page, I’ve noticed that they’ve seemed to changed the API (which was kind of to expected given it’s an unofficial API). Instead of the loadPageChunk API (which is used by the package) the Notion web app seems to use a loadCachedPageChunk API.

image

@pbteja1998 I am starting to see this be an issue. It will be one of the next things I work on. 👌 If you have any pointers or things that you have found, let me know!

@pbteja1998 this is now fixed in v4.7.10

I’ve taken a closer look and it turns out my problem was most likely unrelated to the thread above. I’ve hidden my comments above to make it easier for others to follow along the original thread. 🙈

TLDR: I’m SSRing private pages which requires the following parameter for the NotionAPI client. The problem was that the token_v2 value expired earlier than expected leading to the error message I’ve posted above.

import { NotionAPI } from 'notion-client'

export const notion = new NotionAPI({
  // extract from Notion cookies
  authToken: process.env['NOTION_AUTH_TOKEN'],
  activeUser: process.env['NOTION_USER_ID'],
})

Thanks a lot for looking into this regardless @normdoow 💯

@normdoow as you seem to be mostly maintaining this lib right now - any chance you could take a look into this? 👀