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

Shell command PID xxxx returned an abnormal error code: '4294967295' #48

Open
suban1440 opened this issue Feb 26, 2020 · 12 comments
Open

Comments

@suban1440
Copy link

suban1440 commented Feb 26, 2020

Hi

I got a Error message.

How solve?

My environment:

Windows10 64bit
python 3.8
phantomjs 2.5.0-development
webscreenshot 2.9

C:\Program Files\Python38\Lib\site-packages\webscreenshot> python .\webscreenshot.py http://www.google.co.kr -r phantomjs --renderer-binary "C:\Program Files\phantomjs-2.5.0-beta-windows\bin\phantomjs.exe"

webscreenshot.py version 2.9

[+] 1 URLs to be screenshot
[ERROR][http://www.google.co.kr:80] Shell command PID 5012 returned an abnormal error code: '4294967295'
[ERROR][http://www.google.co.kr:80] Screenshot somehow failed

[+] 0 actual URLs screenshot
[+] 1 error(s)
    http://www.google.co.kr:80
@maaaaz
Copy link
Owner

maaaaz commented May 8, 2020

Could you try with the latest phantomjs stable build 2.1.1 ?
https://bitbucket.org/ariya/phantomjs/downloads/

@emanuelbeni
Copy link

emanuelbeni commented May 26, 2020

Hi,
I am having the same problem as @suban1440 , and my phantomJs version is 2.1.1 @maaaaz . Anybody solved this problem yet?

@maaaaz
Copy link
Owner

maaaaz commented May 26, 2020

Can you launch the webscreenshot command with the -vv option; then copy/paste the "raw" command to be launched (like <path to phantomjs.exe> -debug ...) ?

@emanuelbeni
Copy link

Hi,
I wasn't able to use the '-vv' option, but I realized that it is not listed in the webscreenshot.py menu too.

'webscreenshot.py: error: Please specify a valid input file or a valid URL'

Thats what I get from launching the 'python webscreenshot.py -vv'

@gsneijd
Copy link

gsneijd commented Jun 4, 2020

Hi,
I had the same error msg on my Win10. I think it was the SPACE in my folder name. I tried to start the script in a folder without a SPACE and it worked for me.

@maaaaz
Copy link
Owner

maaaaz commented Jun 4, 2020

@gsneijd, could you launch the command you tried with the space in folder, adding the -vv option to see the raw command executed (the one calling the renderer) ?

@gsneijd
Copy link

gsneijd commented Jun 5, 2020

@maaaaz Sure!
The RAW command works with quotes around the screenshot path

(env) O:\Eigene Dateien\Web-Projekte\webscreenshot>chromium.exe --allow-running-insecure-content --ignore-certificate-errors --ignore-urlfetcher-cert-requests --reduce-security-for-testing --no-sandbox --headless --disable-gpu --hide-scrollbars --incognito -screenshot="O:\Eigene Dateien\Web-Projekte\webscreenshot\screenshots\https_www.mynode.at_443.png" --window-size=1200,800 https://www.mynode.at:443
webscreenshot-raw-output.txt

@maaaaz
Copy link
Owner

maaaaz commented Jun 5, 2020

@gsneijd great, but that was your first try ? with the screenshot output folder containing a space ?

Weird that it didn't work, I remember designing that function to support Windows, and space wasn't needed. I have to investigate !

@gsneijd
Copy link

gsneijd commented Jun 8, 2020

I've had already problems with the space character in other application, so that was my first try.
I started the script in O:\webscreenshot, and it did also work.

i hope it helps you! thanks for you great script, it saved me a lot of work :)

@maaaaz
Copy link
Owner

maaaaz commented Jun 21, 2020

I have investigated and yes, there is the infamous issue with Python + subprocess + whitespaces in paths
I don't have an easy solution, I will see if I want to include (or not) the mslex third-party lib.

In the meantime, no whitespace in paths when using webscreenshot on Windows :)

@arahman63
Copy link

Hi have you found the solution to the whitespaces problem?

@badboyilprimo
Copy link

Hi have you found the solution to the whitespaces problem?

only by adding the folder without spaces directly in C:

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

No branches or pull requests

6 participants