Skip to content

Login is erroring (_sharedData) #291

@MGDproductions

Description

@MGDproductions

This api has been working fine for over a year for me now but since yesterday i have been getting this error:


/home/container/node_modules/instagram-web-api/lib/index.js:109
        html => html.split('window._sharedData = ')[1].split(';</script>')[0]
                                                      ^
TypeError: Cannot read properties of undefined (reading 'split')
    at /home/container/node_modules/instagram-web-api/lib/index.js:109:55
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Instagram.login (/home/container/node_modules/instagram-web-api/lib/index.js:100:26)

I fixed it myself (somehow) by setting _sharedData to false at line 48 of /lib/index.js
I don't know what this does or if it is important to have on so might as well make an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions