ibrod83 / nodejs-file-downloader

129 stars 23 forks source link

Maximum number of redirects exceede #31

Closed gauloics closed 2 years ago

gauloics commented 2 years ago

Error from attempt at RedirectableRequest.RedirectableRequest._processResponse (/opt/ee/node_modules/follow-redirects/index.js:350:26) at ClientRequest.RedirectableRequest._onNativeResponse (/opt/ee/node_modules/follow-redirects/index.js:57:10) at Object.onceWrapper (events.js:520:26) at ClientRequest.emit (events.js:400:28) at HTTPParser.parserOnIncomingClient (_http_client.js:647:27) at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17) at TLSSocket.socketOnData (_http_client.js:515:22) at TLSSocket.emit (events.js:400:28) at null.addChunk (internal/streams/readable.js:293:12) at null.readableAddChunk (internal/streams/readable.js:267:9) { message: 'Maximum number of redirects exceeded' }

I get an error like this, I'm trying to retrieve media from a Twitter DM, any suggestions? document reference https://developer.twitter.com/en/docs/twitter-api/v1/direct-messages/message-attachments/guides/retrieving-media

ibrod83 commented 2 years ago

Well the error comes from follow-redirects module, and suggests an infinite loop of redirects. Try sending a request to the same enpoint(and the same credentials) from postman.

gauloics commented 2 years ago

any other options besides postman? Currently I only use a smartphone

ibrod83 commented 2 years ago

from the browser

gauloics commented 2 years ago

I try use Httper IMG_20220106_000025

i found this but it's not specific to nodejs, and it was posted about 4 years ago twittercommunity

ibrod83 commented 2 years ago

Well, the problem isn't in nodejs-file-downloader :D