Hi! I'm using Mac OS. Since I was having problems like _"Instapy said i'm blocked while wasn't"_ it has been suggested me to upgrade insteps version, python, pip and use firefox instead of chrome. I've followed all the procedures reported in documentation.md and also the procedures provided me through github and discord.
No of these way fixed my problems.
Today I've uninstalled everything like pip, insteps python and firefox. I reinstalled everything and I've downloaded a new insteps-master folder and I tried to run QuickStart.py through the command: _"sudo python3 QuickStart.py"_
NOW I GOT THIS PROBLEM.
luca@iMac-di-Luca-2 ~ % sudo python3 /Users/luca/Downloads/BOT/InstaPy-master-2/quickstart\ 2.py
InstaPy Version: 0.6.3
._. ._. ._. ._. ._. ._. ._. ._.
_Workspace in use: "/Users/luca/InstaPy"
Traceback (most recent call last):
File "/Users/luca/Downloads/BOT/InstaPy-master-2/quickstart 2.py", line 38, in
schedule.run_pending()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/schedule/__init__.py", line 563, in run_pending
default_scheduler.run_pending()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/schedule/__init__.py", line 94, in run_pending
self._run_job(job)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/schedule/__init__.py", line 147, in _run_job
ret = job.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/schedule/__init__.py", line 466, in run
ret = self.job_func()
File "/Users/luca/Downloads/BOT/InstaPy-master-2/quickstart 2.py", line 17, in _follow1
session = InstaPy(username=insta_username, password=insta_password, headless_browser=True)
File "/Users/luca/Downloads/BOT/InstaPy-master-2/instapy/instapy.py", line 321, in __init__
self.logger,
File "/Users/luca/Downloads/BOT/InstaPy-master-2/instapy/browser.py", line 114, in set_selenium_local_session
options=firefox_options,
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in __init__
keep_alive=True)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: invalid argument: can't kill an exited process
_
Try with this:
https://github.com/uluQulu/InstaPy/blob/master/DOCUMENTATION.md#running-on-a-headless-browser
@Kazansky a +1 from me on Raspberry Pi B3+ Buster. Still don't understand what was wrong with having Chrome...
@Jostino what are you suggesting? @Kazansky quickstart file that he attached clearly has headless mode on...
@Jostino what are you suggesting? @Kazansky quickstart file that he attached clearly has headless mode on...
I've solved with the
headless_browser=True
option, dude
@Jostino hmm - hasn't worked for myself or @Kazansky sadly :/ what OS are you on?
@Jostino I've already set headless mode True
@mwargan I'm using Mac OS.
@mwargan I've tried to use chrome and I got this.
_MBP-di-Luca:InstaPy-0.6.3 luca$ sudo python3 cirofo.py
InstaPy Version: 0.6.3
._. ._. ._. ._. ._. ._. ._. ._.
Workspace in use: "/Users/luca/InstaPy"
Traceback (most recent call last):
File "cirofo.py", line 38, in
schedule.run_pending()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/schedule/__init__.py", line 563, in run_pending
default_scheduler.run_pending()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/schedule/__init__.py", line 94, in run_pending
self._run_job(job)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/schedule/__init__.py", line 147, in _run_job
ret = job.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/schedule/__init__.py", line 466, in run
ret = self.job_func()
File "cirofo.py", line 17, in _follow1
session = InstaPy(username=insta_username, password=insta_password, headless_browser=True)
File "/Users/luca/Documents/InstaPy-0.6.3/instapy/instapy.py", line 321, in __init__
self.logger,
File "/Users/luca/Documents/InstaPy-0.6.3/instapy/browser.py", line 114, in set_selenium_local_session
options=firefox_options,
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in __init__
keep_alive=True)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities_
this one with firefox 69 gecko driver 0.25
Last login: Sun Sep 15 02:11:12 on ttys004
MBP-di-Luca:~ luca$ sudo python3 /Users/luca/Documents/InstaPy-0.6.3/cirofo.py
Password:
InstaPy Version: 0.6.3
._. ._. ._. ._. ._. ._. ._. ._.
Workspace in use: "/Users/luca/InstaPy"
Traceback (most recent call last):
File "/Users/luca/Documents/InstaPy-0.6.3/cirofo.py", line 38, in
schedule.run_pending()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/schedule/__init__.py", line 563, in run_pending
default_scheduler.run_pending()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/schedule/__init__.py", line 94, in run_pending
self._run_job(job)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/schedule/__init__.py", line 147, in _run_job
ret = job.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/schedule/__init__.py", line 466, in run
ret = self.job_func()
File "/Users/luca/Documents/InstaPy-0.6.3/cirofo.py", line 17, in _follow1
session = InstaPy(username=insta_username, password=insta_password, headless_browser=True)
File "/Users/luca/Documents/InstaPy-0.6.3/instapy/instapy.py", line 321, in __init__
self.logger,
File "/Users/luca/Documents/InstaPy-0.6.3/instapy/browser.py", line 114, in set_selenium_local_session
options=firefox_options,
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in __init__
keep_alive=True)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: invalid argument: can't kill an exited process
It is because Firefox opens a windows asking if you want to save the password. The script can't avoid that, so you have to have a desktop connection for your first login.
@ReagentX I did first a login on instagram manually both on firefox and chrome and I clicked save psw, then I run the bot again but same error.
Ok @Kazansky so the good news is that I have both of those issues too (depending if Firefox or Chrome), the bad news is I still can't figure out what's wrong :/
@mwargan Any news? I've found something wrong with python and also the instapy file.. I don't manage to fix both situation with both browser
@Kazansky not yet - I'm starting serious Pi debugging tmrw and will keep everyone posted :)
@Kazansky not yet - I'm starting serious Pi debugging tmrw and will keep everyone posted :)
Someone on discord in #need-help channel solved giving the right permissions to the assets directory and geckodriver, because firefox was unable to run it.
To confirm what was wrote:
https://stackoverflow.com/questions/52534658/webdriverexception-message-invalid-argument-cant-kill-an-exited-process-with?noredirect=1&lq=1
So it has been fixed? @Jostino
Do you have any updates guys? I have the same issue. I also checked everything published here:
https://github.com/InstaPy/instapy-docs/blob/89e78219bbd7864ee37c482cb8d11460952b267b/FAQ.md
But still the same error:
...
selenium.common.exceptions.WebDriverException: Message: invalid argument: can't kill an exited process
Unfortunately the lead developer has left the development team so unfortunately I have started to consider InstaPy as dead :/
Until we jump to early conclusions, this CAN be fixed. It's an issue on Catalina, because of the much tighter security. I managed to get it working by ensuring I don't run the script with sudo
mode and that geckodriver
has correct permissions to run: sudo chmod 777 *
in your InstaPy folder should do the trick, or wherever geckodriver is.
This has nothing to do with Catalina as above replies mention it occurs on Raspberry Pi.
I'm not saying it cannot happen on other platforms, just that Catalina caused this issue on my side, so if anyone else Googles this issue, they will also be able to see this thread, not scroll past it.
Any update on this? I'm using Firefox 69, geckodriver 26 and selenium 3.14 - I can't imagine it's a compatability issue?
This is my output:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this problem still occurs, please open a new issue
I'm running geckodriver for FireFox on both Windows and MacOS.
The code is working flawlessly on Windows.
On MacOS, the driver is independently for a script but is returning an error when I'm calling the function from ab application.
Error:
selenium.common.exceptions.WebDriverException
selenium.common.exceptions.WebDriverException: Message: invalid argument: can't kill an exited process
Hi All
I am also facing same error. and also googled many time regarding the same but noting seem to work..
I have also change permission and also run command as sudo bash startClient.sh but not working if anyone have a fix please let me know.
Thanks
Edit : I have resolve this issue by giving permission and also remove sudo from sudo bash startClient.sh command because in geckodriver.log there is a error as "Running Firefox as root in a regular user's session is not supported."
May this help someone
This error may come from versions, please check your browser version and webdriver version, for sure they are match, If they are not match, then remove"sudo" is useless.
If your Firefox/Chrome and selenium don't have mismatch between versions,
If your the versions of the Firefox browser and geckodriver are the newest, etc.
Just
Running Firefox as root in a regular user's session is not supported.
What's this meaning?
It's meaning that webdriver will create a browser of the virtual unrooted user.
And it told you that you can not use "sudo" when your program runing in a virtual unrooted user
The another meaning is that the versions between Browser and selenium are mismatch.
Because the mismatch, selenium couldn't correctly create a browser of the virtual unrooted user.
Somebody says that you must make an unrooted new ubuntu account, but the necessity will be killed by removing "sudo". So it's unnecessary to make an unrooted new ubuntu account. (This is says to my motherlands' programmers)
只要去掉“sudo”就可以了,没必要新建一个Ubuntu账户!去掉“sudo”!去掉“sudo”!!去掉“sudo”!!!
错误文件的含义是这个网页驱动,它在运行时的用户可能是一个虚拟的没有管理员权限的用户,因而用sudo给予管理员权限就与此发生了冲突,所以应该去掉sudo
I'm not using sudo but still have the same problem on RPi3. Works fine on Windows.
This fixed it: https://stackoverflow.com/a/52535654/2745116
Basically, check your Firefox and selenium version:
firefox -v
# for me 52
pip show selenium
Then check the table to select the suitable version of geckodriver
: https://firefox-source-docs.mozilla.org/testing/geckodriver/Support.html
For me it was version 0.17.0
The error came from a mismatch between versions.
Hi Timgrossmann/Instapy
I feel great to have reply from you.
And i have already identify this..
Thanks for your time and consideration
Thanks again.
On Sat, Jan 11, 2020, 1:50 PM waosp notifications@github.com wrote:
Just
REMOVE "sudo"Important things to say three times
REMOVE "sudo"! REMOVE "sudo"!! REMOVE "sudo"!!! Destory "sudo" when you
are python3 a program. "python3 " rather "sudo python3 " BecauseRunning Firefox as root in a regular user's session is not supported.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/timgrossmann/InstaPy/issues/5040?email_source=notifications&email_token=AFUKWNDE454PXS3UUJ6NPETQ5F6MHA5CNFSM4IU3ZTSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIV4SDY#issuecomment-573294863,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFUKWNGBXAWT3ZLVWFQ3E73Q5F6MHANCNFSM4IU3ZTSA
.
This fixed it: https://stackoverflow.com/a/52535654/2745116
Basically, check your Firefox and selenium version:
firefox -v # for me 52 pip show selenium
Then check the table to select the suitable version of
geckodriver
: https://firefox-source-docs.mozilla.org/testing/geckodriver/Support.html
For me it was version 0.17.0The error came from a mismatch between versions.
You are right, this error may came from two sources, I will fix my answer here. Thank you!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this problem still occurs, please open a new issue
Most helpful comment
This error may come from versions, please check your browser version and webdriver version, for sure they are match, If they are not match, then remove"sudo" is useless.
If your Firefox/Chrome and selenium don't have mismatch between versions,
If your the versions of the Firefox browser and geckodriver are the newest, etc.
Just
REMOVE "sudo"
Destory "sudo" when you are python3 a program.
"python3" rather "sudo python3 "
Because
Running Firefox as root in a regular user's session is not supported.
What's this meaning?
It's meaning that webdriver will create a browser of the virtual unrooted user.
And it told you that you can not use "sudo" when your program runing in a virtual unrooted user
The another meaning is that the versions between Browser and selenium are mismatch.
Because the mismatch, selenium couldn't correctly create a browser of the virtual unrooted user.
Somebody says that you must make an unrooted new ubuntu account, but the necessity will be killed by removing "sudo". So it's unnecessary to make an unrooted new ubuntu account. (This is says to my motherlands' programmers)
只要去掉“sudo”就可以了,没必要新建一个Ubuntu账户!去掉“sudo”!去掉“sudo”!!去掉“sudo”!!!
错误文件的含义是这个网页驱动,它在运行时的用户可能是一个虚拟的没有管理员权限的用户,因而用sudo给予管理员权限就与此发生了冲突,所以应该去掉sudo