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

Can't launch terminal version - DevToolsActivePort file doesn't exist #44

Closed szymczag closed 1 year ago

szymczag commented 1 year ago

Please read the comments as well!

Hi there,

Describe the bug While running the app I'm getting an error:

FATA[0032] Error handling firefox.tar.bz2: Error unzipping "./lib/firefox.tar.bz2": exit status 2  function=func1 line=504

To Reproduce Steps to reproduce the behavior:

  1. Download the TUI release:
    $ wget https://github.com/hbollon/IGopher/releases/download/v0.4.2/IGopherTUI-linux-amd64
  2. Run it:
    $ ./IGopherTUI-linux-amd64
  3. Go to Configure and fill the username and password. Save and go back.
  4. Hit Launch, it will start the init process:
    
    ๐Ÿฆ„ Welcome to IGopher, the (soon) most powerful and versatile Instagram bot!

๐Ÿš€ - Launch! ๐Ÿ”ง - Configure ๐Ÿงจ - Reset settings ๐Ÿšช - Exit

INFO[0001] Downloading and installing dependencies... function=DownloadDependencies line=398 Linux_x64/949505/chrome-linux.zip sauce-connect.tar.gz: done! chrome-linux.zip: done! chromedriver.zip: done! firefox.tar.bz2: done! selenium-server.jar: done! htmlunit-driver.jar: done! geckodriver.tar.gz: done! proxy-login-automator: done! FATA[0038] Error handling firefox.tar.bz2: Error unzipping "./lib/firefox.tar.bz2": exit status 2 function=func1 line=504


**Error output**

$ cat logs/logs.log {"level":"info","msg":"Downloading and installing dependencies...","time":"2023-06-18T09:04:41Z"} {"level":"fatal","msg":"Error handling firefox.tar.bz2: Error unzipping \"./lib/firefox.tar.bz2\": exit status 2","time":"2023-06-18T09:05:12Z"} {"level":"info","msg":"Downloading and installing dependencies...","time":"2023-06-18T09:09:33Z"} {"level":"fatal","msg":"Error handling firefox.tar.bz2: Error unzipping \"./lib/firefox.tar.bz2\": exit status 2","time":"2023-06-18T09:10:10Z"}

**Environment:**
- OS:

$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.2 LTS Release: 22.04 Codename: jammy

- unpacking tools:
``` $ dpkg -l |grep zip
ii  gzip                            1.10-4ubuntu4.1                         amd64        GNU compression utilities
ii  p7zip                           16.02+dfsg-8                            amd64        7zr file archiver with high compression ratio
ii  p7zip-full                      16.02+dfsg-8                            amd64        7z and 7za file archivers with high compression ratio
ii  python3-zipp                    1.0.0-3                                 all          pathlib-compatible Zipfile object wrapper - Python 3.x
ii  unzip                           6.0-26ubuntu3.1                         amd64        De-archiver for .zip files
szymczag commented 1 year ago

Alright, this one was because of lack of bzip2:

$ file lib/firefox.tar.bz2
lib/firefox.tar.bz2: bzip2 compressed data, block size = 900k
$ tar -xvf lib/firefox.tar.bz2
tar (child): cannot run bzip2: No such file or directory
tar (child): trying lbzip2
tar (child): lbzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

after sudo apt install -y bzip2 I've tried again and I'm getting:

  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location ./lib/chrome-linux/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
  (Driver info: chromedriver=98.0.4755.0 (9d2bb122e34ec2449c9a81368cd6196b50ccb071-refs/heads/main@{#949505}),platform=Linux 5.15.0-75-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 178 milliseconds
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '[cut]', ip: '[cut]', os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.0-75-generic', java.version: '11.0.19'
Driver info: driver.version: unknown  function=InitChromeWebDriver line=185
INFO[0026] Connecting to Instagram account...            function=connectToInstagramWebDriver line=17
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xe8 pc=0x71bd23]

goroutine 1 [running]:
github.com/hbollon/igopher/internal/actions.connectToInstagramWebDriver(0xea1940)
        /home/runner/work/IGopher/IGopher/internal/actions/login.go:19 +0x83
github.com/hbollon/igopher/internal/actions.ConnectToInstagram(...)
        /home/runner/work/IGopher/IGopher/internal/actions/login.go:13
github.com/hbollon/igopher/internal/automation.LaunchBotTui()
        /home/runner/work/IGopher/IGopher/internal/automation/bot.go:77 +0x279
main.main()
        /home/runner/work/IGopher/IGopher/cmd/igopher/tui/IGopherTUI_prod.go:63 +0x12f
szymczag commented 1 year ago

I've tried on two different linux hosts with exactly the same result.

stale[bot] commented 1 year 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.