Incompatibility with Nextcloud Recognize
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 7.4k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
As I have mentioned in the past year in this issue https://github.com/nextcloud/recognize/issues/1096 (please disregard the title, I am using the Debian image, not the Alpine image), there is an issue for which Recognize (a Nextcloud "featured"/"official" app) does not work with the Docker image because it uses Node.js.
Node.js uses the uv_os_homedir function to get the HOME environment variable (for whatever reason) to install ffmpeg (which is otherwise installed just fine with Memories, other apps or simply with apt-get).
This is a "recurring" issue within Docker containers as seen in https://github.com/puppeteer/puppeteer/issues/9230.
I tried setting the HOME variable forcibly when launching docker to a dummy /home/nc-user directory to no avail (even tried creating a user with useradd -m nc-user as suggested in the issue above). Do you have any suggestions in getting this to work and/or potential fixes for all users of this image?
Below the logs for one of the three errors raised (this is the most relevant one):
[recognize] Error: Failed to install ffmpeg: os.js:68
throw new ERR_SYSTEM_ERROR(ctx);
^
SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_homedir returned ENOENT (no such file or directory)
at Object.<anonymous> (/var/www/html/custom_apps/recognize/node_modules/env-paths/index.js:5:20)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at Object.<anonymous> (/var/www/html/custom_apps/recognize/node_modules/ffmpeg-static/install.js:7:18)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) {
code: 'ERR_SYSTEM_ERROR',
info: {
errno: -2,
code: 'ENOENT',
message: 'no such file or directory',
syscall: 'uv_os_homedir'
},
errno: [Getter/Setter],
syscall: [Getter/Setter]
}
POST /settings/apps/enable
from xxx
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by collecting the complete Docker Compose or run command and Nextcloud system configuration, then reproduce the Recognize Node.js ffmpeg installation failure. Inspect the Docker image's HOME and home-directory behavior alongside the reported uv_os_homedir ENOENT error. Done means a documented, reproducible configuration or image change allows Recognize to install ffmpeg successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, node.js
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100