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

search function is not available #546

Open
bluexg7 opened this issue Sep 10, 2023 · 10 comments
Open

search function is not available #546

bluexg7 opened this issue Sep 10, 2023 · 10 comments

Comments

@bluexg7
Copy link

bluexg7 commented Sep 10, 2023

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

@danni-cool
Copy link

danni-cool commented Oct 17, 2023

@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/

@tuan404
Copy link

tuan404 commented Oct 19, 2023

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

@danni-cool
Copy link

@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

@prgf87
Copy link

prgf87 commented Oct 28, 2023

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

@bluexg7
Copy link
Author

bluexg7 commented Jan 21, 2024

@danni-cool Thanks for your fix

@dvitanov
Copy link

Thank you for the fix @danni-cool

@Divide-By-0
Copy link

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

@iyongliang
Copy link

@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?

@danni-cool
Copy link

danni-cool commented Apr 1, 2024

@neeyongliang it was fixed in the dependency of react-notion-x@6.16.1, 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.

@yanyanlongxia
Copy link

@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!

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

8 participants