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

Axios 1.2.1 has an issue with Brotli #17316

Closed
christianrr opened this issue Jan 27, 2023 · 2 comments
Closed

Axios 1.2.1 has an issue with Brotli #17316

christianrr opened this issue Jan 27, 2023 · 2 comments

Comments

@christianrr
Copy link
Contributor

christianrr commented Jan 27, 2023

Describe the Bug

Axios has an issue with Brotli and this causes arbitrary errors in requests (axios/axios#5346).
This is mainly happening if Axios is used in extensions, we have not observed any error within the Directus source yet.

However, since this was fixed in 1.2.2 an upgrade of Axios would make sense.

To Reproduce

Make some Axios requests pointing to other servers

Errors Shown

err: {
      "message": "unexpected end of file: unexpected end of file",
      "name": "Error",
      "stack":
          Error: unexpected end of file
              at AxiosError.from (/var/www/vhosts/app.schloss-eggenberg.at/httpdocs/cms/node_modules/axios/dist/node/axios.cjs:785:14)
              at BrotliDecompress.handleStreamError (/var/www/vhosts/app.schloss-eggenberg.at/httpdocs/cms/node_modules/axios/dist/node/axios.cjs:2696:29)
              at BrotliDecompress.emit (node:events:525:35)
              at emitErrorNT (node:internal/streams/destroy:151:8)
              at emitErrorCloseNT (node:internal/streams/destroy:116:3)
              at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
          caused by: Error: unexpected end of file
              at BrotliDecoder.zlibOnError [as onerror] (node:zlib:189:17)
      "config": {
        "transitional": {
          "silentJSONParsing": true,
          "forcedJSONParsing": true,
          "clarifyTimeoutError": false
        },
        "adapter": [
          "xhr",
          "http"
        ],
        "transformRequest": [
          null
        ],
        "transformResponse": [
          null
        ],
        "method": "post",
        "url": "....",
        "data": "{"
      },
      "code": "Z_BUF_ERROR",
      "status": null
    }

What version of Directus are you using?

9.22.4

What version of Node.js are you using?

18

What database are you using?

MySQL

What browser are you using?

Chrome

How are you deploying Directus?

locally

@github-actions
Copy link

Linear: ENG-591

@rijkvanzanten
Copy link
Member

We're upgrading dependencies on a cadence (see the "patch tuesday" PRs :) ), so I'll close this for now as that's an ongoing process

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants