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

UnhandledPromiseRejectionWarning: StatusCodeError: 400 #244

Open
jonathann403 opened this issue Mar 28, 2021 · 3 comments
Open

UnhandledPromiseRejectionWarning: StatusCodeError: 400 #244

jonathann403 opened this issue Mar 28, 2021 · 3 comments

Comments

@jonathann403
Copy link

I get this error every time im trying to upload a post:

"{"debug_info":{"retriable":false,"type":"ProcessingFailedError","message":"Request processing failed"}}"
at new StatusCodeError (C:\Users\GamerStop_\Desktop\univors.github.io\node_modules\request-promise-core\lib\errors.js:32:15)
at Request.plumbing.callback (C:\Users\GamerStop_\Desktop\univors.github.io\node_modules\request-promise-core\lib\plumbing.js:104:33)
at Request.RP$callback [as callback] (C:\Users\GamerStop\Desktop\univors.github.io\node_modules\request-promise-core\lib\plumbing.js:46:31)
at Request.self.callback (C:\Users\GamerStop_\Desktop\univors.github.io\node_modules\request\request.js:185:22)
at Request.emit (events.js:314:20)
at Request. (C:\Users\GamerStop_\Desktop\univors.github.io\node_modules\request\request.js:1154:10)
at Request.emit (events.js:314:20)
at IncomingMessage. (C:\Users\GamerStop_\Desktop\univors.github.io\node_modules\request\request.js:1076:12)
at Object.onceWrapper (events.js:420:28)
at IncomingMessage.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1244:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

The upload code:


const username = "xxx"

const password = "xxx"

const client = new Instagram({ username, password })

;(async () => {

await client.login()
const { media } = await client.uploadPhoto({ photo: "https://upload.wikimedia.org/wikipedia/commons/2/2f/Baby.tux.sit-800x800.png", caption: 'testing', post: 'feed' })
console.log(`https://www.instagram.com/p/${media.code}/`)

})()
@MonsieurBibo
Copy link

Are you sure your credentials are correct ? If so, you can try to pass tests of the library (in the test folder) with AVA.

@iltommi1995
Copy link

Having the same issue.

@codexJoin
Copy link
Contributor

This method allow only JPEG images.

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

4 participants