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

after upgrading to "axios": "^1.2.1", #5357

Closed
monafHorany opened this issue Dec 8, 2022 · 6 comments
Closed

after upgrading to "axios": "^1.2.1", #5357

monafHorany opened this issue Dec 8, 2022 · 6 comments

Comments

@monafHorany
Copy link

Describe the bug

AxiosError: unexpected end of file
at AxiosError.from (C:\Users\samqw\Documents\scrapping\sense\node_modules\axios\dist\node\axios.cjs:785:14)
at BrotliDecompress.handleStreamError (C:\Users\samqw\Documents\scrapping\sense\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) {
code: 'Z_BUF_ERROR',
errno: -5,
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [ 'xhr', 'http' ],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: { FormData: [Function], Blob: [class Blob] },
validateStatus: [Function: validateStatus],
headers: AxiosHeaders {
Accept: 'application/json, text/plain, /',
'User-Agent': 'axios/1.2.1',
'Accept-Encoding': 'gzip, compress, deflate, br'
},
method: 'get',
url: 'https://www.sense.com.tr/kaban-469',
data: undefined
},

To Reproduce

const response = await axios.get("https://www.sense.com.tr/kaban-469");

const outerhtml = response.data;

Code snippet

No response

Expected behavior

this snippet code above was working perfectly on "axios": "^0.21.0", before upgrading to "axios": "^1.2.1"

Axios Version

No response

Adapter Version

No response

Browser

No response

Browser Version

No response

Node.js Version

No response

OS

No response

Additional Library Versions

No response

Additional context/Screenshots

No response

@elvisun
Copy link

elvisun commented Dec 8, 2022

+1 same error message, also 1.2.1

@major7x
Copy link

major7x commented Dec 8, 2022

I am seeing the same error in version 1.2.1 as well. However, adding the Accept-Encoding to the header seems to resolve it for me.

"headers": {
    "Accept-Encoding": "gzip"
}

@Pogix3m
Copy link

Pogix3m commented Dec 8, 2022

Duplicate of #5346

@timdodsgon
Copy link

Same error

@AuspeXeu
Copy link

AuspeXeu commented Dec 9, 2022

This library has been terribly instable recently, we have migrated away from it ....

@jasonsaayman
Copy link
Member

Will get the fix for this out asap

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

No branches or pull requests

7 participants