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 #87

Open
aminya opened this issue Mar 21, 2021 · 1 comment
Open

RangeError: Maximum call stack size exceeded #87

aminya opened this issue Mar 21, 2021 · 1 comment
Labels

Comments

@aminya
Copy link

aminya commented Mar 21, 2021

script-view.js:180 RangeError: Maximum call stack size exceeded
    at String.replace (<anonymous>)
    at process (C:\atom-script\node_modules\.pnpm\[email protected]\node_modules\ansi-to-html\lib\ansi_to_html.js:506:17)
    at tokenize (C:\atom-script\node_modules\.pnpm\[email protected]\node_modules\ansi-to-html\lib\ansi_to_html.js:516:7)
    at Filter.toHtml (C:\atom-script\node_modules\.pnpm\[email protected]\node_modules\ansi-to-html\lib\ansi_to_html.js:606:7)
    at ScriptView.display (file:///C:/Users/aminy/Documents/GitHub/JavaScript/@atom-ide-community/atom-script/lib/script-view.js:177:30)
    at file:///C:/Users/aminy/Documents/GitHub/JavaScript/@atom-ide-community/atom-script/lib/view-runtime-observer.js:16:73
    at Function.simpleDispatch (C:\Users\aminy\AppData\Local\atom\app-1.55.0\resources\app\static\<embedded>:11:1190181)
    at Emitter.emit (C:\Users\aminy\AppData\Local\atom\app-1.55.0\resources\app\static\<embedded>:11:1191622)
    at Runner.stdoutFunc (file:///C:/Users/aminy/Documents/GitHub/JavaScript/@atom-ide-community/atom-script/lib/runner.js:44:18)
    at Socket.<anonymous> (C:\Users\aminy\AppData\Local\atom\app-1.55.0\resources\app\static\<embedded>:14:1120219)
    at Socket.emit (events.js:200:13)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:271:13)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)
display @ script-view.js:180
(anonymous) @ view-runtime-observer.js:16
simpleDispatch @ <embedded>:11
emit @ <embedded>:11
stdoutFunc @ runner.js:44
(anonymous) @ <embedded>:14
emit @ events.js:200
addChunk @ _stream_readable.js:294
readableAddChunk @ _stream_readable.js:271
Readable.push @ _stream_readable.js:210
onStreamRead @ internal/stream_base_commons.js:166
script-view.js:181 &lt;!DOCTYPE html&gt;

It is the output of the following python code which triggers this error:

import requests

head = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/65.0.3325.181 Chrome/65.0.3325.181 Safari/537.36'}

r = requests.get('https://www.oxfordlearnersdictionaries.com/us/wordlists/oxford3000-5000', headers=head)

print(r.text)

Related to atom-community/atom-script#2358

@kretschmannj
Copy link

I came across this same issue recently and it obviously hasn't been resolved yet. I use a tool called Nightwatch for test automation and there are commands in my test that capture XHR responses from the browser. These responses go into a testResults object which is then processed with a function that utilizes ansi-to-html to process the results. One of these XHR responses is relatively large (2.6MB) and this is causing ansi-to-html to blow up with the RangeError: Maximum call stack size exceeded error. Root cause seems to be that ansi-to-html has a limit on how much data it can process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants