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
Open
When node is launched as snap-packaged node runtime, the child process always returns empty results#13vsavkov wants to merge 1 commit intodisler:mainfrom
vsavkov wants to merge 1 commit intodisler:mainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.