transitive-bullshit / nextjs-notion-starter-kit

Deploy your own Notion-powered website in minutes with Next.js and Vercel.
https://transitivebullsh.it/nextjs-notion-starter-kit
MIT License
6.25k stars 5.26k forks source link

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

Open samggggflynn opened 2 years ago

samggggflynn commented 2 years ago

Description

This is the log I get while building static production.

2022-08-16T12:06:42.924Z    b0aac40d-9f0a-4543-9c05-96ed44765c89    WARN    NotionAPI getSignedfileUrls error HTTPError: Response code 400 (Bad Request)
    at Request.<anonymous> (/var/task/node_modules/notion-client/node_modules/got/dist/source/as-promise/index.js:117:42)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 'ERR_NON_2XX_3XX_RESPONSE',
  timings: {
    start: 1660651602784,
    socket: 1660651602784,
    lookup: 1660651602791,
    connect: 1660651602792,
    secureConnect: 1660651602798,
    upload: 1660651602798,
    response: 1660651602923,
    end: 1660651602923,
    error: undefined,
    abort: undefined,
    phases: {
      wait: 0,
      dns: 7,
      tcp: 1,
      tls: 6,
      request: 0,
      firstByte: 125,
      download: 0,
      total: 139
    }
  }
}

Notion Test Page ID

It is not a page-specific issue, as far as i know.

It seems like was caused by an older notion-x version, and fixed in a newer version, I am not realy sure.

UESTC-yingyang commented 2 years ago

I faced the same issue

muhaimincs commented 2 years ago

me too

LilMikey-CN commented 2 years ago

same issue here

acshameless commented 2 years ago

same issue here

biukang commented 2 years ago

same issue here

biukang commented 2 years ago

This problem is due to the old version notion-client. you can edit packge.json to upgrade notion-client to latest version for example:

    "notion-client": "^6.13.8",
    "notion-types": "^6.13.4",
    "notion-utils": "^6.13.4",
LilMikey-CN commented 2 years ago

This problem is due to the old version notion-client. you can edit packge.json to upgrade notion-client to latest version for example:

    "notion-client": "^6.13.8",
    "notion-types": "^6.13.4",
    "notion-utils": "^6.13.4",

I've already updated these but still got the same result.

NotionAPI getSignedfileUrls error HTTPError: Response code 400 (Bad Request)
--
10:39:38.673 | at Request.<anonymous> (/vercel/path0/node_modules/notion-client/node_modules/got/dist/source/as-promise/index.js:117:42)
10:39:38.673 | at runMicrotasks (<anonymous>)
10:39:38.673 | at processTicksAndRejections (node:internal/process/task_queues:96:5) {

I began to wonder maybe it's the network problem?

abhinandansharma commented 1 year ago

This problem is due to the old version notion-client. you can edit packge.json to upgrade notion-client to latest version for example:

    "notion-client": "^6.13.8",
    "notion-types": "^6.13.4",
    "notion-utils": "^6.13.4",

I've already updated these but still got the same result.

NotionAPI getSignedfileUrls error HTTPError: Response code 400 (Bad Request)
--
10:39:38.673 | at Request.<anonymous> (/vercel/path0/node_modules/notion-client/node_modules/got/dist/source/as-promise/index.js:117:42)
10:39:38.673 | at runMicrotasks (<anonymous>)
10:39:38.673 | at processTicksAndRejections (node:internal/process/task_queues:96:5) {

I began to wonder maybe it's the network problem?

Same issue here. Even after updating it. I also went ahead and checked network status. Notion tokens v2 as well. Everything looks good. Not sure what is the issue here.

PersistVenture commented 1 year ago

No error if run on localhost, but gives same error while deploy to vercel. Already updated the version in package.json.