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
158 stars 30 forks source link

Startup crash due to incompatibility with Java version #18

Closed GHST-13 closed 2 years ago

GHST-13 commented 2 years ago

Describe the bug After launch, I receive the follow error message: _A Javascript Error occurred in the main process_ _Uncaught Exception: Error: read ECONNRESET at TCP.onStreamRead (internal_streambasecommons.js:205:27)

Once launched, 3 chrome windows open up (with blue colored logo) and a javapath cmd promt type screen opens up (its a black screen that looks like cmdprompt but with no text on it)

To Reproduce Steps to reproduce the behavior:

  1. Input all settings
  2. Launch
  3. See error

Expected behavior A solid launch! I added java and jdk to my path.

Screenshots Will do if needed

Error output _A Javascript Error occurred in the main process_ _Uncaught Exception: Error: read ECONNRESET at TCP.onStreamRead (internal_streambasecommons.js:205:27)

Desktop (please complete the following information): Windows 10

Additional context Add any other context about the problem here.

GHST-13 commented 2 years ago

btw, this is for GUI

hbollon commented 2 years ago

Hi! Can you please provide me few informations:

GHST-13 commented 2 years ago

i'm sorry, as I am new to this can you tell me what exactly my credentials are in the logs? i have them pulled up but don't know what exactly my credentials would be.

java --version java 17.0.1 2021-10-19 LTS Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39) Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)

i have the latest version of IGopher, as I just clicked the link that said "latest release"

GHST-13 commented 2 years ago

here is the log

{"level":"info","msg":"astikit: starting worker...","time":"2021-11-10T21:40:31-08:00"}
{"level":"info","msg":"astikit: worker is now waiting...","time":"2021-11-10T21:40:34-08:00"}
{"level":"info","msg":"Downloading and installing dependencies...","time":"2021-11-10T22:06:20-08:00"}
{"level":"info","msg":"Downloads finished","time":"2021-11-10T22:07:06-08:00"}
{"level":"error","msg":"unknown error - 33: Unable to create session from {\n  \"desiredCapabilities\": {\n    \"browserName\": \"chrome\",\n    \"chromeOptions\": {\n      \"binary\": \".\\\\lib\\\\chrome-win\\\\chrome.exe\",\n      \"args\": [\n        \"--incognito\",\n        \"--disable-extensions\",\n        \"--disable-infobars\",\n        \"--disable-dev-shm-usage\",\n        \"--no-sandbox\",\n        \"--window-size=360,740\"\n      ],\n      \"mobileEmulation\": {\n        \"deviceMetrics\": {\n          \"width\": 360,\n          \"height\": 740,\n          \"pixelRatio\": 2.05\n        },\n        \"userAgent\": \"Mozilla\\u002f5.0 (Linux; Android 8.0.0; SM-G960F Build\\u002fR16NW) AppleWebKit\\u002f537.36 (KHTML, like Gecko) Chrome\\u002f64.0.3282.137 Mobile Safari\\u002f537.36\"\n      },\n      \"w3c\": false\n    },\n    \"goog:chromeOptions\": {\n      \"binary\": \".\\\\lib\\\\chrome-win\\\\chrome.exe\",\n      \"args\": [\n        \"--incognito\",\n        \"--disable-extensions\",\n        \"--disable-infobars\",\n        \"--disable-dev-shm-usage\",\n        \"--no-sandbox\",\n        \"--window-size=360,740\"\n      ],\n      \"mobileEmulation\": {\n        \"deviceMetrics\": {\n          \"width\": 360,\n          \"height\": 740,\n          \"pixelRatio\": 2.05\n        },\n        \"userAgent\": \"Mozilla\\u002f5.0 (Linux; Android 8.0.0; SM-G960F Build\\u002fR16NW) AppleWebKit\\u002f537.36 (KHTML, like Gecko) Chrome\\ Mobile Safari\\u002f537.36\"\n      },\n      \"w3c\": false\n    }\n  },\n  \"capabilities\": {\n    \"firstMatch\": [\n      {\n        \"browserName\": \"chrome\",\n        \"goog:chromeOptions\": {\n          \"binary\": \".\\\\lib\\\\chrome-win\\\\chrome.exe\",\n          \"args\": [\n            \"--incognito\",\n            \"--disable-extensions\",\n            \"--disable-infobars\",\n            \"--disable-dev-shm-usage\",\n            \"--no-sandbox\",\n            \"--window-size=360,740\"\n          ],\n          \"mobileEmulation\": {\n            \"deviceMetrics\": {\n              \"width\": 360,\n              \"height\": 740,\n              \"pixelRatio\": 2.05\n            },\n            \"userAgent\": \"Mozilla\\u002f5.0 (Linux; Android 8.0.0; SM-G960F Build\\u002fR16NW) AppleWebKit\\u002f537.36 (KHTML, like Gecko) Chrome\\u002f64.0.3282.137 Mobile Safari\\u002f537.36\"\n          },\n          \"w3c\": false\n        }\n      }\n    ]\n  }\n}\nBuild info: version: ', revision: '', time: '2018-11-14T08:25:53'\nSystem info: host: '', ip: '', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.1'\nDriver info: driver.version: unknown","time":"2021-11-10T22:07:09-08:00"}
{"level":"info","msg":"Connecting to Instagram account...","time":"2021-11-10T22:07:09-08:00"}
{"level":"info","msg":"astikit: starting worker...","time":"2021-11-10T22:07:33-08:00"}
{"level":"info","msg":"astikit: worker is now waiting...","time":"2021-11-10T22:07:34-08:00"}
{"level":"info","msg":"Downloading and installing dependencies...","time":"2021-11-10T22:07:41-08:00"}
{"level":"warning","msg":"Error renaming \".\\\\lib\\\\chromedriver_win32\\\\chromedriver.exe\" to \".\\\\lib\\\\chromedriver.exe\": rename .\\lib\\chromedriver_win32\\chromedriver.exe .\\lib\\chromedriver.exe: Access is denied.","time":"2021-11-10T22:07:45-08:00"}
{"level":"info","msg":"Downloads finished","time":"2021-11-10T22:07:47-08:00"}
{"level":"error","msg":"unknown error - 33: Unable to create session from {\n  \"desiredCapabilities\": {\n    \"browserName\": \"chrome\",\n    \"chromeOptions\": {\n      \"binary\": \".\\\\lib\\\\chrome-win\\\\chrome.exe\",\n      \"args\": [\n        \"--incognito\",\n        \"--disable-extensions\",\n        \"--disable-infobars\",\n        \"--disable-dev-shm-usage\",\n        \"--no-sandbox\",\n        \"--window-size=360,740\"\n      ],\n      \"mobileEmulation\": {\n        \"deviceMetrics\": {\n          \"width\": 360,\n          \"height\": 740,\n          \"pixelRatio\": 2.05\n        },\n        \"userAgent\": \"Mozilla\\u002f5.0 (Linux; Android 8.0.0; SM-G960F Build\\u002fR16NW) AppleWebKit\\u002f537.36 (KHTML, like Gecko) Chrome\\u002f64.0.3282.137 Mobile Safari\\u002f537.36\"\n      },\n      \"w3c\": false\n    },\n    \"goog:chromeOptions\": {\n      \"binary\": \".\\\\lib\\\\chrome-win\\\\chrome.exe\",\n      \"args\": [\n        \"--incognito\",\n        \"--disable-extensions\",\n        \"--disable-infobars\",\n        \"--disable-dev-shm-usage\",\n        \"--no-sandbox\",\n        \"--window-size=360,740\"\n      ],\n      \"mobileEmulation\": {\n        \"deviceMetrics\": {\n          \"width\": 360,\n          \"height\": 740,\n          \"pixelRatio\": 2.05\n        },\n        \"userAgent\": \"Mozilla\\u002f5.0 (Linux; Android 8.0.0; SM-G960F Build\\u002fR16NW) AppleWebKit\\u002f537.36 (KHTML, like Gecko) Chrome\\ Mobile Safari\\u002f537.36\"\n      },\n      \"w3c\": false\n    }\n  },\n  \"capabilities\": {\n    \"firstMatch\": [\n      {\n        \"browserName\": \"chrome\",\n        \"goog:chromeOptions\": {\n          \"binary\": \".\\\\lib\\\\chrome-win\\\\chrome.exe\",\n          \"args\": [\n            \"--incognito\",\n            \"--disable-extensions\",\n            \"--disable-infobars\",\n            \"--disable-dev-shm-usage\",\n            \"--no-sandbox\",\n            \"--window-size=360,740\"\n          ],\n          \"mobileEmulation\": {\n            \"deviceMetrics\": {\n              \"width\": 360,\n              \"height\": 740,\n              \"pixelRatio\": 2.05\n            },\n            \"userAgent\": \"Mozilla\\u002f5.0 (Linux; Android 8.0.0; SM-G960F Build\\u002fR16NW) AppleWebKit\\u002f537.36 (KHTML, like Gecko) Chrome\\u002f64.0.3282.137 Mobile Safari\\u002f537.36\"\n          },\n          \"w3c\": false\n        }\n      }\n    ]\n  }\n}\nBuild info: version: '', revision: '', time: '2018-11-14T08:25:53'\nSystem info: host: '', ip: '', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.1'\nDriver info: driver.version: unknown","time":"2021-11-10T22:07:50-08:00"}
{"level":"info","msg":"Connecting to Instagram account...","time":"2021-11-10T22:07:50-08:00"}
{"level":"info","msg":"astikit: starting worker...","time":"2021-11-10T22:22:31-08:00"}
{"level":"info","msg":"astikit: worker is now waiting...","time":"2021-11-10T22:22:32-08:00"}
{"level":"info","msg":"Downloading and installing dependencies...","time":"2021-11-10T22:22:41-08:00"}
{"level":"warning","msg":"Error renaming \".\\\\lib\\\\chromedriver_win32\\\\chromedriver.exe\" to \".\\\\lib\\\\chromedriver.exe\": rename .\\lib\\chromedriver_win32\\chromedriver.exe .\\lib\\chromedriver.exe: Access is denied.","time":"2021-11-10T22:22:45-08:00"}
{"level":"info","msg":"Downloads finished","time":"2021-11-10T22:22:47-08:00"}
{"level":"error","msg":"unknown error - 33: Unable to create session from {\n  \"desiredCapabilities\": {\n    \"browserName\": \"chrome\",\n    \"chromeOptions\": {\n      \"binary\": \".\\\\lib\\\\chrome-win\\\\chrome.exe\",\n      \"args\": [\n        \"--incognito\",\n        \"--disable-extensions\",\n        \"--disable-infobars\",\n        \"--disable-dev-shm-usage\",\n        \"--no-sandbox\",\n        \"--window-size=360,740\"\n      ],\n      \"mobileEmulation\": {\n        \"deviceMetrics\": {\n          \"width\": 360,\n          \"height\": 740,\n          \"pixelRatio\": 2.05\n        },\n        \"userAgent\": \"Mozilla\\u002f5.0 (Linux; Android 8.0.0; SM-G960F Build\\u002fR16NW) AppleWebKit\\u002f537.36 (KHTML, like Gecko) Chrome\\u002f64.0.3282.137 Mobile Safari\\u002f537.36\"\n      },\n      \"w3c\": false\n    },\n    \"goog:chromeOptions\": {\n      \"binary\": \".\\\\lib\\\\chrome-win\\\\chrome.exe\",\n      \"args\": [\n        \"--incognito\",\n        \"--disable-extensions\",\n        \"--disable-infobars\",\n        \"--disable-dev-shm-usage\",\n        \"--no-sandbox\",\n        \"--window-size=360,740\"\n      ],\n      \"mobileEmulation\": {\n        \"deviceMetrics\": {\n          \"width\": 360,\n          \"height\": 740,\n          \"pixelRatio\": 2.05\n        },\n        \"userAgent\": \"Mozilla\\u002f5.0 (Linux; Android 8.0.0; SM-G960F Build\\u002fR16NW) AppleWebKit\\u002f537.36 (KHTML, like Gecko) Chrome\\ Mobile Safari\\u002f537.36\"\n      },\n      \"w3c\": false\n    }\n  },\n  \"capabilities\": {\n    \"firstMatch\": [\n      {\n        \"browserName\": \"chrome\",\n        \"goog:chromeOptions\": {\n          \"binary\": \".\\\\lib\\\\chrome-win\\\\chrome.exe\",\n          \"args\": [\n            \"--incognito\",\n            \"--disable-extensions\",\n            \"--disable-infobars\",\n            \"--disable-dev-shm-usage\",\n            \"--no-sandbox\",\n            \"--window-size=360,740\"\n          ],\n          \"mobileEmulation\": {\n            \"deviceMetrics\": {\n              \"width\": 360,\n              \"height\": 740,\n              \"pixelRatio\": 2.05\n            },\n            \"userAgent\": \"Mozilla\\u002f5.0 (Linux; Android 8.0.0; SM-G960F Build\\u002fR16NW) AppleWebKit\\u002f537.36 (KHTML, like Gecko) Chrome\\u002f64.0.3282.137 Mobile Safari\\u002f537.36\"\n          },\n          \"w3c\": false\n        }\n      }\n    ]\n  }\n}\nBuild info: version: '', revision: '', time: '2018-11-14T08:25:53'\nSystem info: host:, ip: '', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.1'\nDriver info: driver.version: unknown","time":"2021-11-10T22:22:50-08:00"}
{"level":"info","msg":"Connecting to Instagram account...","time":"2021-11-10T22:22:50-08:00"}
{"level":"info","msg":"astikit: starting worker...","time":"2021-11-10T22:41:15-08:00"}
{"level":"info","msg":"astikit: worker is now waiting...","time":"2021-11-10T22:41:16-08:00"}
{"level":"info","msg":"astikit: stopping worker...","time":"2021-11-10T22:52:03-08:00"}
{"level":"error","msg":"'C:\\Users\\\AppData\\Roaming\\IGopher\\vendor\\electron-windows-amd64\\electron.exe' exited with code: 1","time":"2021-11-10T22:52:03-08:00"}
{"level":"error","msg":"accept tcp : use of closed network connection while TCP accepting","time":"2021-11-10T22:52:03-08:00"}
{"level":"info","msg":"IGopher's ressources successfully cleared!","time":"2021-11-10T22:52:03-08:00"}
hbollon commented 2 years ago

Ok so can you try with Java 8? Download link

hbollon commented 2 years ago

{"level":"warning","msg":"Error renaming ".\lib\chromedriver_win32\chromedriver.exe" to ".\lib\chromedriver.exe": rename .\lib\chromedriver_win32\chromedriver.exe .\lib\chromedriver.exe: Access is denied.","time":"2021-11-10T22:22:45-08:00"}

Apparently you have a known bug Can you check if chromedriver.exe file is present in the lib subfolder?

GHST-13 commented 2 years ago

yes it is, in the chromedriver_win32 folder

GHST-13 commented 2 years ago

and in the lib folder

hbollon commented 2 years ago

Ok so it should be good, can you provide me a screenshot of your lib/ subfolder please? Imo it must be related with Java 17 which must not be compatible with Selenium 3 (a dependency used), try with Java 8.

EDIT: according to this source you must have java 8 or 11 (maybe some minor issues with 11).

GHST-13 commented 2 years ago

i currently am, is the JDK unaffected?

GHST-13 commented 2 years ago

Screenshot (1) here is pic of lib

hbollon commented 2 years ago

i currently am, is the JDK unaffected?

Accordingly to your java --version output, the used Java SE Runtime used is 17. You must change it by one of the supported versions. Currently IGopher is under development and was tested with Java 8 (https://www.java.com/fr/download/) I heavily advice you this one

I'm currently test with openjdk-11 (I will keep you updated) and in the future IGopher should be compatible with newer versions of Java

GHST-13 commented 2 years ago

okay, so now here's whats going on:

after downloading java 8: it got to the point where the bot opens chrome, logins in, goes to followers, and once its there the entire thing just shuts down and then theres nothing. nothing at all. no error, nothing.

GHST-13 commented 2 years ago

okay! it has sent the first dm. but it is rather slow right now, will there be any chance to speed this process up in the future?

also, i ordered the bot to send 2 dms only, but it continued to send more than 2. So I exited the browser and cmd prompt, but once they were closed i got that same error message and the entire bot closed out. _Uncaught Exception: Error: read ECONNRESET at TCP.onStreamRead (internal_streambasecommons.js:205:27)

hbollon commented 2 years ago

It's handled by quotas settings that you can tweak but also have minimal random waiting times between actions. As I told you previously IGopher is designed to be a "safe" Instagram bot aiming account security and durability over time instead of massive spamming. That said, it will be possible to reduce or disable waiting times but in this case the security of your account will not be guaranteed anymore and it will be banned quickly.

Note: I tested IGopher with openjdk-11 and it works great. I will so update the README to specify the Java version constraint.

hbollon commented 2 years ago

also, i ordered the bot to send 2 dms only, but it continued to send more than 2.

Can I have your config.yml file please located under config/? (be careful to remove your credentials once again)

So I exited the browser and cmd prompt, but once they were closed i got that same error message and the entire bot closed out. Uncaught Exception: Error: read ECONNRESET at TCP.onStreamRead (internal_streambase_commons.js:205:27)

This bug is known and already fixed on the master branch but not released yet. I will probably be released with the v0.4.0 update which is coming soon :wink: You can watch this repo for new releases to be noticed when a new one is out :+1:

stale[bot] commented 2 years ago

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.