-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Run on Raspberry Pi -> requires 64-bit OS #3
Comments
Apparently Ubuntu is supported (only 32 bit?): rpi3: $ npx playwright install chrome
Switching to root user to install dependencies...
++ arch
+ [[ armv7l == \a\a\r\c\h\6\4 ]]
+ [[ ! -f /etc/os-release ]]
++ bash -c 'source /etc/os-release && echo $ID'
+ ID=raspbian
+ [[ raspbian != \u\b\u\n\t\u ]]
+ echo 'ERROR: cannot install on raspbian distribution - only Ubuntu is supported'
ERROR: cannot install on raspbian distribution - only Ubuntu is supported
+ exit 1
Failed to install browsers
Error: Failed to install chrome rpi4: $ npx playwright install chrome
Switching to root user to install dependencies...
++ arch
+ [[ aarch64 == \a\a\r\c\h\6\4 ]]
+ echo 'ERROR: not supported on Linux Arm64'
ERROR: not supported on Linux Arm64
+ exit 1
Failed to install browsers
Error: Failed to install chrome
``` |
Just tried #11 on my RPi4 (SSD): docker build took 6m53s. Launching the browser failed: $ uname -m
aarch64
$ dpkg --print-architecture
armhf
$ docker run --rm -it \
-p 5900:5900 -p 6080:6080 \
-v "$(pwd)/userDataDir:/fgc/userDataDir" \
-v "$(pwd)/screenshots:/fgc/screenshots" \
-v "$(pwd)/epic-games.js:/fgc/epic-games.js" \
--name free-games-claimer \
free-games-claimer
node:internal/process/esm_loader:94
internalBinding('errors').triggerUncaughtException(
^
browserType.launchPersistentContext: Browser closed.
==================== Browser output: ====================
<launching> /root/.cache/ms-playwright/chromium-978106/chrome-linux/chrome --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --no-sandbox --disable-session-crashed-bubble --restore-last-session --user-data-dir=/fgc/userDataDir --remote-debugging-pipe about:blank
<launched> pid=68
[pid=68][err] /root/.cache/ms-playwright/chromium-978106/chrome-linux/chrome: 1: y: not found
[pid=68][err] /root/.cache/ms-playwright/chromium-978106/chrome-linux/chrome: 1: ?: not found
[pid=68][err] /root/.cache/ms-playwright/chromium-978106/chrome-linux/chrome: 1: cannot open DLS]dq}����������������
[pid=68][err] $-5DTY_hr: No such file
[pid=68][err] /root/.cache/ms-playwright/chromium-978106/chrome-linux/chrome: 1: ������������: not found
[pid=68][err] /root/.cache/ms-playwright/chromium-978106/chrome-linux/chrome: 1: @GKRahqx�������������
9@MZp: not found
[pid=68][err] /root/.cache/ms-playwright/chromium-978106/chrome-linux/chrome: 1: ������������: not found
[pid=68][err] /root/.cache/ms-playwright/chromium-978106/chrome-linux/chrome: 1: cannot create �W@xO@8
@$@@@�����
[pid=68][err] W�
[pid=68][err] W�
[pid=68][err] W�W�Wлл��7
��7
��7
y�)�
�Y�
�Y�
��ypfyP�td�F��F��F��7�7Q�td���XX/lib64/ld-linux-x86-64.so.2GNU INFOCrashpad4�
GNU&+�U9���Ba p � �������9: Directory nonexistent
[pid=68][err] /root/.cache/ms-playwright/chromium-978106/chrome-linux/chrome: 1: ELF: not found
[pid=68][err] /root/.cache/ms-playwright/chromium-978106/chrome-linux/chrome: 17: Syntax error: word unexpected (expecting ")")
[pid=68] <process did exit: exitCode=2, signal=null>
[pid=68] starting temporary directories cleanup
=========================== logs ===========================
... same as above
============================================================
at async file:///fgc/epic-games.js:13:17 {
name: 'Error'
} Originally posted by @vogler in #11 (comment) |
Tried with firefox on rpi4: $ npx playwright install --with-deps firefox
BEWARE: your OS is not officially supported by Playwright; installing dependencies for Ubuntu as a fallback.
Installing dependencies...
BEWARE: your OS is not officially supported by Playwright; downloading fallback build.
$ node epic-games.js
node:internal/process/esm_loader:97
internalBinding('errors').triggerUncaughtException(
^
browserType.launchPersistentContext: Browser.enable): Browser closed.
==================== Browser output: ====================
<launching> /home/pi/.cache/ms-playwright/firefox-1369/firefox/firefox -no-remote -wait-for-browser -foreground -profile /home/pi/free-games-claimer/data/browser -juggler-pipe --hide-crash-restore-bubble about:blank
<launched> pid=26206
[pid=26206][err] /home/pi/.cache/ms-playwright/firefox-1369/firefox/firefox: 1: ELF: not found
[pid=26206][err] /home/pi/.cache/ms-playwright/firefox-1369/firefox/firefox: 2: p: not found
[pid=26206][err] /home/pi/.cache/ms-playwright/firefox-1369/firefox/firefox: 3: p: not found
[pid=26206][err] /home/pi/.cache/ms-playwright/firefox-1369/firefox/firefox: 4: ����p
p/
p/
P�5@-
@=
@=
@���DDp
p/
p/
: not found
[pid=26206][err] /home/pi/.cache/ms-playwright/firefox-1369/firefox/firefox: 5: ��: not found
[pid=26206][err] /home/pi/.cache/ms-playwright/firefox-1369/firefox/firefox: 6: ��: not found
[pid=26206][err] /home/pi/.cache/ms-playwright/firefox-1369/firefox/firefox: 7: Syntax error: ")" unexpected
[pid=26206] <process did exit: exitCode=2, signal=null>
[pid=26206] starting temporary directories cleanup
=========================== logs ===========================
<launching> /home/pi/.cache/ms-playwright/firefox-1369/firefox/firefox -no-remote -wait-for-browser -foreground -profile /home/pi/free-games-claimer/data/browser -juggler-pipe --hide-crash-restore-bubble about:blank
<launched> pid=26206
[pid=26206][err] /home/pi/.cache/ms-playwright/firefox-1369/firefox/firefox: 1: ELF: not found
[pid=26206][err] /home/pi/.cache/ms-playwright/firefox-1369/firefox/firefox: 2: p: not found
[pid=26206][err] /home/pi/.cache/ms-playwright/firefox-1369/firefox/firefox: 3: p: not found
[pid=26206][err] /home/pi/.cache/ms-playwright/firefox-1369/firefox/firefox: 4: ����p
p/
p/
P�5@-
@=
@=
@���DDp
p/
p/
: not found
[pid=26206][err] /home/pi/.cache/ms-playwright/firefox-1369/firefox/firefox: 5: ��: not found
[pid=26206][err] /home/pi/.cache/ms-playwright/firefox-1369/firefox/firefox: 6: ��: not found
[pid=26206][err] /home/pi/.cache/ms-playwright/firefox-1369/firefox/firefox: 7: Syntax error: ")" unexpected
[pid=26206] <process did exit: exitCode=2, signal=null>
[pid=26206] starting temporary directories cleanup
============================================================
at async file:///home/pi/free-games-claimer/epic-games.js:36:17 {
name: 'Error'
}
Node.js v18.10.0 Same happens for docker: $ docker build --tag free-games-claimer .
...
$ docker run --rm -it -p 6080:6080 -v fgc:/fgc/data free-games-claimer
Xvfb display server created screen with resolution 1280x1280.
VNC is running on port 5900 (no password!).
noVNC is running on http://localhost:6080
node:internal/process/esm_loader:97
internalBinding('errors').triggerUncaughtException(
^
browserType.launchPersistentContext: Browser.enable): Browser closed.
==================== Browser output: ====================
<launching> /root/.cache/ms-playwright/firefox-1369/firefox/firefox -no-remote -wait-for-browser -foreground -profile /fgc/data/browser -juggler-pipe --hide-crash-restore-bubble about:blank
<launched> pid=124
[pid=124][err] /root/.cache/ms-playwright/firefox-1369/firefox/firefox: 1: ELF: not found
... |
Works for me on Raspberry Pi 4 with Ubuntu Server 22.04.1 LTS with docker |
Did you build the image yourself? Would be good to know why it doesn't work on mine. $ lsb_release -d
Description: Raspbian GNU/Linux 11 (bullseye)
$ uname -a
Linux rpi4 5.15.76-v8+ #1597 SMP PREEMPT Fri Nov 4 12:16:41 GMT 2022 aarch64 GNU/Linux |
I tried the prebuild one and I also build it myself. So i ran
and
Both work. I'm using a Pi 4 model B with 4 GB Ram.
Here I get arm64 instead of armhf in your post...
|
Ok, right, the problem is that my Raspbian only has a 64bit kernel and apt packages are still 32bit. Thanks, I'll mention it in the readme! |
Hello I just want to clarify things since nothing is mentioned at the readme at the moment. You guys want to use playwright but it gives error on raspbian OS. apt packages are still 32bit is the reason why it don't work with 64-bit OS. Current given solution is use docker and docker uses another OS which is ubuntu and then installs nodejs runs the needed scripts etc etc. Did you guys try with one with desktop environment? |
Oh my bad the commit isn't mentioned in this issue. Is there any specific reason you guys want to use this with Raspbian? |
Playwright also downloads patched browser binaries which are not available for
Docker doesn't change anything about the issue, see above. The docker image is for ease of use and originally was introduced as a workaround since epic-games showed captchas when Playwright was run headless. But with Firefox instead of Chrome this seems to no longer be the case.
Don't understand what you're asking. You can VNC into the container.
It has been the default for a long time, so I guess many people still use it since migration to Raspberry OS is not supported. |
Thanks for clarifying, I understand better now.
I see. Docker is made for ease of use not for solving raspbian problem.
In the above "Only tried running headless via ssh, maybe it works otherwise." I understood that as I run my raspberry pi OS without desktop environment. Does it mean something else?
I see thanks for clarifying. |
I assume you mean that you use Raspberry Pi OS without desktop environment. What does
|
I run my OS with desktop environment. I am not having issues, just wanted to clarify things because I saw something related to rpi. |
Tried qemu emulation of the $ docker run --rm --privileged aptman/qus -s -- -p x86_64
cat ./qemu-binfmt-conf.sh | sh -s -- --path=/qus/bin -p x86_64 --suffix -static
Setting /qus/bin/qemu-x86_64-static as binfmt interpreter for x86_64
$ docker run --rm amd64/alpine uname -a
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v8) and no specific platform was requested
Linux 55015c61e4c5 5.15.84-v8+ #1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023 x86_64 Linux
$ docker run --rm -it -p 6080:6080 -v fgc:/fgc/data --platform linux/amd64 ghcr.io/vogler/free-games-claimer
Xvfb display server created screen with resolution 1280x1280
VNC is running on port 5900 (no password!)
noVNC (VNC via browser) is running on http://localhost:6080
2023-02-11 16:45:01.982 started checking epic-games
node:internal/process/esm_loader:100
internalBinding('errors').triggerUncaughtException(
^
browserType.launchPersistentContext: Timeout 180000ms exceeded. Running the $ docker run --rm -it -p 6080:6080 -v fgc:/fgc/data --platform linux/arm64 ghcr.io/vogler/free-games-claimer
Xvfb display server created screen with resolution 1280x1280
|
Closing this since it's solved (64-bit OS work, Playwright prob. won't support 32-bit OS) and linked in the Readme. |
Chromium runs on Raspberry Pi, but Playwright seems to not support it out-of-the-box.
Only tried running headless via ssh, maybe it works otherwise.
Reported architectures (
uname -m
) arerpi3:
armv7l
rpi4:
aarch64
(64-bit kernel viaarm_64bit=1
)Adding
executablePath: '/usr/bin/chromium-browser'
to https://github.com/vogler/epicgames-claimer/blob/fd3f947223733b187c5e1903be1209f8fd3b618c/main.stealth.js#L26 givesbut that's likely due to my rpi4 running headless since it shows the same error without Playwright:
The text was updated successfully, but these errors were encountered: