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

Browser can't spawn on Synology #3

Closed
theo-basty opened this issue Sep 27, 2024 · 14 comments
Closed

Browser can't spawn on Synology #3

theo-basty opened this issue Sep 27, 2024 · 14 comments
Labels
bug Something isn't working

Comments

@theo-basty
Copy link

Hey ! Thank you for your project !

I'm trying to use it with the arr suit with the latest container image but I have an issue.
When I try to get a challenge check, I end up with the following error :

flaresolverr-byparr-1  | INFO:     Request: cmd='request.get' url='https://www.ygg.re/engine/search?category=2145&do=search&order=desc&sort=publish_date' maxTimeout=60000
flaresolverr-byparr-1  | INFO:     192.168.20.9:59132 - "POST /v1 HTTP/1.1" 500 Internal Server Error
flaresolverr-byparr-1  | ERROR:    Exception in ASGI application
flaresolverr-byparr-1  | Traceback (most recent call last):
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
flaresolverr-byparr-1  |     result = await app(  # type: ignore[func-returns-value]
flaresolverr-byparr-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
flaresolverr-byparr-1  |     return await self.app(scope, receive, send)
flaresolverr-byparr-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
flaresolverr-byparr-1  |     await super().__call__(scope, receive, send)
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/starlette/applications.py", line 123, in __call__
flaresolverr-byparr-1  |     await self.middleware_stack(scope, receive, send)
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
flaresolverr-byparr-1  |     raise exc
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
flaresolverr-byparr-1  |     await self.app(scope, receive, _send)
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
flaresolverr-byparr-1  |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
flaresolverr-byparr-1  |     raise exc
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
flaresolverr-byparr-1  |     await app(scope, receive, sender)
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/starlette/routing.py", line 756, in __call__
flaresolverr-byparr-1  |     await self.middleware_stack(scope, receive, send)
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/starlette/routing.py", line 776, in app
flaresolverr-byparr-1  |     await route.handle(scope, receive, send)
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/starlette/routing.py", line 297, in handle
flaresolverr-byparr-1  |     await self.app(scope, receive, send)
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/starlette/routing.py", line 77, in app
flaresolverr-byparr-1  |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
flaresolverr-byparr-1  |     raise exc
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
flaresolverr-byparr-1  |     await app(scope, receive, sender)
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/starlette/routing.py", line 72, in app
flaresolverr-byparr-1  |     response = await func(request)
flaresolverr-byparr-1  |                ^^^^^^^^^^^^^^^^^^^
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 278, in app
flaresolverr-byparr-1  |     raw_response = await run_endpoint_function(
flaresolverr-byparr-1  |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
flaresolverr-byparr-1  |     return await dependant.call(**values)
flaresolverr-byparr-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
flaresolverr-byparr-1  |   File "/app/main.py", line 33, in read_item
flaresolverr-byparr-1  |     browser = await new_browser()
flaresolverr-byparr-1  |               ^^^^^^^^^^^^^^^^^^^
flaresolverr-byparr-1  |   File "/app/src/utils/browser.py", line 30, in new_browser
flaresolverr-byparr-1  |     return await webdriver.start(config=config)
flaresolverr-byparr-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/nodriver/core/util.py", line 88, in start
flaresolverr-byparr-1  |     return await Browser.create(config)
flaresolverr-byparr-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/nodriver/core/browser.py", line 91, in create
flaresolverr-byparr-1  |     await instance.start()
flaresolverr-byparr-1  |   File "/app/.venv/lib/python3.12/site-packages/nodriver/core/browser.py", line 351, in start
flaresolverr-byparr-1  |     raise Exception(
flaresolverr-byparr-1  | Exception:
flaresolverr-byparr-1  |                 ---------------------
flaresolverr-byparr-1  |                 Failed to connect to browser
flaresolverr-byparr-1  |                 ---------------------
flaresolverr-byparr-1  |                 One of the causes could be when you are running as root.
flaresolverr-byparr-1  |                 In that case you need to pass no_sandbox=True

Hope that it can help with finding any issue !

@theo-basty theo-basty changed the title Failed to conenct to browser Error on any request Failed to connect to browser Error on any request Sep 27, 2024
@skyless
Copy link

skyless commented Sep 27, 2024

Same here on Synology. Exactly what I have too with building https://github.com/21hsmw/FlareSolverr.git#nodriver-support too.

@ThePhaseless
Copy link
Owner

ThePhaseless commented Oct 1, 2024

Hi, thanks for the issue and info, but unfortunately I use a pc as my server, so I can't replicate. @theo-basty What device are you using? Anyway I think this is the issue with the nodriver itself rather than this project. If you have some time and want to help, you could try the steps I just added to README to troubleshoot

@theo-basty
Copy link
Author

I'm running it in a headless Ubuntu vm without graphics server. I've quickly checked the troubleshooting steps. I will try them in some time to see if I can give you more info on that.

@skyless
Copy link

skyless commented Oct 2, 2024

Issue with nodriver for sure: https://github.com/ultrafunkamsterdam/nodriver/blob/1bb6003c7f0db4d3ec05fdf3fc8c8e0804260103/nodriver/core/browser.py#L352

I wanted to open an issue there but "An owner of this repository has limited the ability to open an issue to users that are collaborators on this repository."

As I still don't know what's wrong exactly, I was hoping to find some help here too. :)

@skyless
Copy link

skyless commented Oct 2, 2024

Just found out about it on reddit: https://www.reddit.com/r/webscraping/comments/1e14iqx/nodriver_with_docker/

It was already an issue from former project nodriver is inspired from: ultrafunkamsterdam/undetected-chromedriver#1358

@ThePhaseless
Copy link
Owner

I'll look into that, thx

@skyless
Copy link

skyless commented Oct 11, 2024

@ThePhaseless Don't hesitate to ask for some tests if needed once you have a branch with a potential fix. :)

@ThePhaseless
Copy link
Owner

Hey, Hi! I've remade the base for container, could you check now please? @skyless @theo-basty

@skyless
Copy link

skyless commented Oct 21, 2024

@ThePhaseless

###############################################################
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                           @#
#@  **  WARNING  **  WARNING  **  WARNING  **  WARNING  **   @#
#@                                                           @#
#@        YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!!        @#
#@                                                           @#
#@  This means anyone with network access to this computer   @#
#@  may be able to view and control your desktop.            @#
#@                                                           @#
#@ >>> If you did not mean to do this Press CTRL-C now!! <<< @#
#@                                                           @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                           @#
#@  You can create an x11vnc password file by running:       @#
#@                                                           @#
#@       x11vnc -storepasswd password /path/to/passfile      @#
#@  or   x11vnc -storepasswd /path/to/passfile               @#
#@  or   x11vnc -storepasswd                                 @#
#@                                                           @#
#@  (the last one will use ~/.vnc/passwd)                    @#
#@                                                           @#
#@  and then starting x11vnc via:                            @#
#@                                                           @#
#@      x11vnc -rfbauth /path/to/passfile                    @#
#@                                                           @#
#@  an existing ~/.vnc/passwd file from another VNC          @#
#@  application will work fine too.                          @#
#@                                                           @#
#@  You can also use the -passwdfile or -passwd options.     @#
#@  (note -passwd is unsafe if local users are not trusted)  @#
#@                                                           @#
#@  Make sure any -rfbauth and -passwdfile password files    @#
#@  cannot be read by untrusted users.                       @#
#@                                                           @#
#@  Use x11vnc -usepw to automatically use your              @#
#@  ~/.vnc/passwd or ~/.vnc/passwdfile password files.       @#
#@  (and prompt you to create ~/.vnc/passwd if neither       @#
#@  file exists.)  Under -usepw, x11vnc will exit if it      @#
#@  cannot find a password to use.                           @#
#@                                                           @#
#@                                                           @#
#@  Even with a password, the subsequent VNC traffic is      @#
#@  sent in the clear.  Consider tunnelling via ssh(1):      @#
#@                                                           @#
#@    http://www.karlrunge.com/x11vnc/#tunnelling            @#
#@                                                           @#
#@  Or using the x11vnc SSL options: -ssl and -stunnel       @#
#@                                                           @#
#@  Please Read the documention for more info about          @#
#@  passwords, security, and encryption.                     @#
#@                                                           @#
#@    http://www.karlrunge.com/x11vnc/faq.html#faq-passwd    @#
#@                                                           @#
#@  To disable this warning use the -nopw option, or put     @#
#@  'nopw' on a line in your ~/.x11vncrc file.               @#
#@                                                           @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
###############################################################
21/10/2024 14:10:30 x11vnc version: 0.9.16 lastmod: 2019-01-05  pid: 11
21/10/2024 14:10:32 Using X display :0
21/10/2024 14:10:32 rootwin: 0x337 reswin: 0x400001 dpy: 0xcd350030
21/10/2024 14:10:32 
21/10/2024 14:10:32 ------------------ USEFUL INFORMATION ------------------
21/10/2024 14:10:32 X DAMAGE available on display, using it for polling hints.
21/10/2024 14:10:32   To disable this behavior use: '-noxdamage'
21/10/2024 14:10:32 
21/10/2024 14:10:32   Most compositing window managers like 'compiz' or 'beryl'
21/10/2024 14:10:32   cause X DAMAGE to fail, and so you may not see any screen
21/10/2024 14:10:32   updates via VNC.  Either disable 'compiz' (recommended) or
21/10/2024 14:10:32   supply the x11vnc '-noxdamage' command line option.
21/10/2024 14:10:32 
21/10/2024 14:10:32 Wireframing: -wireframe mode is in effect for window moves.
21/10/2024 14:10:32   If this yields undesired behavior (poor response, painting
21/10/2024 14:10:32   errors, etc) it may be disabled:
21/10/2024 14:10:32    - use '-nowf' to disable wireframing completely.
21/10/2024 14:10:32    - use '-nowcr' to disable the Copy Rectangle after the
21/10/2024 14:10:32      moved window is released in the new position.
21/10/2024 14:10:32   Also see the -help entry for tuning parameters.
21/10/2024 14:10:32   You can press 3 Alt_L's (Left "Alt" key) in a row to 
21/10/2024 14:10:32   repaint the screen, also see the -fixscreen option for
21/10/2024 14:10:32   periodic repaints.
21/10/2024 14:10:32 
21/10/2024 14:10:32 XFIXES available on display, resetting cursor mode
21/10/2024 14:10:32   to: '-cursor most'.
21/10/2024 14:10:32   to disable this behavior use: '-cursor arrow'
21/10/2024 14:10:32   or '-noxfixes'.
21/10/2024 14:10:32 using XFIXES for cursor drawing.
21/10/2024 14:10:32 GrabServer control via XTEST.
21/10/2024 14:10:32 
21/10/2024 14:10:32 Scroll Detection: -scrollcopyrect mode is in effect to
21/10/2024 14:10:32   use RECORD extension to try to detect scrolling windows
21/10/2024 14:10:32   (induced by either user keystroke or mouse input).
21/10/2024 14:10:32   If this yields undesired behavior (poor response, painting
21/10/2024 14:10:32   errors, etc) it may be disabled via: '-noscr'
21/10/2024 14:10:32   Also see the -help entry for tuning parameters.
21/10/2024 14:10:32   You can press 3 Alt_L's (Left "Alt" key) in a row to 
21/10/2024 14:10:32   repaint the screen, also see the -fixscreen option for
21/10/2024 14:10:32   periodic repaints.
21/10/2024 14:10:32 
21/10/2024 14:10:32 Client Side Caching: -ncache mode is in effect to provide
21/10/2024 14:10:32   client-side pixel data caching.  This speeds up
21/10/2024 14:10:32   iconifying/deiconifying windows, moving and raising
21/10/2024 14:10:32   windows, and reposting menus.  In the simple CopyRect
21/10/2024 14:10:32   encoding scheme used (no compression) a huge amount
21/10/2024 14:10:32   of extra memory (20-100MB) is used on both the server and
21/10/2024 14:10:32   client sides.  This mode works with any VNC viewer.
21/10/2024 14:10:32   However, in most you can actually see the cached pixel
21/10/2024 14:10:32   data by scrolling down, so you need to re-adjust its size.
21/10/2024 14:10:32   See http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching.
21/10/2024 14:10:32   If this mode yields undesired behavior (poor response,
21/10/2024 14:10:32   painting errors, etc) it may be disabled via: '-ncache 0'
21/10/2024 14:10:32   You can press 3 Alt_L's (Left "Alt" key) in a row to 
21/10/2024 14:10:32   repaint the screen, also see the -fixscreen option for
21/10/2024 14:10:32   periodic repaints.
21/10/2024 14:10:32 
21/10/2024 14:10:32 XKEYBOARD: number of keysyms per keycode 7 is greater
21/10/2024 14:10:32   than 4 and 51 keysyms are mapped above 4.
21/10/2024 14:10:32   Automatically switching to -xkb mode.
21/10/2024 14:10:32   If this makes the key mapping worse you can
21/10/2024 14:10:32   disable it with the "-noxkb" option.
21/10/2024 14:10:32   Also, remember "-remap DEAD" for accenting characters.
21/10/2024 14:10:32 
21/10/2024 14:10:32 X FBPM extension not supported.
Xlib:  extension "DPMS" missing on display ":0".
21/10/2024 14:10:32 X display is not capable of DPMS.
21/10/2024 14:10:32 --------------------------------------------------------
21/10/2024 14:10:32 
Failed to read: session.ignoreBorder
Setting default value
Failed to read: session.forcePseudoTransparency
Setting default value
Failed to read: session.colorsPerChannel
Setting default value
Failed to read: session.doubleClickInterval
Setting default value
Failed to read: session.tabPadding
Setting default value
Failed to read: session.styleOverlay
Setting default value
Failed to read: session.slitlistFile
Setting default value
Failed to read: session.appsFile
Setting default value
Failed to read: session.tabsAttachArea
Setting default value
Failed to read: session.menuSearch
Setting default value
Failed to read: session.cacheLife
Setting default value
Failed to read: session.cacheMax
Setting default value
Failed to read: session.autoRaiseDelay
Setting default value
Failed to read: session.ignoreBorder
Setting default value
Failed to read: session.forcePseudoTransparency
Setting default value
Failed to read: session.colorsPerChannel
Setting default value
Failed to read: session.doubleClickInterval
Setting default value
Failed to read: session.tabPadding
Setting default value
Failed to read: session.styleOverlay
Setting default value
Failed to read: session.slitlistFile
Setting default value
Failed to read: session.appsFile
Setting default value
Failed to read: session.tabsAttachArea
Setting default value
Failed to read: session.menuSearch
Setting default value
Failed to read: session.cacheLife
Setting default value
Failed to read: session.cacheMax
Setting default value
Failed to read: session.autoRaiseDelay
Setting default value
21/10/2024 14:10:32 Default visual ID: 0x21
21/10/2024 14:10:32 Read initial data from X display into framebuffer.
21/10/2024 14:10:32 initialize_screen: fb_depth/fb_bpp/fb_Bpl 16/16/2560
21/10/2024 14:10:32 
21/10/2024 14:10:32 X display :0 is 16bpp depth=16 true color
21/10/2024 14:10:32 
21/10/2024 14:10:32 Autoprobing TCP port 
21/10/2024 14:10:32 Autoprobing selected TCP port 5900
21/10/2024 14:10:32 Autoprobing TCP6 port 
21/10/2024 14:10:32 Autoprobing selected TCP6 port 5900
21/10/2024 14:10:32 listen6: bind: Address in use
21/10/2024 14:10:32 Not listening on IPv6 interface.
21/10/2024 14:10:32 
21/10/2024 14:10:32 Xinerama is present and active (e.g. multi-head).
21/10/2024 14:10:32 Xinerama: number of sub-screens: 1
21/10/2024 14:10:32 Xinerama: no blackouts needed (only one sub-screen)
21/10/2024 14:10:32 
21/10/2024 14:10:32 fb read rate: 1198 MB/sec
21/10/2024 14:10:32 fast read: reset -wait  ms to: 10
21/10/2024 14:10:32 fast read: reset -defer ms to: 10
21/10/2024 14:10:32 The X server says there are 10 mouse buttons.
21/10/2024 14:10:32 screen setup finished.
21/10/2024 14:10:32 
21/10/2024 14:10:32 WARNING: You are running x11vnc WITHOUT a password.  See
21/10/2024 14:10:32 WARNING: the warning message printed above for more info.
21/10/2024 14:10:32 
The VNC desktop is:      6fce2f67e861:0
�
0
Failed to read: session.screen0.opaqueMove
Setting default value
Failed to read: session.screen0.fullMaximization
Setting default value
Failed to read: session.screen0.maxIgnoreIncrement
Setting default value
Failed to read: session.screen0.maxDisableMove
Setting default value
Failed to read: session.screen0.maxDisableResize
Setting default value
Failed to read: session.screen0.workspacewarping
Setting default value
Failed to read: session.screen0.showwindowposition
Setting default value
Failed to read: session.screen0.autoRaise
Setting default value
Failed to read: session.screen0.clickRaises
Setting default value
Failed to read: session.screen0.defaultDeco
Setting default value
Failed to read: session.screen0.tab.placement
Setting default value
Failed to read: session.screen0.windowMenu
Setting default value
Failed to read: session.screen0.noFocusWhileTypingDelay
Setting default value
Failed to read: session.screen0.workspaces
Setting default value
Failed to read: session.screen0.edgeSnapThreshold
Setting default value
Failed to read: session.screen0.window.focus.alpha
Setting default value
Failed to read: session.screen0.window.unfocus.alpha
Setting default value
Failed to read: session.screen0.menu.alpha
Setting default value
Failed to read: session.screen0.menuDelay
Setting default value
Failed to read: session.screen0.tab.width
Setting default value
Failed to read: session.screen0.tooltipDelay
Setting default value
Failed to read: session.screen0.allowRemoteActions
Setting default value
Failed to read: session.screen0.clientMenu.usePixmap
Setting default value
Failed to read: session.screen0.tabs.usePixmap
Setting default value
Failed to read: session.screen0.tabs.maxOver
Setting default value
Failed to read: session.screen0.tabs.intitlebar
Setting default value
Failed to read: session.screen0.focusModel
Setting default value
Failed to read: session.screen0.tabFocusModel
Setting default value
Failed to read: session.screen0.focusNewWindows
Setting default value
Failed to read: session.screen0.focusSameHead
Setting default value
Failed to read: session.screen0.rowPlacementDirection
Setting default value
Failed to read: session.screen0.colPlacementDirection
Setting default value
Failed to read: session.screen0.windowPlacement
Setting default value
Failed to read: session.ignoreBorder
Setting default value
Failed to read: session.forcePseudoTransparency
Setting default value
Failed to read: session.colorsPerChannel
Setting default value
Failed to read: session.doubleClickInterval
Setting default value
Failed to read: session.tabPadding
Setting default value
Failed to read: session.styleOverlay
Setting default value
Failed to read: session.slitlistFile
Setting default value
Failed to read: session.appsFile
Setting default value
Failed to read: session.tabsAttachArea
Setting default value
Failed to read: session.menuSearch
Setting default value
Failed to read: session.cacheLife
Setting default value
Failed to read: session.cacheMax
Setting default value
Failed to read: session.autoRaiseDelay
Setting default value
Failed to read: session.screen0.opaqueMove
Setting default value
Failed to read: session.screen0.fullMaximization
Setting default value
Failed to read: session.screen0.maxIgnoreIncrement
Setting default value
Failed to read: session.screen0.maxDisableMove
Setting default value
Failed to read: session.screen0.maxDisableResize
Setting default value
Failed to read: session.screen0.workspacewarping
Setting default value
Failed to read: session.screen0.showwindowposition
Setting default value
Failed to read: session.screen0.autoRaise
Setting default value
Failed to read: session.screen0.clickRaises
Setting default value
Failed to read: session.screen0.defaultDeco
Setting default value
Failed to read: session.screen0.tab.placement
Setting default value
Failed to read: session.screen0.windowMenu
Setting default value
Failed to read: session.screen0.noFocusWhileTypingDelay
Setting default value
Failed to read: session.screen0.workspaces
Setting default value
Failed to read: session.screen0.edgeSnapThreshold
Setting default value
Failed to read: session.screen0.window.focus.alpha
Setting default value
Failed to read: session.screen0.window.unfocus.alpha
Setting default value
Failed to read: session.screen0.menu.alpha
Setting default value
Failed to read: session.screen0.menuDelay
Setting default value
Failed to read: session.screen0.tab.width
Setting default value
Failed to read: session.screen0.tooltipDelay
Setting default value
Failed to read: session.screen0.allowRemoteActions
Setting default value
Failed to read: session.screen0.clientMenu.usePixmap
Setting default value
Failed to read: session.screen0.tabs.usePixmap
Setting default value
Failed to read: session.screen0.tabs.maxOver
Setting default value
Failed to read: session.screen0.tabs.intitlebar
Setting default value
Failed to read: session.screen0.focusModel
Setting default value
Failed to read: session.screen0.tabFocusModel
Setting default value
Failed to read: session.screen0.focusNewWindows
Setting default value
Failed to read: session.screen0.focusSameHead
Setting default value
Failed to read: session.screen0.rowPlacementDirection
Setting default value
Failed to read: session.screen0.colPlacementDirection
Setting default value
Failed to read: session.screen0.windowPlacement
Setting default value
Failed to read: session.screen0.slit.acceptKdeDockapps
Setting default value
Failed to read: session.screen0.slit.autoHide
Setting default value
Failed to read: session.screen0.slit.maxOver
Setting default value
Failed to read: session.screen0.slit.placement
Setting default value
Failed to read: session.screen0.slit.alpha
Setting default value
Failed to read: session.screen0.slit.onhead
Setting default value
Failed to read: session.screen0.slit.layer
Setting default value
Failed to read: session.screen0.toolbar.autoHide
Setting default value
Failed to read: session.screen0.toolbar.maxOver
Setting default value
Failed to read: session.screen0.toolbar.visible
Setting default value
Failed to read: session.screen0.toolbar.widthPercent
Setting default value
Failed to read: session.screen0.toolbar.alpha
Setting default value
Failed to read: session.screen0.toolbar.layer
Setting default value
Failed to read: session.screen0.toolbar.onhead
Setting default value
Failed to read: session.screen0.toolbar.placement
Setting default value
Failed to read: session.screen0.toolbar.height
Setting default value
Failed to read: session.screen0.toolbar.tools
Setting default value
Failed to read: session.screen0.iconbar.mode
Setting default value
Failed to read: session.screen0.iconbar.alignment
Setting default value
Failed to read: session.screen0.iconbar.iconWidth
Setting default value
Failed to read: session.screen0.iconbar.iconTextPadding
Setting default value
Failed to read: session.screen0.iconbar.usePixmap
Setting default value
Failed to read: session.screen0.strftimeFormat
Setting default value
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  70 (X_PolyFillRectangle)
  Serial number of failed request:  15
  Current serial number in output stream:  16
Downloading I-Still-Dont-Care-About-Cookies from https://github.com/OhMyGuus/I-Still-Dont-Care-About-Cookies/releases/download/v1.1.4/ISDCAC-chrome-source.zip
Successfully downloaded I-Still-Dont-Care-About-Cookies to .extentions/I-Still-Dont-Care-About-Cookies
Downloading uBOL-home from https://github.com/uBlockOrigin/uBOL-home/releases/download/uBOLite_2024.10.20.869/uBOLite_2024.10.20.869.chromium.mv3.zip
Successfully downloaded uBOL-home to .extentions/uBOL-home
INFO:     Started server process [14]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8191 (Press CTRL+C to quit)

@skyless
Copy link

skyless commented Oct 21, 2024

And here's the ping from prowlarr:

INFO:     Request: cmd='request.get' url='https://prowlarr.servarr.com/v1/ping' maxTimeout=60000

INFO:     172.17.0.1:47822 - "POST /v1 HTTP/1.1" 500 Internal Server Error

ERROR:    Exception in ASGI application

Traceback (most recent call last):

  File "/app/.venv/lib/python3.12/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi

    result = await app(  # type: ignore[func-returns-value]

             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/.venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__

    return await self.app(scope, receive, send)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/.venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__

    await super().__call__(scope, receive, send)

  File "/app/.venv/lib/python3.12/site-packages/starlette/applications.py", line 123, in __call__

    await self.middleware_stack(scope, receive, send)

  File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__

    raise exc

  File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__

    await self.app(scope, receive, _send)

  File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 65, in __call__

    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)

  File "/app/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app

    raise exc

  File "/app/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app

    await app(scope, receive, sender)

  File "/app/.venv/lib/python3.12/site-packages/starlette/routing.py", line 756, in __call__

    await self.middleware_stack(scope, receive, send)

  File "/app/.venv/lib/python3.12/site-packages/starlette/routing.py", line 776, in app

    await route.handle(scope, receive, send)

  File "/app/.venv/lib/python3.12/site-packages/starlette/routing.py", line 297, in handle

    await self.app(scope, receive, send)

  File "/app/.venv/lib/python3.12/site-packages/starlette/routing.py", line 77, in app

    await wrap_app_handling_exceptions(app, request)(scope, receive, send)

  File "/app/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app

    raise exc

  File "/app/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app

    await app(scope, receive, sender)

  File "/app/.venv/lib/python3.12/site-packages/starlette/routing.py", line 72, in app

    response = await func(request)

               ^^^^^^^^^^^^^^^^^^^

  File "/app/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 278, in app

    raw_response = await run_endpoint_function(

                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 191, in run_endpoint_function

    return await dependant.call(**values)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/main.py", line 33, in read_item

    browser = await new_browser()

              ^^^^^^^^^^^^^^^^^^^

  File "/app/src/utils/browser.py", line 31, in new_browser

    return await webdriver.start(config=config)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/.venv/lib/python3.12/site-packages/nodriver/core/util.py", line 88, in start

    return await Browser.create(config)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/.venv/lib/python3.12/site-packages/nodriver/core/browser.py", line 91, in create

    await instance.start()

  File "/app/.venv/lib/python3.12/site-packages/nodriver/core/browser.py", line 351, in start

    raise Exception(

Exception: 

                ---------------------

                Failed to connect to browser

                ---------------------

                One of the causes could be when you are running as root.

                In that case you need to pass no_sandbox=True 

@ThePhaseless
Copy link
Owner

Hmm... This could be a problem with docker host, could you expose port 5900 and check with novnc and check if chromium is starting? Or could you try another host? Trying to eliminate as much problems as possible. My both arm64 and x64 as well as github actions do work, so I suspect this could be related to some docker permissions or sth

@skyless
Copy link

skyless commented Oct 26, 2024

It works great locally (build + run) on my mac M1 chip... (and ygg.re challenge works too) :'(

Definitively agree with docker issue but this is the only one container I can't run properly on my Synology yet. Still searching how to resolve it (will try novnc check asap).

@ThePhaseless ThePhaseless changed the title Failed to connect to browser Error on any request Browser can't spawn on Synology Oct 27, 2024
@ThePhaseless
Copy link
Owner

ThePhaseless commented Nov 24, 2024

Hi, could you check again? I've remade the software using new base and should be more stable.

@ThePhaseless ThePhaseless added the bug Something isn't working label Nov 25, 2024
@ThePhaseless
Copy link
Owner

I am going to close this issue, as it is probably out of seleniumbase combability or my knowledge and lack of responses. I will state in readme that Synology is not supported and may or may not be functional.

@ThePhaseless ThePhaseless closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2024
@ThePhaseless ThePhaseless marked this as a duplicate of #5 Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants