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

[nodejs/node] (node 122684) Unhandled Promise Rejection Warning: Range Error #1434

Closed
Zainab-hasina opened this issue Aug 16, 2018 · 9 comments

Comments

@Zainab-hasina
Copy link

Zainab-hasina commented Aug 16, 2018

  • Node.js Version:
  • OS:
  • Scope (install, code, runtime, meta, other?):
  • Module (and version) (if relevant):
[nodejs/node] (node 122684) Unhandled Promise Rejection Warning: Range Error: Invalid String length
at Json.Stringify (<anonymous>) 
at Instance. Page. getresourceTree.then(path of index.js in my desktop) 
at <anonymous> (node 122684) Unhandled Promise Rejection Warning : Unhandled Promise Rejection. This error originated either by throwing inside of an async function with a .catch(). (rejection id:1)
 (node 122684) [DEP0018] Deprecation Warning: Unhandled Promise Rejections are depricated. In the future, promise rejections that are not handled will terminate the node.js process with a non-zero exit code 

Edited both title and description for more redability

@ankur-anand
Copy link

@Zainab-hasina What is the SIZE of STRING Object that you're passing to JSON.stringify() method?

@vsemozhetbyt
Copy link

vsemozhetbyt commented Aug 16, 2018

For what it is worth, as for string length limits, see nodejs/node#9489 with comments.

@Zainab-hasina
Copy link
Author

Zainab-hasina commented Aug 16, 2018 via email

@Hakerh400
Copy link

Unhandled Promise Rejections are depricated

How did you copy the error message?

@Zainab-hasina
Copy link
Author

Zainab-hasina commented Aug 16, 2018 via email

@gireeshpunathil gireeshpunathil changed the title [nodejs/node] (node 122684) Unhandled Promise Rejection Warning: Range Error: Invalid String length at Json.Stringify (<anonymous>) at Instance. Page. getresourceTree.then(path of index.js in my desktop) at <anonymous> (node 122684) Unhandled Promise Rejection Warning : Unhandled Promise Rejection. This error originated either by throwing inside of an async function with a .catch(). (rejection id:1) (node 122684) [DEP0018] Deprecation Warning: Unhandled Promise Rejections are depricated. In the future, promise rejections that are not handled will terminate the node.js process with a non-zero exit code [nodejs/node] (node 122684) Unhandled Promise Rejection Warning: Range Error Aug 16, 2018
@ankur-anand
Copy link

@Zainab-hasina Note that if the STRING Object becomes too large it will throw Range Error: Invalid String length too. Are you downloading the content at once and then passing it to stringfy function ?. If so split it in small chuck and check

@Zainab-hasina
Copy link
Author

@ankur-anand No I am not downloading it but just passing it to Stringify function. Can you suggest something to solve that. Thanks

@Trott
Copy link
Member

Trott commented Jun 15, 2019

@Zainab-hasina Did you eventually find a workaround or solution?

@gireeshpunathil
Copy link
Member

inactive, closing

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

6 participants