hbollon / IGopher

⚡ Powerful, customizable and easy to use Instagram dm bot. With TUI and Electron.js GUI! Using Selenium webdriver and Yaml configuration files. (WIP)
MIT License
160 stars 30 forks source link

Failed to Launch on MAC OS #2

Closed KnightSec-Official closed 3 years ago

KnightSec-Official commented 3 years ago
INFO[0002] Downloading and installing dependencies...    function=DownloadDependencies line=253
ERRO[0066] unknown error: Timed out waiting for driver server to start.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '192-168-0-146', ip: '<myprivateip>', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_231'
Driver info: driver.version: unknown  function=InitChromeWebDriver line=99
INFO[0066] Reached end of service. Sleeping...           function=CheckTime line=130

Steps to reproduce:

Download source, have java installed, run the go. Config everything then press enter on "Launch". downloading dependencies --> they download, then it just stops. giving the above error.

Idk if this is because of Java outdated or because depedencies are not for Mac

hbollon commented 3 years ago

Hey! Thanks for your issue! It seems to be the downloaded webdriver which isn't compatible and failed to launch on your system. I'm a little busy but I will try to check out this compatibility issue very soon! :smile:

hbollon commented 3 years ago

I solved your issue on main and create a new release! I invite you to go and test the new executable for macOS :smile: I also update the readme installation guide with few more steps

KnightSec-Official commented 3 years ago
INFO[0387] Downloading and installing dependencies...    function=DownloadDependencies line=278
ERRO[0389] Unable to find the latest HTMLUnit Driver: Get "https://api.github.com/repos/SeleniumHQ/htmlunit-driver/releases/latest": x509: certificate signed by unknown authority  function=DownloadDependencies line=296
ERRO[0389] Unable to find the latest Geckodriver: Get "https://api.github.com/repos/mozilla/geckodriver/releases/latest": x509: certificate signed by unknown authority  function=DownloadDependencies line=305
selenium-server.jar:      0.00 b / 0.00 b [----------------------| 0s ] 0.00 b/s
sauce-connect.zip:        0.00 b / 0.00 b [----------------------| 0s ] 0.00 b/s
chrome-mac.zip:           0.00 b / 0.00 b [----------------------| 0s ] 0.00 b/s
chromedriver.zip:         0.00 b / 0.00 b [----------------------| 0s ] 0.00 b/s
firefox-nightly.tar.bz2:  0.00 b / 0.00 b [----------------------| 0s ] 0.00 b/s
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x161788c]

goroutine 1803 [running]:
github.com/hbollon/igopher.downloadFile(0xc00023e800, 0x180dc79, 0x56, 0x17f32f7, 0x17, 0xc0000b20e0, 0x1d, 0x0, 0x0, 0x0, ...)
    /home/hbollon/Documents/Projets/go-instadm/dependencies.go:418 +0x24c
github.com/hbollon/igopher.handleFile(0xc00023e800, 0x180dc79, 0x56, 0x17f32f7, 0x17, 0xc0000b20e0, 0x1d, 0x0, 0x0, 0x0, ...)
    /home/hbollon/Documents/Projets/go-instadm/dependencies.go:359 +0xb8
github.com/hbollon/igopher.DownloadDependencies.func1(0xc00023e800, 0x180dc79, 0x56, 0x17f32f7, 0x17, 0xc0000b20e0, 0x1d, 0x0, 0x0, 0x0, ...)
    /home/hbollon/Documents/Projets/go-instadm/dependencies.go:338 +0x96
created by github.com/hbollon/igopher.DownloadDependencies
    /home/hbollon/Documents/Projets/go-instadm/dependencies.go:336 +0xe26

Im not very good at java.. never used any of the dependencies in java, just python...

I also use Mac OS HIGH SIERRA. I am not thinking to update to new OS yet

hbollon commented 3 years ago

Arf, it's work just fine on my side with my VM 😭 Do you have installed both Java JRE and JDK? With two links I had put I'm the Readme? Your error messages for Github dependencies are weird, do you have them anyway in the lib directory?

Try to execute it with --force-download flag to refresh all dependencies

KnightSec-Official commented 3 years ago

everythinginstalled properly, i'll try reinstalling them again and run again.

KnightSec-Official commented 3 years ago

Reinstalled java and jre with newest update and now it gives unzip error

INFO[0013] Downloading and installing dependencies...    function=DownloadDependencies line=278
ERRO[0014] Unable to find the latest HTMLUnit Driver: Get "https://api.github.com/repos/SeleniumHQ/htmlunit-driver/releases/latest": x509: certificate signed by unknown authority  function=DownloadDependencies line=296
ERRO[0014] Unable to find the latest Geckodriver: Get "https://api.github.com/repos/mozilla/geckodriver/releases/latest": x509: certificate signed by unknown authority  function=DownloadDependencies line=305
FATA[0016] Error handling chromedriver.zip: Error unzipping "./lib/chromedriver.zip": exit status 9  function=func1 line=339
hbollon commented 3 years ago

Certificates errors are really weird, I never had them and with api.github.com we shouldn't have any problems... For the unzip issue, do you have chromedriver.zip in your lib folder? Can you manually run unzip -o chromedriver.zip -d ./chromedriver without troubles ?

Maybe try to delete all IGopher stuff (lib sub-folder especially) and retry, some old dependencies can cause conflicts with new ones introduced with the new patch 🤔

hbollon commented 3 years ago

I noticed an issue with bot's environment not initialized at the right location if your terminal isn't located in the same directory as the executable (#3). So be sure to cd your terminal. Maybe it can be related to your issue, I will work on that very soon.

KnightSec-Official commented 3 years ago

I noticed an issue with bot's environment not initialized at the right location if your terminal isn't located in the same directory as the executable (#3). So be sure to cd your terminal. Maybe it can be related to your issue, I will work on that very soon.

I tried with multiple dirs. Tried with the src aswell as with the macos amd64.. still the same error as my last. It does not even download anything.. it has nothing to unzip

KnightSec-Official commented 3 years ago

Hmm strange thing i experience rn. Managed to get it to download the files but even when i try to unzip em by double click or by terminal it gives error.

DoubleClick: Screen Shot 2021-02-22 at 12 13 26 AM

Your other script, IG Automation Bot works like a charm (with minor elements removed from web due to unsupported browser on some versions).

EDIT: Somehow the files are there but are 0kb each... They are empty files with nothing in them. Hm.. Its getting frustrating.

hbollon commented 3 years ago

Mmmh so let's start all over again and step by step:

KnightSec-Official commented 3 years ago

Screen Shot 2021-02-22 at 12 26 50 AM

Screen Shot 2021-02-22 at 12 27 00 AM

hbollon commented 3 years ago

Your other script, IG Automation Bot works like a charm (with minor elements removed from web due to unsupported browser on some versions).

Glad to hear this project served you 😄 This project is in early alpha (as you can see lol) and he takes over this POC in a much more ambitious way. I definitely must automate the installation process for the TUI, the GUI version that comes up should not have theses issues

KnightSec-Official commented 3 years ago

Your other script, IG Automation Bot works like a charm (with minor elements removed from web due to unsupported browser on some versions).

Glad to hear this project served you 😄 This project is in early alpha (as you can see lol) and he takes over this POC in a much more ambitious way. I definitely must automate the installation process for the TUI, the GUI version that comes up should not have theses issues

So far no ban and i mass dm-ed like over 100 people No Groups.

hbollon commented 3 years ago

Does it works if you launch it? (You must set your IG credentials before)

KnightSec-Official commented 3 years ago

Does it works if you launch it? (You must set your IG credentials before)

I set my creds, running it gives this: Screen Shot 2021-02-22 at 12 30 44 AM

hbollon commented 3 years ago

Ok so I need to investigate a little bit more on your issue. Can you send me please:

KnightSec-Official commented 3 years ago

yep. sorry for late response

MACOS 10.13.6

java --version         
java 15.0.2 2021-01-19
Java(TM) SE Runtime Environment (build 15.0.2+7-27)
Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)

Which lib subdir. the one in the igopher? if yes, here it is Screen Shot 2021-02-22 at 12 53 02 AM

KnightSec-Official commented 3 years ago

Cert errors.. 2 days ago i deleted all my digicerts from keychain.. had errors running selenium chromedriver with root with SIP disabled.. Imma try to get em back and see if it fixes

hbollon commented 3 years ago

Thanks and no problems 😄 I've find a related issue on the repo of the lib I use to make github api calls, maybe take a look: https://github.com/google/go-github/issues/1049

KnightSec-Official commented 3 years ago

yeah... same error.. readded all root certs.. still the same issue. This is a go-related issue. My go does not trust my certs.. The thing is IDK what cert is that is not trusted by go. all my certs are good

KnightSec-Official commented 3 years ago

Successfuly managed to delete all my saved passwords and website logins.. and still not working. after resetting my keychain and first aiding my mac, enabling sip again. still doesnt work

hbollon commented 3 years ago

You definitely have an issue on your side with your certificates and I'm not familiar enough with MacOS to help you for this... :disappointed: So try to solve that issue to be able to download all dependencies and retry to check if it's working. Keep me informed ! :smile:

KnightSec-Official commented 3 years ago

Will sure do! Thanks for your time!

KnightSec-Official commented 3 years ago

Solved the certification errors by re-adding the digicerts. Also updated to golang 16 and fixed the certification errors. But now it does not zip the files. The problem is: Screen Shot 2021-02-22 at 1 01 48 PM

I want to try and download them manually and then run the script. Where can i get the links for the downloads?

EDIT: Runnig the golang with root gives certification error but the .15 version gave even without root.

KnightSec-Official commented 3 years ago

Screen Shot 2021-02-23 at 12 23 42 AM Screen Shot 2021-02-23 at 12 23 29 AM

Downloaded all of the required files in ./lib/ and the script its working but i think i downloaded wrong versions... Selenium driver is to last version, and last v of chromedriver... :/ and now im stuck at this: Screen Shot 2021-02-23 at 12 12 40 AM It opens a Chromium window but does nothing. Also i have a problem idk why, everytime selenium runs a web browser, EVERY site it accesses gives Invalid certificate EVEN if its trusted(by all means) and not expired. I have tried every posibility to make this not happening and the only way was to add to selenium webdriver script the AllowInvalidCerts options for Chrome...

hbollon commented 3 years ago

Don't panic, on your last screen it's just the scheduler enabled by default and set to run the bot between 8:00 AM and 8:00 PM 😁 you can tweak that in the settings

For unzipping issues, I'm working on dependencies manager improvements to fix all of this 👍

KnightSec-Official commented 3 years ago

Don't panic, on your last screen it's just the scheduler enabled by default and set to run the bot between 8:00 AM and 8:00 PM 😁 you can tweak that in the settings

For unzipping issues, I'm working on dependencies manager improvements to fix all of this 👍

This error of me with the certificates being rejected by selenium browsers has happened every time i run a script with selenium. I don't know if this is because im using different selenium/chrome versions

hbollon commented 3 years ago

Don't panic, on your last screen it's just the scheduler enabled by default and set to run the bot between 8:00 AM and 8:00 PM 😁 you can tweak that in the settings

For unzipping issues, I'm working on dependencies manager improvements to fix all of this 👍

This error of me with the certificates being rejected by selenium browsers has happened every time i run a script with selenium. I don't know if this is because im using different selenium/chrome versions

Your certs issue is really weird but I don't think it's related with your dependencies versions

KnightSec-Official commented 3 years ago

Solved the CERT issue. It was because somehow i was bypassing version of chromedriver and selenium support (used selenium 88 with chrome v90). The lib folder config is messy af. Was able to make it run only by doing some fireworks.. The downloading proccess gives error and because of that, the unzipping fails because of uncompleted downloaded files.zip. After a complete manual download, igopher was unable to rename some zips because the Igohper tought that unzipping chromedriver_mac64, would create A FOLDER named chromedriver_mac64. WRONG. Unzipping the file would just put the FILE (not a folder) in the lib. I had to create a folder (chromedriver_64) and manually put the UNZIPPED 'chromedriver' file in there. Let me know if downloading the files from your VM has the same errors and creates 0kb zip files.

I'll close and mark as solved.

P.S. I downloaded the files manually, made some changes in the lib, created some folders and renamed etc and now its working.

hbollon commented 3 years ago

Solved the CERT issue. It was because somehow i was bypassing version of chromedriver and selenium support (used selenium 88 with chrome v90). The lib folder config is messy af. Was able to make it run only by doing some fireworks.. The downloading proccess gives error and because of that, the unzipping fails because of uncompleted downloaded files.zip. After a complete manual download, igopher was unable to rename some zips because the Igohper tought that unzipping chromedriver_mac64, would create A FOLDER named chromedriver_mac64. WRONG. Unzipping the file would just put the FILE (not a folder) in the lib. I had to create a folder (chromedriver_64) and manually put the UNZIPPED 'chromedriver' file in there. Let me know if downloading the files from your VM has the same errors and creates 0kb zip files.

I'll close and mark as solved.

P.S. I downloaded the files manually, made some changes in the lib, created some folders and renamed etc and now its working.

Thanks a lot, your feedback we'll help me a lot to improve the dependencies manager ! I will add hash checking on downloaded data to avoid what you've experienced.