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

Build binaries for FlareSolverr 3 #660

Closed
ngosang opened this issue Jan 6, 2023 · 47 comments
Closed

Build binaries for FlareSolverr 3 #660

ngosang opened this issue Jan 6, 2023 · 47 comments
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@ngosang
Copy link
Member

ngosang commented Jan 6, 2023

Build Windows / Linux / macOS binaries for FlareSolverr 3. It was supported in FlareSolverr 2, but it was removed in the refactor.
See => https://pyinstaller.org/en/stable/
Related #650

@ngosang ngosang added the enhancement New feature or request label Jan 6, 2023
@ngosang ngosang added this to the 3.1.0 milestone Jan 6, 2023
This was referenced Jan 6, 2023
@ngosang ngosang added the help wanted Extra attention is needed label Jan 8, 2023
@ilike2burnthing ilike2burnthing mentioned this issue Jan 9, 2023
3 tasks
@Romangelo
Copy link

Where's the precompiled version?

@GravuTrad
Copy link

check 3.0.0 changelog

@jmackxiii
Copy link

Is there a plan to provide the windows binaries for updates at all? Had an automated update process built around downloading those from the repo.. Would love to go back to that so I figured I would ask.

@Romangelo
Copy link

Don't know why it has to be like this. It's not user-friendly this way.

@omerf111
Copy link

omerf111 commented Feb 10, 2023

i did build an executable with pyinstaller but when i try to open it, it closes immediately. am i doing something wrong? should i need extra steps other than "pyinstaller flaresolverr.py" or "pyinstaller --onefile flaresolverr.py" opening with command works fine.

i think it has to do with required packages, i tried different commands to include packages in the exe but no luck.

error message:

Traceback (most recent call last):
File "flaresolverr.py", line 87, in
File "utils.py", line 31, in get_flaresolverr_version
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\MER~1\AppData\Local\Temp\_MEI88122\..\package.json'
[7524] Failed to execute script 'flaresolverr' due to unhandled exception!

@DrStrange
Copy link

DrStrange commented Feb 12, 2023

@omerf111 I had the same error as you but have now got the binary executable working in Windows 10:

C:\Program Files\Flaresolverr\dist>flaresolverr.exe
2023-02-12 23:36:43 INFO     FlareSolverr 3.0.2
2023-02-12 23:36:43 INFO     Testing web browser installation...
2023-02-12 23:36:43 INFO     Chrome / Chromium path: C:\Program Files\Google\Chrome\Application\chrome.exe
2023-02-12 23:36:43 INFO     Chrome / Chromium major version: 110
2023-02-12 23:36:46 INFO     FlareSolverr User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
2023-02-12 23:36:46 INFO     Test successful
2023-02-12 23:36:46 INFO     Serving on http://0.0.0.0:8191
2023-02-12 23:37:02 INFO     127.0.0.1 GET http://localhost:8191/ 200 OK

The error is that flaresolverr.exe can't find package.json. I know, would be more helpful if the error message stated this.

FlareSolverr runs fine from source with no errors so I noted where package.json was in relation to the src folder. They are both in the FlareSolverr-3.0.2 folder downloaded from Github - ie on the same folder level. But PyInstaller creates the dist folder as a subfolder of the src folder then creates another folder in dist called FlareSolverr where it creates the flaresolverr.exe and its other related files. So you need to move the flaresolverr.exe file and all its related files back to the same folder level relative to package.json. Move all the files in the dist>FlareSolverr folder to the dist folder. Then move the dist folder to the FlareSolverr-3.0.2 folder. This is what I did to get it working.
If you are going to move the FlareSolverr-3.0.2 folder somewhere else and rename it, don't start flaresolverr.exe until you do that, as I think the pycache folder will cause a startup error in flaresolverr.exe.

@Zauxst
Copy link

Zauxst commented Feb 18, 2023

check 3.0.0 changelog

This should be specified in the README.md... Right now for Windows it says that you download the zip from the release that contains the binaries.

@Zauxst
Copy link

Zauxst commented Feb 18, 2023

@DrStrange your solution doesn't work for me.

Building from the root folder
pyinstaller.exe --onefile src\flaresolverr.py

will have the following structure:

PS D:\Downloads\FlareSolverr-3.0.2> tree
Folder PATH listing
Volume serial number is 38E3-386C
D:.
├───.github
│   ├───ISSUE_TEMPLATE
│   └───workflows
├───build
│   └───flaresolverr
│       └───localpycs
├───dist
├───html_samples
├───resources
└───src
    ├───bottle_plugins
    │   └───__pycache__
    └───undetected_chromedriver
        └───__pycache__

And then when I list and run:

ls


    Directory: D:\Downloads\FlareSolverr-3.0.2\dist


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         2/18/2023     20:45       14557732 flaresolverr.exe

PS D:\Downloads\FlareSolverr-3.0.2\dist> .\flaresolverr.exe
Traceback (most recent call last):
  File "flaresolverr.py", line 87, in <module>
  File "utils.py", line 31, in get_flaresolverr_version
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Zauxst\\AppData\\Local\\Temp\\_MEI207042\\..\\package.json'
[10660] Failed to execute script 'flaresolverr' due to unhandled exception!

While the FlareSolverr-3.0.2 contains the stuff from the zip.

ls


    Directory: D:\Downloads\FlareSolverr-3.0.2


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----          1/8/2023     21:48                .github
d-----         2/18/2023     20:45                build
d-----         2/18/2023     20:45                dist
d-----          1/8/2023     21:48                html_samples
d-----          1/8/2023     21:48                resources
d-----          1/8/2023     21:48                src
------          1/8/2023     21:48             47 .dockerignore
------          1/8/2023     21:48           1602 .gitignore
------          1/8/2023     21:48           8800 CHANGELOG.md
------          1/8/2023     21:48            416 docker-compose.yml
------          1/8/2023     21:48           2741 Dockerfile
-a----         2/18/2023     20:45            873 flaresolverr.spec
------          1/8/2023     21:48           1099 LICENSE
------          1/8/2023     21:48            193 package.json
------          1/8/2023     21:48          15829 README.md
------          1/8/2023     21:48            185 requirements.txt
------          1/8/2023     21:48             15 test-requirements.txt

dist contains the .exe only, nothing else as you would suggest.

ls .\build\


    Directory: D:\Downloads\FlareSolverr-3.0.2\build


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         2/18/2023     20:45                flaresolverr


PS D:\Downloads\FlareSolverr-3.0.2> ls .\build\flaresolverr\


    Directory: D:\Downloads\FlareSolverr-3.0.2\build\flaresolverr


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         2/18/2023     20:45                localpycs
-a----         2/18/2023     20:45         122286 Analysis-00.toc
-a----         2/18/2023     20:45        1066353 base_library.zip
-a----         2/18/2023     20:45          12485 EXE-00.toc
-a----         2/18/2023     20:45           1425 flaresolverr.exe.manifest
-a----         2/18/2023     20:45       14237732 flaresolverr.pkg
-a----         2/18/2023     20:45          10920 PKG-00.toc
-a----         2/18/2023     20:45        3685527 PYZ-00.pyz
-a----         2/18/2023     20:45         111589 PYZ-00.toc
-a----         2/18/2023     20:45          14240 warn-flaresolverr.txt
-a----         2/18/2023     20:45        1153627 xref-flaresolverr.html

And src for the sake of it.

ls .\src\


    Directory: D:\Downloads\FlareSolverr-3.0.2\src


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         2/18/2023     20:45                bottle_plugins
d-----         2/18/2023     20:45                undetected_chromedriver
------          1/8/2023     21:48           1927 dtos.py
------          1/8/2023     21:48           2631 flaresolverr.py
------          1/8/2023     21:48          11086 flaresolverr_service.py
------          1/8/2023     21:48          15301 tests.py
------          1/8/2023     21:48           4886 tests_sites.py
------          1/8/2023     21:48           6002 utils.py

So frustrating...

Initially I was running it in venv to ensure I don't install python modules in the system but quickly stopped doing that out of frustration with this error.

Do you mind clearing up your steps and commands to properly build this?

@ilike2burnthing
Copy link
Contributor

This should be specified in the README.md... Right now for Windows it says that you download the zip from the release that contains the binaries.

Where?

Precompiled binaries are not currently available for v3. Please see #660 for updates, or below for instructions of how to build FlareSolverr from source code.

https://github.com/FlareSolverr/FlareSolverr#precompiled-binaries

@DrStrange
Copy link

DrStrange commented Feb 19, 2023

@Zauxst
I am not very familiar at all with Python, PyInstaller or Powershell (I use the Command Prompt) and did originally build using the Command Prompt instead of PS then used File Explorer to create a folder D:\Downloads\FlareSolverr-3.0.2\dist. I then moved D:\Downloads\FlareSolver-3.0.2\src\dist\flaresolverr\*.* to D:\Downloads\FlareSolver-3.0.2\dist.
D:\Downloads\Flaresolverr-3.0.2\src\dist can then be deleted if you wish.
Flaresolverr.exe runs ok for me with the Build folder left at D:\Downloads\Flaresolverr-3.0.2\src\build.
Luckily I used PyInstaller without the --onefile option when I built, as using this --onefile option now I do get the same error as you and would have been unable to solve it.

Immediately after PyInstaller finishes creating the build files and before any files are moved, the D:\Downloads\Flaresolverr-3.0.2\src\dist folder should contain only a folder called flaresolverr. This flaresolverr folder should contain flaresolverr.exe and many other folders and files which I show below. Maybe try reinstalling Python or Chrome or PyInstaller or the dependencies?

Here is the build steps using PS for output which again results in a working build for me. I also list the versions of all the relevant programs and packages (requests and selenium are updates from requirements.txt). The paths for some of the Move-item -Path commands might be able to be shortened with Move-Item -Path .\* as they are in the current folder but PS gave me an error doing this and as I say I am not familiar with PS so I used full pathnames.

Hope this helps you.

PS D:\Downloads\FlareSolverr-3.0.2> ls


    Directory: D:\Downloads\FlareSolverr-3.0.2


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        08/01/2023     19:48                .github
d-----        08/01/2023     19:48                html_samples
d-----        08/01/2023     19:48                resources
d-----        08/01/2023     19:48                src
------        08/01/2023     19:48             47 .dockerignore
------        08/01/2023     19:48           1602 .gitignore
------        08/01/2023     19:48           8800 CHANGELOG.md
------        08/01/2023     19:48            416 docker-compose.yml
------        08/01/2023     19:48           2741 Dockerfile
------        08/01/2023     19:48           1099 LICENSE
------        08/01/2023     19:48            193 package.json
------        08/01/2023     19:48          15829 README.md
------        08/01/2023     19:48            185 requirements.txt
------        08/01/2023     19:48             15 test-requirements.txt


PS D:\Downloads\FlareSolverr-3.0.2> cd src
PS D:\Downloads\FlareSolverr-3.0.2\src> ls


    Directory: D:\Downloads\FlareSolverr-3.0.2\src


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        08/01/2023     19:48                bottle_plugins
d-----        08/01/2023     19:48                undetected_chromedriver
------        08/01/2023     19:48           1927 dtos.py
------        08/01/2023     19:48           2631 flaresolverr.py
------        08/01/2023     19:48          11086 flaresolverr_service.py
------        08/01/2023     19:48          15301 tests.py
------        08/01/2023     19:48           4886 tests_sites.py
------        08/01/2023     19:48           6002 utils.py


PS D:\Downloads\FlareSolverr-3.0.2\src> pyinstaller flaresolverr.py
481 INFO: PyInstaller: 5.8.0
481 INFO: Python: 3.11.2
500 INFO: Platform: Windows-10-10.0.19045-SP0
502 INFO: wrote D:\Downloads\FlareSolverr-3.0.2\src\flaresolverr.spec
505 INFO: UPX is not available.
507 INFO: Extending PYTHONPATH with paths
['D:\\Downloads\\FlareSolverr-3.0.2\\src']
1042 INFO: checking Analysis
1042 INFO: Building Analysis because Analysis-00.toc is non existent
1047 INFO: Initializing module dependency graph...
1051 INFO: Caching module graph hooks...
1080 INFO: Analyzing base_library.zip ...
4380 INFO: Loading module hook 'hook-heapq.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks'...
4568 INFO: Loading module hook 'hook-encodings.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks'...
7833 INFO: Loading module hook 'hook-pickle.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks'...
10518 INFO: Caching module dependency graph...
10740 INFO: running Analysis Analysis-00.toc
10771 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
  required by C:\Users\UserAccount\AppData\Local\Programs\Python\Python311\python.exe
11027 INFO: Analyzing D:\Downloads\FlareSolverr-3.0.2\src\flaresolverr.py
11977 INFO: Loading module hook 'hook-platform.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks'...
12646 INFO: Loading module hook 'hook-selenium.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
13391 INFO: Loading module hook 'hook-certifi.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
13519 INFO: Processing pre-safe import module hook urllib3.packages.six.moves from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-urllib3.packages.six.moves.py'.
14967 INFO: Loading module hook 'hook-xml.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks'...
14973 INFO: Loading module hook 'hook-xml.dom.domreg.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks'...
15472 INFO: Loading module hook 'hook-charset_normalizer.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
15825 INFO: Loading module hook 'hook-websockets.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
16457 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks'...
16847 INFO: Processing pre-find module path hook distutils from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
17189 INFO: Loading module hook 'hook-distutils.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks'...
17810 INFO: Processing module hooks...
18059 INFO: Loading module hook 'hook-setuptools.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks'...
20734 INFO: Loading module hook 'hook-distutils.util.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks'...
20801 INFO: Loading module hook 'hook-sysconfig.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks'...
21155 INFO: Loading module hook 'hook-pkg_resources.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks'...
24805 INFO: Loading module hook 'hook-setuptools.msvc.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks'...
25658 INFO: Loading module hook 'hook-difflib.py' from 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks'...
26696 INFO: Looking for ctypes DLLs
26813 INFO: Analyzing run-time hooks ...
26822 INFO: Including run-time hook 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py'
26826 INFO: Including run-time hook 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py'
26833 INFO: Including run-time hook 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py'
26841 INFO: Including run-time hook 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_setuptools.py'
26844 INFO: Including run-time hook 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgres.py'
26871 INFO: Looking for dynamic libraries
772 INFO: Extra DLL search directories (AddDllDirectory): []
773 INFO: Extra DLL search directories (PATH): ['C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath', 'C:\\Windows\\system32', 'C:\\Windows', 'C:\\Windows\\System32\\Wbem', 'C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\', 'C:\\Windows\\System32\\OpenSSH\\', 'C:\\Program Files (x86)\\Smart Projects\\DVDVob2Mpg', 'C:\\Program Files\\gs\\gs10.00.0\\bin', 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311', 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Scripts', 'C:\\Program Files\\nodejs\\', 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Scripts\\', 'C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\', 'C:\\Users\\UserAccount\\AppData\\Local\\Microsoft\\WindowsApps', 'C:\\Users\\UserAccount\\AppData\\Roaming\\npm']
28535 INFO: Looking for eggs
28535 INFO: Using Python library C:\Users\UserAccount\AppData\Local\Programs\Python\Python311\python311.dll
28539 INFO: Found binding redirects:
[]
28553 INFO: Warnings written to D:\Downloads\FlareSolverr-3.0.2\src\build\flaresolverr\warn-flaresolverr.txt
28724 INFO: Graph cross-reference written to D:\Downloads\FlareSolverr-3.0.2\src\build\flaresolverr\xref-flaresolverr.html
28788 INFO: checking PYZ
28788 INFO: Building PYZ because PYZ-00.toc is non existent
28791 INFO: Building PYZ (ZlibArchive) D:\Downloads\FlareSolverr-3.0.2\src\build\flaresolverr\PYZ-00.pyz
30485 INFO: Building PYZ (ZlibArchive) D:\Downloads\FlareSolverr-3.0.2\src\build\flaresolverr\PYZ-00.pyz completed successfully.
30516 INFO: checking PKG
30516 INFO: Building PKG because PKG-00.toc is non existent
30518 INFO: Building PKG (CArchive) flaresolverr.pkg
30549 INFO: Building PKG (CArchive) flaresolverr.pkg completed successfully.
30551 INFO: Bootloader C:\Users\UserAccount\AppData\Local\Programs\Python\Python311\Lib\site-packages\PyInstaller\bootloader\Windows-64bit-intel\run.exe
30553 INFO: checking EXE
30553 INFO: Building EXE because EXE-00.toc is non existent
30554 INFO: Building EXE from EXE-00.toc
30554 INFO: Copying bootloader EXE to D:\Downloads\FlareSolverr-3.0.2\src\build\flaresolverr\flaresolverr.exe.notanexecutable
30562 INFO: Copying icon to EXE
30563 INFO: Copying icons from ['C:\\Users\\UserAccount\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\bootloader\\images\\icon-console.ico']
30565 INFO: Writing RT_GROUP_ICON 0 resource with 104 bytes
30565 INFO: Writing RT_ICON 1 resource with 3752 bytes
30565 INFO: Writing RT_ICON 2 resource with 2216 bytes
30566 INFO: Writing RT_ICON 3 resource with 1384 bytes
30566 INFO: Writing RT_ICON 4 resource with 37019 bytes
30567 INFO: Writing RT_ICON 5 resource with 9640 bytes
30569 INFO: Writing RT_ICON 6 resource with 4264 bytes
30570 INFO: Writing RT_ICON 7 resource with 1128 bytes
30573 INFO: Copying 0 resources to EXE
30576 INFO: Embedding manifest in EXE
30577 INFO: Updating manifest in D:\Downloads\FlareSolverr-3.0.2\src\build\flaresolverr\flaresolverr.exe.notanexecutable
30578 INFO: Updating resource type 24 name 1 language 0
30582 INFO: Appending PKG archive to EXE
30588 INFO: Fixing EXE headers
30727 INFO: Building EXE from EXE-00.toc completed successfully.
30731 INFO: checking COLLECT
30732 INFO: Building COLLECT because COLLECT-00.toc is non existent
30733 INFO: Building COLLECT COLLECT-00.toc
31021 INFO: Building COLLECT COLLECT-00.toc completed successfully.
PS D:\Downloads\FlareSolverr-3.0.2\src> ls


    Directory: D:\Downloads\FlareSolverr-3.0.2\src


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        08/01/2023     19:48                bottle_plugins
d-----        19/02/2023      1:46                build
d-----        19/02/2023      1:46                dist
d-----        19/02/2023      1:47                undetected_chromedriver
------        08/01/2023     19:48           1927 dtos.py
------        08/01/2023     19:48           2631 flaresolverr.py
-a----        19/02/2023      1:46            959 flaresolverr.spec
------        08/01/2023     19:48          11086 flaresolverr_service.py
------        08/01/2023     19:48          15301 tests.py
------        08/01/2023     19:48           4886 tests_sites.py
------        08/01/2023     19:48           6002 utils.py


PS D:\Downloads\FlareSolverr-3.0.2\src> cd dist
PS D:\Downloads\FlareSolverr-3.0.2\src\dist> ls


    Directory: D:\Downloads\FlareSolverr-3.0.2\src\dist


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        19/02/2023      1:47                flaresolverr


PS D:\Downloads\FlareSolverr-3.0.2\src\dist> cd flaresolverr
PS D:\Downloads\FlareSolverr-3.0.2\src\dist\flaresolverr> ls


    Directory: D:\Downloads\FlareSolverr-3.0.2\src\dist\flaresolverr


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        19/02/2023      1:47                certifi
d-----        19/02/2023      1:47                charset_normalizer
d-----        19/02/2023      1:47                selenium
d-----        19/02/2023      1:47                setuptools-67.2.0.dist-info
d-----        19/02/2023      1:47                websockets
d-----        19/02/2023      1:47                websockets-10.4.dist-info
-a----        13/02/2023     14:23          18744 api-ms-win-core-file-l1-2-0.dll
-a----        13/02/2023     14:23          18752 api-ms-win-core-file-l2-1-0.dll
-a----        13/02/2023     14:23          21312 api-ms-win-core-localization-l1-2-0.dll
-a----        13/02/2023     14:23          20792 api-ms-win-core-processthreads-l1-1-0.dll
-a----        13/02/2023     14:23          19264 api-ms-win-core-processthreads-l1-1-1.dll
-a----        13/02/2023     14:23          18752 api-ms-win-core-string-l1-1-0.dll
-a----        13/02/2023     14:23          20800 api-ms-win-core-synch-l1-1-0.dll
-a----        13/02/2023     14:23          19264 api-ms-win-core-synch-l1-2-0.dll
-a----        13/02/2023     14:23          18752 api-ms-win-core-timezone-l1-1-0.dll
-a----        13/02/2023     14:23          19776 api-ms-win-crt-conio-l1-1-0.dll
-a----        13/02/2023     14:23          22848 api-ms-win-crt-convert-l1-1-0.dll
-a----        13/02/2023     14:23          19256 api-ms-win-crt-environment-l1-1-0.dll
-a----        13/02/2023     14:23          20800 api-ms-win-crt-filesystem-l1-1-0.dll
-a----        13/02/2023     14:23          19776 api-ms-win-crt-heap-l1-1-0.dll
-a----        13/02/2023     14:23          19264 api-ms-win-crt-locale-l1-1-0.dll
-a----        13/02/2023     14:23          27968 api-ms-win-crt-math-l1-1-0.dll
-a----        13/02/2023     14:23          19776 api-ms-win-crt-process-l1-1-0.dll
-a----        13/02/2023     14:23          23360 api-ms-win-crt-runtime-l1-1-0.dll
-a----        13/02/2023     14:23          24896 api-ms-win-crt-stdio-l1-1-0.dll
-a----        13/02/2023     14:23          24888 api-ms-win-crt-string-l1-1-0.dll
-a----        13/02/2023     14:23          21312 api-ms-win-crt-time-l1-1-0.dll
-a----        13/02/2023     14:23          19264 api-ms-win-crt-utility-l1-1-0.dll
-a----        19/02/2023      1:46        1750428 base_library.zip
-a----        19/02/2023      1:47        5546108 flaresolverr.exe
-a----        13/02/2023     14:23        3441496 libcrypto-1_1.dll
-a----        13/02/2023     14:23          38232 libffi-8.dll
-a----        13/02/2023     14:23         703328 libssl-1_1.dll
-a----        13/02/2023     14:23         199448 pyexpat.pyd
-a----        13/02/2023     14:23        5764888 python311.dll
-a----        13/02/2023     14:23          30488 select.pyd
-a----        13/02/2023     14:23        1044888 ucrtbase.dll
-a----        13/02/2023     14:23        1141016 unicodedata.pyd
-a----        13/02/2023     14:23         109392 VCRUNTIME140.dll
-a----        13/02/2023     14:23          65296 _asyncio.pyd
-a----        13/02/2023     14:23          84760 _bz2.pyd
-a----        13/02/2023     14:23         123664 _ctypes.pyd
-a----        13/02/2023     14:23         253712 _decimal.pyd
-a----        13/02/2023     14:23          65296 _hashlib.pyd
-a----        13/02/2023     14:23         158992 _lzma.pyd
-a----        13/02/2023     14:23          34576 _multiprocessing.pyd
-a----        13/02/2023     14:23          50960 _overlapped.pyd
-a----        13/02/2023     14:23          32528 _queue.pyd
-a----        13/02/2023     14:23          79632 _socket.pyd
-a----        13/02/2023     14:23         161048 _ssl.pyd
-a----        13/02/2023     14:23          25368 _uuid.pyd

I closed PS then reopened a new PS window at this point as the next command in PS caused an error stating that the file was in use.

PS D:\Downloads\FlareSolverr-3.0.2> move-item -Path:D:\Downloads\Flaresolverr-3.0.2\src\dist -Destination D:\Downloads\Flaresolverr-3.0.2
PS D:\Downloads\FlareSolverr-3.0.2> ls


    Directory: D:\Downloads\FlareSolverr-3.0.2


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        08/01/2023     19:48                .github
d-----        19/02/2023      1:47                dist
d-----        08/01/2023     19:48                html_samples
d-----        08/01/2023     19:48                resources
d-----        19/02/2023      1:46                src
------        08/01/2023     19:48             47 .dockerignore
------        08/01/2023     19:48           1602 .gitignore
------        08/01/2023     19:48           8800 CHANGELOG.md
------        08/01/2023     19:48            416 docker-compose.yml
------        08/01/2023     19:48           2741 Dockerfile
------        08/01/2023     19:48           1099 LICENSE
------        08/01/2023     19:48            193 package.json
------        08/01/2023     19:48          15829 README.md
------        08/01/2023     19:48            185 requirements.txt
------        08/01/2023     19:48             15 test-requirements.txt


PS D:\Downloads\FlareSolverr-3.0.2> cd dist
PS D:\Downloads\FlareSolverr-3.0.2\dist> ls


    Directory: D:\Downloads\FlareSolverr-3.0.2\dist


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        19/02/2023      1:47                flaresolverr


PS D:\Downloads\FlareSolverr-3.0.2\dist> cd flaresolverr
PS D:\Downloads\FlareSolverr-3.0.2\dist\flaresolverr> ls


    Directory: D:\Downloads\FlareSolverr-3.0.2\dist\flaresolverr


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        19/02/2023      1:47                certifi
d-----        19/02/2023      1:47                charset_normalizer
d-----        19/02/2023      1:47                selenium
d-----        19/02/2023      1:47                setuptools-67.2.0.dist-info
d-----        19/02/2023      1:47                websockets
d-----        19/02/2023      1:47                websockets-10.4.dist-info
-a----        13/02/2023     14:23          18744 api-ms-win-core-file-l1-2-0.dll
-a----        13/02/2023     14:23          18752 api-ms-win-core-file-l2-1-0.dll
-a----        13/02/2023     14:23          21312 api-ms-win-core-localization-l1-2-0.dll
-a----        13/02/2023     14:23          20792 api-ms-win-core-processthreads-l1-1-0.dll
-a----        13/02/2023     14:23          19264 api-ms-win-core-processthreads-l1-1-1.dll
-a----        13/02/2023     14:23          18752 api-ms-win-core-string-l1-1-0.dll
-a----        13/02/2023     14:23          20800 api-ms-win-core-synch-l1-1-0.dll
-a----        13/02/2023     14:23          19264 api-ms-win-core-synch-l1-2-0.dll
-a----        13/02/2023     14:23          18752 api-ms-win-core-timezone-l1-1-0.dll
-a----        13/02/2023     14:23          19776 api-ms-win-crt-conio-l1-1-0.dll
-a----        13/02/2023     14:23          22848 api-ms-win-crt-convert-l1-1-0.dll
-a----        13/02/2023     14:23          19256 api-ms-win-crt-environment-l1-1-0.dll
-a----        13/02/2023     14:23          20800 api-ms-win-crt-filesystem-l1-1-0.dll
-a----        13/02/2023     14:23          19776 api-ms-win-crt-heap-l1-1-0.dll
-a----        13/02/2023     14:23          19264 api-ms-win-crt-locale-l1-1-0.dll
-a----        13/02/2023     14:23          27968 api-ms-win-crt-math-l1-1-0.dll
-a----        13/02/2023     14:23          19776 api-ms-win-crt-process-l1-1-0.dll
-a----        13/02/2023     14:23          23360 api-ms-win-crt-runtime-l1-1-0.dll
-a----        13/02/2023     14:23          24896 api-ms-win-crt-stdio-l1-1-0.dll
-a----        13/02/2023     14:23          24888 api-ms-win-crt-string-l1-1-0.dll
-a----        13/02/2023     14:23          21312 api-ms-win-crt-time-l1-1-0.dll
-a----        13/02/2023     14:23          19264 api-ms-win-crt-utility-l1-1-0.dll
-a----        19/02/2023      1:46        1750428 base_library.zip
-a----        19/02/2023      1:47        5546108 flaresolverr.exe
-a----        13/02/2023     14:23        3441496 libcrypto-1_1.dll
-a----        13/02/2023     14:23          38232 libffi-8.dll
-a----        13/02/2023     14:23         703328 libssl-1_1.dll
-a----        13/02/2023     14:23         199448 pyexpat.pyd
-a----        13/02/2023     14:23        5764888 python311.dll
-a----        13/02/2023     14:23          30488 select.pyd
-a----        13/02/2023     14:23        1044888 ucrtbase.dll
-a----        13/02/2023     14:23        1141016 unicodedata.pyd
-a----        13/02/2023     14:23         109392 VCRUNTIME140.dll
-a----        13/02/2023     14:23          65296 _asyncio.pyd
-a----        13/02/2023     14:23          84760 _bz2.pyd
-a----        13/02/2023     14:23         123664 _ctypes.pyd
-a----        13/02/2023     14:23         253712 _decimal.pyd
-a----        13/02/2023     14:23          65296 _hashlib.pyd
-a----        13/02/2023     14:23         158992 _lzma.pyd
-a----        13/02/2023     14:23          34576 _multiprocessing.pyd
-a----        13/02/2023     14:23          50960 _overlapped.pyd
-a----        13/02/2023     14:23          32528 _queue.pyd
-a----        13/02/2023     14:23          79632 _socket.pyd
-a----        13/02/2023     14:23         161048 _ssl.pyd
-a----        13/02/2023     14:23          25368 _uuid.pyd

I closed PS then reopened a new PS window at this point as the next command in PS caused an error stating that the file was in use.

PS D:\Downloads\FlareSolverr-3.0.2\dist\flaresolverr> Move-Item -Path D:\Downloads\Flaresolverr-3.0.2\dist\flaresolverr\* -Destination D:\Downloads\FlareSolverr-3.0.2\dist
PS D:\Downloads\FlareSolverr-3.0.2\dist\flaresolverr> cd ..
PS D:\Downloads\FlareSolverr-3.0.2\dist> ls


    Directory: D:\Downloads\FlareSolverr-3.0.2\dist


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        19/02/2023      1:47                certifi
d-----        19/02/2023      1:47                charset_normalizer
d-----        19/02/2023      2:08                flaresolverr
d-----        19/02/2023      1:47                selenium
d-----        19/02/2023      1:47                setuptools-67.2.0.dist-info
d-----        19/02/2023      1:47                websockets
d-----        19/02/2023      1:47                websockets-10.4.dist-info
-a----        13/02/2023     14:23          18744 api-ms-win-core-file-l1-2-0.dll
-a----        13/02/2023     14:23          18752 api-ms-win-core-file-l2-1-0.dll
-a----        13/02/2023     14:23          21312 api-ms-win-core-localization-l1-2-0.dll
-a----        13/02/2023     14:23          20792 api-ms-win-core-processthreads-l1-1-0.dll
-a----        13/02/2023     14:23          19264 api-ms-win-core-processthreads-l1-1-1.dll
-a----        13/02/2023     14:23          18752 api-ms-win-core-string-l1-1-0.dll
-a----        13/02/2023     14:23          20800 api-ms-win-core-synch-l1-1-0.dll
-a----        13/02/2023     14:23          19264 api-ms-win-core-synch-l1-2-0.dll
-a----        13/02/2023     14:23          18752 api-ms-win-core-timezone-l1-1-0.dll
-a----        13/02/2023     14:23          19776 api-ms-win-crt-conio-l1-1-0.dll
-a----        13/02/2023     14:23          22848 api-ms-win-crt-convert-l1-1-0.dll
-a----        13/02/2023     14:23          19256 api-ms-win-crt-environment-l1-1-0.dll
-a----        13/02/2023     14:23          20800 api-ms-win-crt-filesystem-l1-1-0.dll
-a----        13/02/2023     14:23          19776 api-ms-win-crt-heap-l1-1-0.dll
-a----        13/02/2023     14:23          19264 api-ms-win-crt-locale-l1-1-0.dll
-a----        13/02/2023     14:23          27968 api-ms-win-crt-math-l1-1-0.dll
-a----        13/02/2023     14:23          19776 api-ms-win-crt-process-l1-1-0.dll
-a----        13/02/2023     14:23          23360 api-ms-win-crt-runtime-l1-1-0.dll
-a----        13/02/2023     14:23          24896 api-ms-win-crt-stdio-l1-1-0.dll
-a----        13/02/2023     14:23          24888 api-ms-win-crt-string-l1-1-0.dll
-a----        13/02/2023     14:23          21312 api-ms-win-crt-time-l1-1-0.dll
-a----        13/02/2023     14:23          19264 api-ms-win-crt-utility-l1-1-0.dll
-a----        19/02/2023      1:46        1750428 base_library.zip
-a----        19/02/2023      1:47        5546108 flaresolverr.exe
-a----        13/02/2023     14:23        3441496 libcrypto-1_1.dll
-a----        13/02/2023     14:23          38232 libffi-8.dll
-a----        13/02/2023     14:23         703328 libssl-1_1.dll
-a----        13/02/2023     14:23         199448 pyexpat.pyd
-a----        13/02/2023     14:23        5764888 python311.dll
-a----        13/02/2023     14:23          30488 select.pyd
-a----        13/02/2023     14:23        1044888 ucrtbase.dll
-a----        13/02/2023     14:23        1141016 unicodedata.pyd
-a----        13/02/2023     14:23         109392 VCRUNTIME140.dll
-a----        13/02/2023     14:23          65296 _asyncio.pyd
-a----        13/02/2023     14:23          84760 _bz2.pyd
-a----        13/02/2023     14:23         123664 _ctypes.pyd
-a----        13/02/2023     14:23         253712 _decimal.pyd
-a----        13/02/2023     14:23          65296 _hashlib.pyd
-a----        13/02/2023     14:23         158992 _lzma.pyd
-a----        13/02/2023     14:23          34576 _multiprocessing.pyd
-a----        13/02/2023     14:23          50960 _overlapped.pyd
-a----        13/02/2023     14:23          32528 _queue.pyd
-a----        13/02/2023     14:23          79632 _socket.pyd
-a----        13/02/2023     14:23         161048 _ssl.pyd
-a----        13/02/2023     14:23          25368 _uuid.pyd

PS D:\Downloads\FlareSolverr-3.0.2\dist> cd ..
PS D:\Downloads\FlareSolverr-3.0.2> ls


    Directory: D:\Downloads\FlareSolverr-3.0.2


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        08/01/2023     19:48                .github
d-----        19/02/2023      2:08                dist
d-----        08/01/2023     19:48                html_samples
d-----        08/01/2023     19:48                resources
d-----        19/02/2023      1:53                src
------        08/01/2023     19:48             47 .dockerignore
------        08/01/2023     19:48           1602 .gitignore
------        08/01/2023     19:48           8800 CHANGELOG.md
------        08/01/2023     19:48            416 docker-compose.yml
------        08/01/2023     19:48           2741 Dockerfile
------        08/01/2023     19:48           1099 LICENSE
------        08/01/2023     19:48            193 package.json
------        08/01/2023     19:48          15829 README.md
------        08/01/2023     19:48            185 requirements.txt
------        08/01/2023     19:48             15 test-requirements.txt


PS D:\Downloads\FlareSolverr-3.0.2> cd dist



PS D:\Downloads\FlareSolverr-3.0.2\dist> .\flaresolverr.exe
2023-02-19 02:23:03 INFO     FlareSolverr 3.0.2
2023-02-19 02:23:03 INFO     Testing web browser installation...
2023-02-19 02:23:03 INFO     Chrome / Chromium path: C:\Program Files\Google\Chrome\Application\chrome.exe
2023-02-19 02:23:03 INFO     Chrome / Chromium major version: 110
2023-02-19 02:23:06 INFO     FlareSolverr User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
2023-02-19 02:23:06 INFO     Test successful
2023-02-19 02:23:06 INFO     Serving on http://0.0.0.0:8191

Tree:

PS D:\FlareSolverr-3.0.2> tree
Folder PATH listing for volume BackUpHD
Volume serial number is CA5B-B0AB
D:.
├───.github
│   ├───ISSUE_TEMPLATE
│   └───workflows
├───dist
│   ├───certifi
│   ├───charset_normalizer
│   ├───selenium
│   │   └───webdriver
│   │       ├───common
│   │       │   ├───devtools
│   │       │   │   ├───v108
│   │       │   │   ├───v109
│   │       │   │   ├───v110
│   │       │   │   └───v85
│   │       │   ├───linux
│   │       │   ├───macos
│   │       │   └───windows
│   │       ├───firefox
│   │       └───remote
│   ├───websockets
│   └───websockets-10.4.dist-info
├───html_samples
├───resources
└───src
    ├───bottle_plugins
    │   └───__pycache__
    ├───build
    │   └───flaresolverr
    │       └───localpycs
    └───undetected_chromedriver
        └───__pycache__

Versions:

C:\Windows\system32>pip list
Package                   Version
------------------------- ---------
altgraph                  0.17.3
async-generator           1.10
attrs                     22.2.0
bottle                    0.12.23
certifi                   2022.12.7
cffi                      1.15.1
charset-normalizer        3.0.1
func-timeout              4.3.5
h11                       0.14.0
idna                      3.4
outcome                   1.2.0
pefile                    2023.2.7
pip                       23.0
pycparser                 2.21
pyinstaller               5.8.0
pyinstaller-hooks-contrib 2022.15
PySocks                   1.7.1
pywin32-ctypes            0.2.0
requests                 2.28.2
selenium                  4.8.0
setuptools                67.2.0
sniffio                   1.3.0
sortedcontainers          2.4.0
trio                      0.22.0
trio-websocket            0.9.2
urllib3                   1.26.14
waitress                  2.1.2
websockets                10.4
wsproto                   1.2.0
xvfbwrapper               0.2.9

C:\Windows\system32>python --version
Python 3.11.2

C:\Windows\system32>wmic datafile where name="C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" get Version /value


Version=110.0.5481.104

@DrStrange
Copy link

DrStrange commented Feb 20, 2023

@ilike2burnthing
The installation instructions for FlareSolverr at https://github.com/FlareSolverr/FlareSolverr state "see below for instructions of how to build FlareSolverr from source code." only run FlareSolverr from source, not "how to build FlareSolverr from source code". As there might be many Windows users that would be knowledgable enough to build a binary and PyInstaller does successfully build the binary, can I suggest that you add to the installation instructions "Install PyInstaller with pip install PyInstaller", amend "Run python src\flaresolverr.py command to start FlareSolverr" to "Run PyInstaller src\flaresolverr.py to build FlareSolverr" or if you want to keep the instructions just to running FlareSolverr from source, delete "or below for instructions of how to build FlareSolverr from source code."

@ilike2burnthing
Copy link
Contributor

Feel free to submit a PR for the README.

@brenty411

This comment was marked as off-topic.

@nivranaitsirhc
Copy link

If any windows user is having an issue with the missing package.json in the latest version 3.0.4. Just copy the package.json to the directory of dist or modify the utils.py and remove os.pardir, at line 30 and place the package.json at \dist\flaresolverr

@jmackxiii
Copy link

Still no plans to include the binaries with further releases?

@ilike2burnthing
Copy link
Contributor

PRs are always welcome.

@Rumpa112

This comment was marked as abuse.

@Rumpa112
Copy link

Assuming FlareSolverr is actually running it was extremely easy to set it up.

Here is how

  1. Create an account on https://hub.docker.com/signup (its free as far I can tell for personal use)
  2. Download https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe
  3. After you restart you might be prompted to update the Linux Subsystem https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
  4. In Docker Desktop at the top search for “FlareSolverr” then select the latest and run.

@DrStrange
Copy link

DrStrange commented Mar 14, 2023

@Rumpa112, I am running Flaresolverr v3 in Windows using Python/Chrome/PyInstaller but since I don't use Python for anything else, I decided to try Docker. I have turned on virtualization, installed WSL and the kernel update, installed Docker Desktop, created a Docker account and am running the flaresolverr container and the logs show it running. However, when I open Microsoft Edge and type https://localhost:8191 into the address bar, I get "can't reach this page" and "localhost failed to connect". How do I fix this?
Also, I have Docker Desktop set to start at log on but is there a way to get the flaresolverr container also to start at log on?
I assume I don't need the Containers and Hyper-V Windows features enabled since Windows didn't ask for them to be installed.

Thank you.

@ilike2burnthing
Copy link
Contributor

If it's on Docker then it's no longer on the localhost. Try your device's local IP with the FlareSolverr port. If you're running another Docker container (e.g. Jackett or Prowlarr) then you can use the container IP and port.

@Rumpa112
Copy link

That's correct. It uses some new thingy that's better than doing Hyper-V from what I understand. As to all the rest. You are on the same stand as myself. Everything seems to be running according to Docker. The “problem” is that Flaresolverr is hardly ever needed for me. Therefore only fired it up ones I got errors in my other apps. YD I got annoyed when the older v2 just started to exit everytime I tried to run it. So I decided to try v3 now rather then “having to deal with it later”

Anyhow, what are you supposed to see when you try to access http://localhost:8191? It’s the API URL so you shouldn't really get anywhere trying to browse it? However, me2 would like a way to test if Flaresolverr is actually working/running. I will do some digging and get back to you,

@ilike2burnthing
Copy link
Contributor

{"msg": "FlareSolverr is ready!", "version": "3.0.4", "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"}

@Rumpa112
Copy link

{"msg": "FlareSolverr is ready!", "version": "3.0.4", "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"}

dont know what you mean by that...

this is what I get everytime I start the contrainer

2023-03-14 20:53:11 INFO FlareSolverr 3.0.4
2023-03-14 20:53:11 INFO Testing web browser installation...
2023-03-14 20:53:11 INFO Chrome / Chromium path: /usr/bin/chromium
2023-03-14 20:53:11 INFO Chrome / Chromium major version: 110
2023-03-14 20:53:11 INFO FlareSolverr User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
2023-03-14 20:53:11 INFO Test successful
2023-03-14 20:53:11 INFO Serving on http://0.0.0.0:8191

is there a command I can use to see if it actually working? could not access it using my device ip, still testing shit

@ilike2burnthing
Copy link
Contributor

You asked a question, I answered it.

@Rumpa112
Copy link

You asked a question, I answered it.

I did not. But I did later "is there a command I can use to see if it actually working?"

@ilike2burnthing
Copy link
Contributor

You did:

Anyhow, what are you supposed to see when you try to access http://localhost:8191/?

#660 (comment)

@DrStrange
Copy link

DrStrange commented Mar 14, 2023

I have Prowlarr and Sonarr installed in Windows. My device IP is 192.168.1.2. When I put 192.168.1.2:8191 into Prowlarr, I get an error '"Failed to test proxy: 192.168.1.2". If I start the Flaresolverr Windows binary I have installed then 192.168.1.2:8191 works fine. Where do i find a container's IP address? If I Inspect the container it only shows the port. I can install a Prowlarr docker container but without knowing its IP address how do I access its UI? Is there another way to access a container without using the IP address?

@ilike2burnthing
Copy link
Contributor

Assuming 192.168.1.2 is the local IP address of your host device, if you access http://192.168.1.2:8191 in browser, what is returned?

The container IP will only be usable if Prowlarr is also running on Docker.

Assuming the container's name is FlareSolverr:

docker inspect -f '{{ range.NetworkSettings.Networks }}{{ .IPAddress }}{{ end }}' FlareSolverr

@Rumpa112
Copy link

So that means Jackett can't access FlareSolverr if I don't run Jackett in docker as well ?

@ilike2burnthing
Copy link
Contributor

It can access it using the host's local IP, not the the container's IP. However, we've seen issues with invalid cookies when mixing local Jackett/Prowlarr and Docker FlareSolverr.

@Rumpa112
Copy link

Hmmm… can't reach this page192.168.1.10 refused to connect.
Tried all I can think of

@DrStrange
Copy link

DrStrange commented Mar 14, 2023

I did some reading about docker since my last post (first time using it) . From:
https://stackoverflow.com/questions/41709354/docker-ip-for-windows
"You're already exposing the port internally, so the only other thing I can suggest is to check you are opening the port when launching your image too:

docker run -it -p 5000:5000

This will open port 5000 inside the instance to port 5000 on your local machine, and should then be accessible on 127.0.0.1:5000 or localhost:5000"

Use docker ps or just look at Docker desktop to get image name and port (Inspect) from Docker Desktop

C:\Windows\system32>docker ps
CONTAINER ID     IMAGE                                     COMMAND                     CREATED                  STATUS              PORTS      NAMES

3519ae9e566a   flaresolverr/flaresolverr:latest   "/usr/bin/dumb-init …"        About an hour ago              Up 36 minutes       8191/tcp   condescending_darwin

So the port is 8191 and the imagename is flaresolverr/flaresolverr:latest . Then map the container port to a port on the local device (kept same for convenience)

C:\Windows\system32>docker run -it -p 8191:8191 flaresolverr/flaresolverr:latest
2023-03-14 23:16:53 INFO     FlareSolverr 3.0.4
2023-03-14 23:16:53 INFO     Testing web browser installation...
2023-03-14 23:16:53 INFO     Chrome / Chromium path: /usr/bin/chromium
find: ‘/app/.config/chromium/Crash Reports/pending/’: No such file or directory
2023-03-14 23:16:53 INFO     Chrome / Chromium major version: 110
2023-03-14 23:16:54 INFO     FlareSolverr User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
2023-03-14 23:16:54 INFO     Test successful
2023-03-14 23:16:54 INFO     Serving on http://0.0.0.0:8191
2023-03-14 23:17:19 INFO     172.17.0.1 GET http://192.168.1.2:8191/ 200 OK

I also installed a Prowlarr docker image and opened it's port. That's working also.

@Rumpa112
Copy link

Rumpa112 commented Mar 14, 2023

{"msg": "FlareSolverr is ready!", "version": "3.0.4", "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"}

after running "docker run -it -p 8191:8191 flaresolverr/flaresolverr:latest"

good job/find!

so the problems seems to be that flaresolverr devs have failed to include the correct startup paraneters? Or rather make it clear for newcomers step-by-step as no ports are actually opend etc

@DrStrange
Copy link

DrStrange commented Mar 14, 2023

so the problems seems to be that the flaresolverr devs have failed to include the correct startup paraneters? as no ports are actually opend etc

I have no idea. I am completely new to this. I only built the v3 binary last week using Python. I have used Python before though just to get applications running and only used it a little. I will test this Docker Desktop further and see how to intregrate docker run -it -p. Maybe put it into a .bat file file and run it at startup either in Startup folder or as a scheduled task. Also need to see if you can get the container running automatically when computer starts up. If it's not possible, I will just keep Windows Python/Chrome/PyInstaller and build updates as they are released.

@Rumpa112
Copy link

Rumpa112 commented Mar 14, 2023

Well all you need todo it seems is to goto images then click "run" on the right, then "optional parameters" and enter port 8191 as host port then run and your all set. Then next time you just start the container

@ilike2burnthing
Copy link
Contributor

so the problems seems to be that the flaresolverr devs have failed to include the correct startup paraneters? as no ports are actually opend etc

Nope, the Docker instructions have included this since FlareSolverr was created - https://github.com/FlareSolverr/FlareSolverr#docker

It would be great if you stopped ignorantly lashing out at the people who give up their time to create and maintain something you use for free.

@DrStrange
Copy link

@Rumpa112 ,
Yeah working fine here, thx. Exposing/Mapping container port to local PC port and starting container automatically when PC starts up survive a PC restart so no need for any .bat file nor scheduled task. I will be uninstaling Python & Chrome.

@Rumpa112
Copy link

Rumpa112 commented Mar 15, 2023

so the problems seems to be that the flaresolverr devs have failed to include the correct startup paraneters? as no ports are actually opend etc

Nope, the Docker instructions have included this since FlareSolverr was created - https://github.com/FlareSolverr/FlareSolverr#docker

It would be great if you stopped ignorantly lashing out at the people who give up their time to create and maintain something you use for free.

It would be even better if you take a little bit of time to explain how to use the app u so kindly offer for free... Also it's not "the people" only u I have a problem with.

"If you prefer the docker cli execute the following command.

docker run -d
--name=flaresolverr
-p 8191:8191
-e LOG_LEVEL=info
--restart unless-stopped
ghcr.io/flaresolverr/flaresolverr:latest"

This you are referring to means absolutely NOTHING if you aren't already familiar with docker or Linux...

@ilike2burnthing
Copy link
Contributor

It's expected that users would have read the README, it exists to avoid the situation like this.

Your first comment here was you ignorantly lashing out, and it wasn't directed at me.

I think we can move on now.

@Rumpa112
Copy link

Rumpa112 commented Mar 15, 2023

It's expected that users would have read the README, it exists to avoid the situation like this.

Your first comment here was you ignorantly lashing out, and it wasn't directed at me.

I think we can move on now.

How would you know who I was "lashing out at" perhaps I've already read a couple of comments by you ..

How would the README help with any of this? 😂 It's the lack of guidance that landed us here in the first place.

For you and other that already know Docker or Linux it's straightforward. But not for the rest of us as YOU CAN SEE reading the comments in this thread, GN.

@Rumpa112
Copy link

so the problems seems to be that the flaresolverr devs have failed to include the correct startup paraneters? as no ports are actually opend etc

I have no idea. I am completely new to this. I only built the v3 binary last week using Python. I have used Python before though just to get applications running and only used it a little. I will test this Docker Desktop further and see how to intregrate docker run -it -p. Maybe put it into a .bat file file and run it at startup either in Startup folder or as a scheduled task. Also need to see if you can get the container running automatically when computer starts up. If it's not possible, I will just keep Windows Python/Chrome/PyInstaller and build updates as they are released.

I believe you will find here what you are looking for =) https://stackoverflow.com/questions/30449313/how-do-i-make-a-docker-container-start-automatically-on-system-boot thnx again, have a good one.

@DrStrange
Copy link

DrStrange commented Mar 15, 2023

Thx. Unfortunately I decided to uninstall Docker Desktop for Windows + WSL. Sonarr wouldn't save a root folder anywhere in the Docker Container. Good luck.

@Rumpa112
Copy link

Rumpa112 commented Mar 15, 2023 via email

@ngosang
Copy link
Member Author

ngosang commented Mar 20, 2023

8d9bac9

@ngosang ngosang closed this as completed Mar 20, 2023
@ngosang
Copy link
Member Author

ngosang commented Mar 20, 2023

https://github.com/FlareSolverr/FlareSolverr/releases/tag/v3.1.0

@ngosang
Copy link
Member Author

ngosang commented Mar 20, 2023

@txtsd @HLFH maybe you are interested in build the flaresolverr-bin package for Archlinux. It won't require Python, Chrome, Pip packages...

@txtsd
Copy link
Contributor

txtsd commented Mar 21, 2023

https://aur.archlinux.org/packages/flaresolverr-bin
Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests