jlobos / instagram-web-api

🤳 Instagram Private Web API client for Node
https://npmjs.com/instagram-web-api
MIT License
1.12k stars 186 forks source link

[getUserByUsername] Cannot read property 'user' of undefined with valid user #239

Closed wemersonrv closed 3 years ago

wemersonrv commented 3 years ago

Hello,

i'm receiving the message Cannot read property 'user' of undefined when try to run the function getUserByUsername

const cookieStore = new FileCookieStore('./session.json')

const client = new Instagram({
   username: 'my-username',
   password: 'mypassword',
   cookieStore,
})

await client.login()

const user = await client.getUserByUsername({
   username: client.credentials.username,
})
TypeError: Cannot read property 'user' of undefined
    at D:\DadosImportantes\dev\Projetos\WemersonRV\insta-stories-test\node_modules\instagram-web-api\lib\index.js:152:34
MonsieurBibo commented 3 years ago

This package isn't really maintained anymore. However, it might be connected to your #238 issue.

schimini commented 3 years ago

@wemersonrv have you tried deleting the session.json file and restart?

wemersonrv commented 3 years ago

@wemersonrv have you tried deleting the session.json file and restart?

Hello. Nope. I was just testing this package and as was told it maintained anymore, i stop using it!