darobin / notion-backup

Simple command to backup a Notion workspace
MIT License
425 stars 63 forks source link

Header overflow issue #13

Open sivertigo opened 2 years ago

sivertigo commented 2 years ago

Hi!

I found it sometimes causes header overflow problem like below.

Error: Parse Error: Header overflow
    at TLSSocket.socketOnData (_http_client.js:474:22)
    at TLSSocket.emit (events.js:314:20)
    at addChunk (_stream_readable.js:297:12)
    at readableAddChunk (_stream_readable.js:272:9)
    at TLSSocket.Readable.push (_stream_readable.js:213:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:1[8]
    ...

In this case, I could solve this problem by adding a node option to workflow file.

      - name: Run backup
        run: notion-backup
        env:
          NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
          NOTION_SPACE_ID: ${{ secrets.NOTION_SPACE_ID }}
          NODE_OPTIONS: "--max-http-header-size 15000"    # ADD THIS LINE
snoopyuj commented 2 years ago

Thank you!

darobin commented 2 years ago

Thank you! I tried to make this change internally, but axios doesn't accept the equivalent option. If I get the time I will add it there (assuming they take it) so that this can work without tinkering with the environment. Leaving this issue open just in case.

In the meantime, I've updated the docs — thanks!

Explosion-Scratch commented 2 years ago

THANK YOU

It took forever to find this and 6 whole days of my notion workspace not being backed up 😩