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

Fetch Failed Raspberry Pi armv7 #138

Open
NathanealV opened this issue Nov 1, 2024 · 5 comments
Open

Fetch Failed Raspberry Pi armv7 #138

NathanealV opened this issue Nov 1, 2024 · 5 comments

Comments

@NathanealV
Copy link

I have the following error when attempting to use single-file-cli on my Raspberry Pi 3B. Seems to be related to #122 but there was no solution from that post. This is running from within a docker container (specifically linkding - see this issue as well).

URL: https://www.wikipedia.org
Stack: TypeError: fetch failed
    at node:internal/deps/undici/undici:12502:13
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async file:///usr/local/lib/node_modules/single-file-cli/node_modules/simple-cdp/mod.js:214:24
    at async retryConnection (file:///usr/local/lib/node_modules/single-file-cli/node_modules/simple-cdp/mod.js:237:16)
    at async Module.getPageData (file:///usr/local/lib/node_modules/single-file-cli/lib/cdp-client.js:49:16)
    at async capturePage (file:///usr/local/lib/node_modules/single-file-cli/single-file-cli-api.js:265:20)
    at async runNextTask (file:///usr/local/lib/node_modules/single-file-cli/single-file-cli-api.js:178:20)
    at async Promise.all (index 0)
    at async capture (file:///usr/local/lib/node_modules/single-file-cli/single-file-cli-api.js:129:2)
    at async run (file:///usr/local/lib/node_modules/single-file-cli/single-file-launcher.js:85:3)

Other OS details: Raspbian 1:6.6.51-1+rpt3 (2024-10-08) armv7l Linux

Any ideas on how to approach this? Thanks

@gildas-lormeau
Copy link
Owner

How much RAM and disk space is available on the machine?

@NathanealV
Copy link
Author

I have 1GB RAM and 400+ GB of disk space remaining. Would it be a RAM issue with running chromium?

@gildas-lormeau
Copy link
Owner

Indeed, I've seen this kind of error before in this situation. The problem is that the error message issued by Chrome is very generic, so it's not easy to know what's causing the problem.

You might be able to fix the problem by passing some switches to Chrome. For example --enable-low-end-device-mode, --force-device-scale-factor=1, --disable-software-rasterizer (proposed by ChatGPT). You can pass parameters to Chrome with the --browser-arg switch.

Example:
single-file https://www.wikipedia.org \ --browser-arg --enable-low-end-device-mode \ --browser-arg --force-device-scale-factor=1

FYI, the complete list of switches is available here: https://peter.sh/experiments/chromium-command-line-switches. Some of them are already passed by single-file.

@NathanealV
Copy link
Author

Thanks for that - I've tried passing those args through. The first time it was successful with only the first 2 (low end device mode and scale factor) but I tried again and it would just continue indefinitely while CPU usage is at 100%. Nothing changed when adding the last software rasterizer flag.

Is there any way to see verbose logs while running the command?

@gildas-lormeau
Copy link
Owner

I'm not aware of a way to display detailed logs with Chrome. I'd recommend looking for more info about other switches you might use. AI assistants are pretty good for that, see https://chatgpt.com/share/672d4826-48ac-800e-99c5-5ac8d222bde0 for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants