laurentj / slimerjs

A scriptable browser like PhantomJS, based on Firefox
http://slimerjs.org
Other
3k stars 259 forks source link

slimerjs sometimes get stuck or throw a Segmentation fault #669

Open amanda94 opened 6 years ago

amanda94 commented 6 years ago

versions

Steps to reproduce the issue

I am using slimerjs to log all http requests. And I tried to fill in the input elements then click some button or something to initiate a request. It got problem when I am requesting the url (http://www.smfms.cn/2016/fms_column.asp?col_id=11).I thought it may be the click and fill part problem, then I remove that part code and I got an error saying Segmentation fault .

Actual results:

when I am using the xvfb-run with --debug=true, It has output some error just like this

JavaScript error: resource://slimerjs/addon-sdk/toolkit/loader.js -> resource://slimerjs/slimer-sdk/webpage.js, line 417: TypeError: win is null JavaScript error: resource://slimerjs/addon-sdk/toolkit/loader.js -> resource://slimerjs/slimer-sdk/webpage.js, line 417: TypeError: win is null JavaScript error: resource://slimerjs/addon-sdk/toolkit/loader.js -> resource://slimerjs/slimer-sdk/webpage.js, line 417: TypeError: win is null JavaScript error: resource://slimerjs/addon-sdk/toolkit/loader.js -> resource://slimerjs/slimer-sdk/webpage.js, line 417: TypeError: win is null JavaScript error: resource://slimerjs/addon-sdk/toolkit/loader.js -> resource://slimerjs/slimer-sdk/webpage.js, line 417: TypeError: win is null ... JavaScript error: , line 0: too much recursion JavaScript error: , line 0: too much recursion JavaScript error: , line 0: too much recursion JavaScript error: , line 0: too much recursion JavaScript error: , line 0: too much recursion JavaScript error: , line 0: too much recursion JavaScript error: , line 0: too much recursion JavaScript error: , line 0: too much recursion JavaScript error: , line 0: too much recursion JavaScript error: , line 0: too much recursion JavaScript error: , line 0: too much recursion JavaScript error: , line 0: too much recursion JavaScript error: , line 0: too much recursion JavaScript error: , line 0: too much recursion JavaScript error: , line 0: too much recursion JavaScript error: , line 0: too much recursion JavaScript error: , line 0: too much recursion ... JavaScript error: chrome://slimerjs/content/webpage.js, line 9: TypeError: browser.stop is not a function JavaScript error: chrome://slimerjs/content/webpage.js, line 9: TypeError: browser.stop is not a function JavaScript error: chrome://slimerjs/content/webpage.js, line 9: TypeError: browser.stop is not a function JavaScript error: chrome://slimerjs/content/webpage.js, line 9: TypeError: browser.stop is not a function JavaScript error: chrome://slimerjs/content/webpage.js, line 9: TypeError: browser.stop is not a function JavaScript error: chrome://slimerjs/content/webpage.js, line 9: TypeError: browser.stop is not a function JavaScript error: chrome://slimerjs/content/webpage.js, line 9: TypeError: browser.stop is not a function JavaScript error: chrome://slimerjs/content/webpage.js, line 9: TypeError: browser.stop is not a function ...

when I delete the click and fill in part code, it still has the above output, and with the following lines. 2017-12-19T10:00:11.458Z [DEBUG] webpage: close /usr/share/node/scanner-core/crawl/node_modules/slimerjs/src/slimerjs: line 167: 23805 Segmentation fault "$SLIMERJSLAUNCHER" -app "$SLIMERDIR/application.ini" $PROFILE -no-remote "$@"

Expected results:

amanda94 commented 6 years ago

during my clicking and filling code runs ,it will open some new pages,I thought that might be the problem,but I tried with some other url with a lot of resources, just works fine. I do not know what caused that problem

laurentj commented 6 years ago

Could you give us an example of a script which allow to reproduce the issue?

amanda94 commented 6 years ago

I tried to less the code. but it seems still long. example code I delete the fillin part code, since I found it does not affect the error output and it is also very long I use xvfb-run, and the output is here,also I delete the last item.click(), the output is here Hope this can make something

amanda94 commented 6 years ago

also somethimes it seems works right log seems like this.