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

Cannot run getFollowersOrFollowing #97

Open
listinfm opened this issue May 13, 2022 · 1 comment
Open

Cannot run getFollowersOrFollowing #97

listinfm opened this issue May 13, 2022 · 1 comment

Comments

@listinfm
Copy link

listinfm commented May 13, 2022

In trying to run:
const myfollowers = await instauto.getFollowersOrFollowing({userId: 'username', getFollowers: true});

I get the following error:
TypeError: Cannot read properties of null (reading 'edge_follow')
at processTicksAndRejections (node:internal/process/task_queues:96:5)

if getFollowers is set to false, then I get the following error:
TypeError: Cannot read properties of null (reading 'edge_followed_by')
at processTicksAndRejections (node:internal/process/task_queues:96:5)

This is the function that is getting called:
function getFollowersOrFollowingGenerator({ userId, getFollowers = false }) {
const edge_follow = 100
return graphqlQueryUsers({
getResponseProp: (json) => json.data.user[getFollowers ? 'edge_followed_by' : 'edge_follow'],
graphqlVariables: { id: userId },
queryHash: getFollowers ? '37479f2b8209594dde7facb0d904896a' : '58712303d941c6855d4e888c5f0cd22f',
});
}

not sure what should edge_followed_by or edge_follow should be or how to not make them null..

npm version: 8.10.0
node version: v16.15.0
OS: Ubuntu 18.0

@mifi
Copy link
Owner

mifi commented May 21, 2022

I don't think it means that edge_followed_by is null, but rather json.data.user is null. I'm not sure why it would be null, but it would indicate some data missing from instagram. If you could record a snapshot of the content of the page when it happened, then it might help to figure out what's causing it

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

2 participants