Skip to content

NotionAPI getSignedfileUrls error HTTPError: Response code 400 (Bad Request) #331

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

Closed
Pipe-Runner opened this issue Jul 24, 2022 · 6 comments · Fixed by #332
Closed

NotionAPI getSignedfileUrls error HTTPError: Response code 400 (Bad Request) #331

Pipe-Runner opened this issue Jul 24, 2022 · 6 comments · Fixed by #332

Comments

@Pipe-Runner
Copy link

Description

All the static builds were fine up until 22nd July 2022, but since yesterday, I have started getting these errors in my build, and oddly, my development builds have become super slow.

This is the log I get while building both static production and SSR development builds.

NotionAPI getSignedfileUrls error HTTPError: Response code 400 (Bad Request)
    at Request.<anonymous> (/home/runner/work/pipe-runner-website/pipe-runner-website/node_modules/got/dist/source/as-promise/index.js:117:42)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5) ***
  code: undefined,
  timings: ***
    start: 1658648256775,
    socket: 1658648256776,
    lookup: 1658648256785,
    connect: 1658648256794,
    secureConnect: 1658648256804,
    upload: 1658648256804,
    response: 1658648256918,
    end: 1658648256918,
    error: undefined,
    abort: undefined,
    phases: ***
      wait: 1,
      dns: 9,
      tcp: 9,
      tls: 10,
      request: 0,
      firstByte: 114,
      download: 0,
      total: 1[43](https://github.com/Pipe-Runner-Lab/pipe-runner-website/runs/7486332222?check_suite_focus=true#step:7:44)
    ***
  ***
***

Notion Test Page ID

As far as I can tell, this is not a page-specific issue since earlier, the same pages have been working fine for me.
Also, I have done a shallow check and it seems the pages are rendered all right, but I am not sure yet.

Version

"notion-client": "5.0.0",
"notion-types": "5.0.0",
"notion-utils": "5.0.0",
"react-notion-x": "5.0.0"

Has something changed from Notion again?? 😢

@Pipe-Runner
Copy link
Author

Bumping up the package version to 6.12.11 did not help. This seems like something that will break a lot of builds. Am I the only one facing this issue?

@ghost
Copy link

ghost commented Jul 25, 2022

Same thing for us. The build process is broken

"notion-client": "^4.9.9",
"react-notion-x": "^4.11.3"

@remorses
Copy link
Contributor

I think i found the problem, i am gonna open a PR soon

Basically i found that if you pass links that cannot be signed by Notion now it will give an error (the error happens only when you have other non video embeds in the page)

@AakashMallik Can you give me the Notion page url where you have the problem?

@Pipe-Runner
Copy link
Author

@remorses I belive this is one page which was throwing this error:
https://piperunner.notion.site/Keeping-your-code-clean-Linting-in-detail-ea06ce0b641d48299e193d811f68839f

The error itself is not really breaking anything in the rendered page, but the dev process becomes extremely slow since the page build waits for the error for some reason, in which case for a page that used to take 2-5sec to SSR now takes 2mins in dev.

@adlpz
Copy link

adlpz commented Jul 28, 2022

Can confirm that @remorses's PR seems to solve the issue for my project.

No idea if there may be additional edge cases tho.

@Pipe-Runner
Copy link
Author

Thanks a lot, this solved the issue.

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