nextjs-notion-starter-kit icon indicating copy to clipboard operation
nextjs-notion-starter-kit copied to clipboard

search function is not available

Open bluexg7 opened this issue 2 years ago • 10 comments

Description

search function is not available.

Error Details

error - HTTPError: Response code 400 (Bad Request) at Request. (/Users/guoxin/Workspace/JsProjects/my-blog/node_modules/notion-client/node_modules/got/dist/source/as-promise/index.js:117:42) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 'ERR_NON_2XX_3XX_RESPONSE', timings: { start: 1694342767231, socket: 1694342767231, lookup: 1694342767248, connect: 1694342767521, secureConnect: 1694342767799, upload: 1694342767800, response: 1694342768142, end: 1694342768144, error: undefined, abort: undefined, phases: { wait: 0, dns: 17, tcp: 273, tls: 278, request: 1, firstByte: 342, download: 2, total: 913 } }, page: '/api/search-notion' }

suggestions

  1. Use official api [Recommend, if repo owner has some time😊] notion-client which is used in this repo is unofficial, here is official api, https://github.com/makenotion/notion-sdk-js

  2. Keep using private api, but need to do some replacement work search method in notion-client is outdated, I have try searching in notion.so, we should use "https://www.notion.so/api/v3/queryCollection?src=change_search" to replace "https://www.notion.so/api/v3/search".

Notion Test Page ID

bluexg7 avatar Sep 10 '23 10:09 bluexg7

@bluexg7 I fixed the problem temporarily, and wrote an article, if you are interested, here's the link. https://danni.cool/2023/10/17/Fixed%20the%20broken%20search%20in%20nextjs-notion-starter-kit/

danni-cool avatar Oct 17 '23 10:10 danni-cool

Hello @danni-cool, it looks like the notion-client6.15.6.patch file is broken. Any chance you could shoot over another copy to [email protected]? Thanks a bunch in advance!

tuan404 avatar Oct 19 '23 16:10 tuan404

@tuan404 Thx for informing me, I tested the notion link, and it's working, I‘ve uploaded a copy on Google Drive: https://drive.google.com/file/d/17AQFkbqJVH53DGIKYGZBHGTH1w6Rgpzu/view

danni-cool avatar Oct 20 '23 00:10 danni-cool

@danni-cool worked for me, thank you for the fix

prgf87 avatar Oct 28 '23 10:10 prgf87

@danni-cool Thanks for your fix

bluexg7 avatar Jan 21 '24 11:01 bluexg7

Thank you for the fix @danni-cool

dvitanov avatar Jan 25 '24 19:01 dvitanov

I still have this issue on the latest fork of this repo.

Divide-By-0 avatar Mar 27 '24 00:03 Divide-By-0

@tuan404 Thx for informing me, I tested the notion link, and it's working, I‘ve uploaded a copy on Google Drive: https://drive.google.com/file/d/17AQFkbqJVH53DGIKYGZBHGTH1w6Rgpzu/view

worked for me, thank you. Add a pull/request for others?

iyongliang avatar Apr 01 '24 14:04 iyongliang

@neeyongliang it was fixed in the dependency of [email protected], but the version in this repo was fixed to 6.15.6。I tried to upgrade it alone but there came other new problems. this is a minimal way to solve this problem.

danni-cool avatar Apr 01 '24 15:04 danni-cool

@bluexg7 I fixed the problem temporarily, and wrote an article, if you are interested, here's the link. https://danni.cool/2023/10/17/Fixed%20the%20broken%20search%20in%20nextjs-notion-starter-kit/

Worked for me. Thanks!

yanyanlongxia avatar Aug 12 '24 04:08 yanyanlongxia