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

🐛 TypeError: Cannot read properties of undefined (reading 'split') #82

Closed
royjor2016 opened this issue Aug 9, 2023 · 5 comments · Fixed by #87
Closed

🐛 TypeError: Cannot read properties of undefined (reading 'split') #82

royjor2016 opened this issue Aug 9, 2023 · 5 comments · Fixed by #87
Assignees
Labels
bug Something isn't working

Comments

@royjor2016
Copy link

started getting this error yesterday. tried replacing with new cookies set, didnt work.

i'm using cookies obtained from edge browser on windows 10.

@royjor2016
Copy link
Author

TypeError: Cannot read properties of undefined (reading 'split')
at unknown function
at fetch(bundle:581:10)
at unknown function
at batchFetch(bundle:745:8)
at run(code:3:8)

@chriskyfung chriskyfung added the bug Something isn't working label Aug 10, 2023
@chriskyfung
Copy link
Owner

The error happens if you got invalid data from Instagram API.

A non-string data object was passed through to the fetch function, and therefore failed to find the String.prototype.split() JavaScript | MDN method to handle URLs.

@chriskyfung
Copy link
Owner

i'm using cookies obtained from edge browser on windows 10.

Please stick to Google Chrome.

@royjor2016
Copy link
Author

i'm using cookies obtained from edge browser on windows 10.

Please stick to Google Chrome.

i switched to chrome. it worked for a day. now it's not working anymore either.

@royjor2016
Copy link
Author

royjor2016 commented Aug 12, 2023

TypeError: Cannot read properties of undefined (reading 'split')
    at [unknown function](bundle:583:44)
    at fetch(bundle:581:10)
    at [unknown function](bundle:747:17)
    at batchFetch(bundle:745:8)
    at run(code:3:8)

chriskyfung added a commit that referenced this issue Dec 1, 2023
This commit fixes the error "TypeError: Cannot read properties of
undefined (reading 'split')" which occurs when applying the JavaScript
String split() to the `url` variable that is not a string object.

To prevent this error from occurring, an if-statement has been added to
check the type of the `url` variable and forces the callback return
immediately for non-string values.

This commit addresses issue #82.
chriskyfung added a commit that referenced this issue Dec 1, 2023
This commit fixes the error "TypeError: Cannot read properties of
undefined (reading 'split')" which occurs when applying the JavaScript
String split() to the `url` variable that is not a string object.

To prevent this error from occurring, an if-statement has been added to
check the type of the `url` variable and forces the callback return
immediately for non-string values.

This commit addresses issue #82.
@chriskyfung chriskyfung self-assigned this Dec 2, 2023
@chriskyfung chriskyfung changed the title TypeError: Cannot read properties of undefined (reading 'split') 🐛 TypeError: Cannot read properties of undefined (reading 'split') Dec 25, 2023
@chriskyfung chriskyfung linked a pull request Jan 2, 2024 that will close this issue
16 tasks
@chriskyfung chriskyfung mentioned this issue Jan 2, 2024
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants