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

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

Open samggggflynn opened this issue 2 years ago • 9 comments

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.

samggggflynn avatar Aug 16 '22 12:08 samggggflynn

I faced the same issue

UESTC-yingyang avatar Sep 17 '22 05:09 UESTC-yingyang

me too

muhaimincs avatar Sep 19 '22 04:09 muhaimincs

same issue here

LilMikey-CN avatar Sep 23 '22 02:09 LilMikey-CN

same issue here

acshameless avatar Sep 26 '22 10:09 acshameless

same issue here

biukang avatar Sep 27 '22 10:09 biukang

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",

biukang avatar Sep 27 '22 13:09 biukang

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?

LilMikey-CN avatar Sep 30 '22 02:09 LilMikey-CN

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.

abhinandansharma avatar Mar 15 '23 17:03 abhinandansharma

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

PersistVenture avatar Sep 18 '23 04:09 PersistVenture