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

RangeError: Maximum call stack size exceeded #4

Open
GeoffreyPlitt opened this issue Jul 16, 2018 · 6 comments
Open

RangeError: Maximum call stack size exceeded #4

GeoffreyPlitt opened this issue Jul 16, 2018 · 6 comments

Comments

@GeoffreyPlitt
Copy link

We're using this library to upload video content to twitter tweets on behalf of our users.

Sometimes getting a stack overflow error, from various lines in /src/api-client/stringify.js, any ideas?

Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: /app/node_modules/twitter-media/src/api-client/stringify.js:6
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: return entries(object).reduce((state, [key, value]) => {
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: ^
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: RangeError: Maximum call stack size exceeded
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: at entries.reduce (/app/node_modules/twitter-media/src/api-client/stringify.js:6:35)
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: at Array.reduce (native)
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: at replaceBuffers (/app/node_modules/twitter-media/src/api-client/stringify.js:6:28)
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: at stringifyValue (/app/node_modules/twitter-media/src/api-client/stringify.js:12:24)
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: at entries.reduce (/app/node_modules/twitter-media/src/api-client/stringify.js:18:50)
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: at Array.reduce (native)
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: at replaceBuffers (/app/node_modules/twitter-media/src/api-client/stringify.js:6:28)
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: at stringifyValue (/app/node_modules/twitter-media/src/api-client/stringify.js:12:24)
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: at entries.reduce (/app/node_modules/twitter-media/src/api-client/stringify.js:18:50)
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: at Array.reduce (native)
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: at replaceBuffers (/app/node_modules/twitter-media/src/api-client/stringify.js:6:28)
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: at stringifyValue (/app/node_modules/twitter-media/src/api-client/stringify.js:12:24)
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: at entries.reduce (/app/node_modules/twitter-media/src/api-client/stringify.js:18:50)
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: at Array.reduce (native)
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: at replaceBuffers (/app/node_modules/twitter-media/src/api-client/stringify.js:6:28)
Jul 16 13:33:16 stardust-backend app/fb_tw_posting.1: at stringifyValue (/app/node_modules/twitter-media/src/api-client/stringify.js:12:24)

@GeoffreyPlitt
Copy link
Author

@janzal

@GeoffreyPlitt
Copy link
Author

@janzal thoughts?

@janzal
Copy link
Owner

janzal commented Jul 19, 2018

Hi, stringify is used only when an error during upload occurs (https://github.com/janzal/twitter-media/blob/master/src/api-client/index.js#L103).

@GeoffreyPlitt Can you provide me more info about when the error occurs and maybe some minimal example? Tests seem to be okay and we are using this library in production without any issues.

@janzal
Copy link
Owner

janzal commented Jul 19, 2018

@GeoffreyPlitt
Copy link
Author

Seems to have fixed the error!

@GeoffreyPlitt
Copy link
Author

GeoffreyPlitt commented Jul 20, 2018 via email

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