Skip to content

When node is launched as snap-packaged node runtime, the child process always returns empty results#13

Open
vsavkov wants to merge 1 commit intodisler:mainfrom
vsavkov:spawn-node
Open

When node is launched as snap-packaged node runtime, the child process always returns empty results#13
vsavkov wants to merge 1 commit intodisler:mainfrom
vsavkov:spawn-node

Conversation

@vsavkov
Copy link
Copy Markdown

@vsavkov vsavkov commented Mar 1, 2026

If pi is launched via the snap-packaged node runtime,
the snap wrapper (/snap/bin/node → /usr/bin/snap) applies AppArmor confinement.

When pi (a snap process) tried to spawn another pi subprocess, snap's confinement silently brakes the stdout pipe — the child process ran but produced no readable output, always returning empty results.

Use process.execPath (the real node binary that snap internally uses) and invoke the pi CLI script directly, to bypass the snap wrapper and its pipe-breaking confinement.

the snap wrapper (/snap/bin/node → /usr/bin/snap) applies AppArmor confinement.

When pi (a snap process) tried to spawn another pi subprocess,
snap's confinement silently brakes the stdout pipe — the child process ran but produced no readable output,
always returning empty results.

Use process.execPath (the real node binary that snap internally uses) and invoke the pi CLI script directly,
to bypass the snap wrapper and its pipe-breaking confinement.
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

Successfully merging this pull request may close these issues.

1 participant