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

Exec format error: 'geckodriver' on Termux (Android) #83

Closed
thesuhu opened this issue Jun 13, 2019 · 5 comments
Closed

Exec format error: 'geckodriver' on Termux (Android) #83

thesuhu opened this issue Jun 13, 2019 · 5 comments

Comments

@thesuhu
Copy link

thesuhu commented Jun 13, 2019

selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities

How do I fix this? Thanks

@thesuhu
Copy link
Author

thesuhu commented Jun 14, 2019

When I reinstall step by step in documentation, I got error this

File "/data/data/com.termux/files/usr/lib/python3.7/subprocess.py", line 775, in init
restore_signals, start_new_session)
File "/data/data/com.termux/files/usr/lib/python3.7/subprocess.py", line 1520, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: 'geckodriver'
$

@sundowndev
Copy link
Owner

It seems you didn't installed geckodriver properly. See this comment on stackoverflow.

  1. Are you using Docker ?
  2. What command did you run ?
  3. What is your OS ?
  4. Do you have the latest version of Firefox installed ?
  5. What is the output of geckodriver --version ?

@thesuhu
Copy link
Author

thesuhu commented Jun 14, 2019

  1. I am using termux
  2. python3 phoneinfoga.py -n +62xxxxxxxxxx
  3. I am using android
  4. Should I install Firefox on termux?
  5. geckodriver --version bash: /data/data/com.termux/files/usr/bin/geckodriver: cannot execute binary file: Exec format error

I am using this geckodriver geckodriver-v0.24.0-linux64.tar.gz

Thanks

@sundowndev
Copy link
Owner

sundowndev commented Jun 14, 2019

I'm sorry but the tool wasn't designed to be used on Android, and I don't want to explicitly support it. I don't even know if you can use the Selenium package on it.

Two options :

  • Investigate on this issue about Geckodriver/Selenium usage on Android
  • Don't use the latest version of the tool but the old version that uses request library instead of Selenium (might be buggy but works for sure on Android)

If you want to hack the tool to be usable on Android too, feel free to fork it and make a pull request to add the support!

Here's the last commit where the tool was using request library : https://github.com/sundowndev/PhoneInfoga/tree/acb8519fe861756411c9ef130638509522db04e1

You can switch on it by doing :

git checkout acb8519fe861756411c9ef130638509522db04e1

@thesuhu
Copy link
Author

thesuhu commented Jun 15, 2019

Ok thank you

@thesuhu thesuhu closed this as completed Jun 15, 2019
@sundowndev sundowndev changed the title Error selenium Exec format error: 'geckodriver' on Termux (Android) Jun 15, 2019
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