Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

detect.sh fails on Permission denied when running in ChromeOS Crostini (Linux) #47

Open
rickard-von-essen opened this issue Jul 8, 2020 · 5 comments

Comments

@rickard-von-essen
Copy link

Fails with:

/cnb/buildpacks/heroku_nodejs-engine/0.4.4/bin/detect: line 11: /cnb/buildpacks/heroku_nodejs-engine/0.4.4/lib/detect.sh: Permission denied

Using the trivial Express JS Hello World app.

Log output:

$ pack build --builder heroku/buildpacks:18 --verbose myapp-express

Pulling image �[94mindex.docker.io/heroku/buildpacks:18�[0m
18: Pulling from heroku/buildpacks
Digest: sha256:49a9beac4aa8ec3bab9f2d2e470712c0858117c145b2b469a5c6a743f964e009
Status: Image is up to date for heroku/buildpacks:18
Selected run image �[94mheroku/pack:18�[0m
Pulling image �[94mheroku/pack:18�[0m
18: Pulling from heroku/pack
Digest: sha256:6679e0e5668cb1f8f100ebf038195faf32fe3002a74d72736ae900b2223d62a2
Status: Image is up to date for heroku/pack:18
Creating builder with the following buildpacks:
-> �[94mheroku/[email protected]�[0m
-> �[94mheroku/[email protected]�[0m
-> �[94mheroku/[email protected]�[0m
-> �[94mheroku/[email protected]�[0m
-> �[94mheroku/[email protected]�[0m
-> �[94mheroku/[email protected]�[0m
-> �[94mheroku/[email protected]�[0m
-> �[94mheroku/[email protected]�[0m
-> �[94mheroku/[email protected]�[0m
-> �[94mheroku/[email protected]�[0m
-> �[94mheroku/[email protected]�[0m
-> �[94mheroku/[email protected]�[0m
-> �[94mheroku/[email protected]�[0m
-> �[94mheroku/[email protected]�[0m
Using build cache volume �[94mpack-cache-339c5235b096.build�[0m
�[36m===> DETECTING�[0m
======== Output: heroku/[email protected] ========
no
======== Results ========
err:  heroku/[email protected] (1)
pass: heroku/[email protected]
======== Results ========
fail: heroku/[email protected]
pass: heroku/[email protected]
======== Output: heroku/[email protected] ========
JVM
======== Output: heroku/[email protected] ========
Could not find a pom.xml file! Please check that it exists and is committed to Git.
======== Results ========
pass: heroku/[email protected]
err:  heroku/[email protected] (1)
pass: heroku/[email protected]
======== Results ========
fail: heroku/[email protected]
pass: heroku/[email protected]
======== Results ========
fail: heroku/[email protected]
pass: heroku/[email protected]
======== Results ========
fail: heroku/[email protected]
pass: heroku/[email protected]
======== Results ========
fail: heroku/[email protected]
pass: heroku/[email protected]
======== Output: heroku/[email protected] ========
/cnb/buildpacks/heroku_nodejs-engine/0.4.4/bin/detect: line 11: /cnb/buildpacks/heroku_nodejs-engine/0.4.4/lib/detect.sh: Permission denied
======== Output: heroku/[email protected] ========
/cnb/buildpacks/heroku_nodejs-yarn/0.0.1/bin/detect: line 9: /cnb/buildpacks/heroku_nodejs-yarn/0.0.1/lib/detect.sh: Permission denied
======== Results ========
err:  heroku/[email protected] (1)
err:  heroku/[email protected] (1)
pass: heroku/[email protected]
======== Output: heroku/[email protected] ========
/cnb/buildpacks/heroku_nodejs-engine/0.4.4/bin/detect: line 11: /cnb/buildpacks/heroku_nodejs-engine/0.4.4/lib/detect.sh: Permission denied
======== Output: heroku/[email protected] ========
/cnb/buildpacks/heroku_nodejs-npm/0.2.0/bin/detect: line 11: /cnb/buildpacks/heroku_nodejs-npm/0.2.0/lib/detect.sh: Permission denied
======== Results ========
err:  heroku/[email protected] (1)
err:  heroku/[email protected] (1)
pass: heroku/[email protected]
�[31;1mERROR: �[0mNo buildpack groups passed detection.
�[31;1mERROR: �[0mPlease check that you are running against the correct path.
�[31;1mERROR: �[0mfailed to detect: failed to detect: no buildpacks participating
�[31;1mERROR: �[0mfailed with status code: 1

Version info

$ pack report
Pack:
  Version:  0.11.2+git-063a80d.build-677
  OS/Arch:  linux/amd64

Default Lifecycle Version:  0.7.5

Config:
  default-builder-image = "gcr.io/buildpacks/builder"
$ docker version
Client: Docker Engine - Community
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        48a66213fe
 Built:             Mon Jun 22 15:45:52 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.12
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       48a66213fe
  Built:            Mon Jun 22 15:44:23 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Google Chrome 83.0.4103.119 (Official Build) (64-bit)

I have tried this on a macOS computer and there it works perfectly. Checking the permissions on /cnb/buildpacks/heroku_nodejs-engine/0.4.4/lib they are correct on macOS but wrong on my PixelBook.

The obvious difference is the storage driver of docker overlay2 (macOS) vs. btrfs.

Both machines have the exact same versions of heroku/buildpacks:18

@rickard-von-essen
Copy link
Author

Originally reported here heroku/heroku-buildpack-nodejs#800

@saez0pub
Copy link

saez0pub commented Oct 16, 2020

Hello,

Same issue, also using btrfs.

Here is the prmission problem :

docker run --rm -it heroku/buildpacks:18 ls -ld /cnb/buildpacks/heroku_nodejs-npm/0.2.0/lib/
drw------- 1 root root 44 Oct 16 12:18 /cnb/buildpacks/heroku_nodejs-npm/0.2.0/lib/

@saez0pub
Copy link

saez0pub commented Oct 16, 2020

On a overlay2 storage host:

docker run --rm -it heroku/buildpacks:18 ls -ld /cnb/buildpacks/heroku_nodejs-npm/0.2.0/lib/
drwxr-xr-x 3 root root 68 Oct 16 13:13 /cnb/buildpacks/heroku_nodejs-npm/0.2.0/lib/

@optiz0r
Copy link

optiz0r commented Oct 17, 2020

Same here using zfs on sabayon (gentoo) amd64:

 │ [detector] ======== Output: heroku/[email protected] ========
 │ [detector] /cnb/buildpacks/heroku_nodejs-npm/0.2.0/bin/detect: line 11: /cnb/bui
 │ ldpacks/heroku_nodejs-npm/0.2.0/lib/detect.sh: Permission denied
 │ [detector] ======== Output: heroku/[email protected] ========
 │ [detector] /cnb/buildpacks/heroku_nodejs-typescript/0.0.2/bin/detect: line 10: /
 │ cnb/buildpacks/heroku_nodejs-typescript/0.0.2/lib/detect.sh: Permission denied
 │ [detector] err:  heroku/[email protected] (1)
 │ [detector] err:  heroku/[email protected] (1)
 │ [detector] err:  heroku/[email protected] (1)
 │ [detector] ERROR: No buildpack groups passed detection.
 │ [detector] ERROR: failed to detect: buildpack(s) failed with err

@tszngai
Copy link

tszngai commented Jan 22, 2021

Same issue when running on Jenkins

Storage Driver: devicemapper

�[36m===> DETECTING�[0m
[�[36mdetector�[0m] ======== Output: heroku/[email protected] ========
[�[36mdetector�[0m] no
[�[36mdetector�[0m] err:  heroku/[email protected] (1)
[�[36mdetector�[0m] ======== Output: heroku/[email protected] ========
[�[36mdetector�[0m] Could not find a pom.xml file! Please check that it exists and is committed to Git.
[�[36mdetector�[0m] err:  heroku/[email protected] (1)
[�[36mdetector�[0m] ======== Output: heroku/[email protected] ========
[�[36mdetector�[0m] /cnb/buildpacks/heroku_nodejs-engine/0.7.0/bin/detect: line 11: /cnb/buildpacks/heroku_nodejs-engine/0.7.0/lib/detect.sh: Permission denied
[�[36mdetector�[0m] ======== Output: heroku/[email protected] ========
[�[36mdetector�[0m] /cnb/buildpacks/heroku_nodejs-npm/0.4.0/bin/detect: line 11: /cnb/buildpacks/heroku_nodejs-npm/0.4.0/lib/detect.sh: Permission denied
[�[36mdetector�[0m] err:  heroku/[email protected] (1)
[�[36mdetector�[0m] err:  heroku/[email protected] (1)
[�[36mdetector�[0m] err:  salesforce/[email protected] (1)
[�[36mdetector�[0m] ======== Output: heroku/[email protected] ========
[�[36mdetector�[0m] /cnb/buildpacks/heroku_nodejs-engine/0.7.0/bin/detect: line 11: /cnb/buildpacks/heroku_nodejs-engine/0.7.0/lib/detect.sh: Permission denied
[�[36mdetector�[0m] ======== Output: heroku/[email protected] ========
[�[36mdetector�[0m] /cnb/buildpacks/heroku_nodejs-yarn/0.1.0/bin/detect: line 9: /cnb/buildpacks/heroku_nodejs-yarn/0.1.0/lib/detect.sh: Permission denied
[�[36mdetector�[0m] ======== Output: heroku/[email protected] ========
[�[36mdetector�[0m] /cnb/buildpacks/heroku_nodejs-typescript/0.2.0/bin/detect: line 10: /cnb/buildpacks/heroku_nodejs-typescript/0.2.0/lib/detect.sh: Permission denied
[�[36mdetector�[0m] err:  heroku/[email protected] (1)
[�[36mdetector�[0m] err:  heroku/[email protected] (1)
[�[36mdetector�[0m] err:  heroku/[email protected] (1)
[�[36mdetector�[0m] ======== Output: heroku/[email protected] ========
[�[36mdetector�[0m] /cnb/buildpacks/heroku_nodejs-engine/0.7.0/bin/detect: line 11: /cnb/buildpacks/heroku_nodejs-engine/0.7.0/lib/detect.sh: Permission denied
[�[36mdetector�[0m] ======== Output: heroku/[email protected] ========
[�[36mdetector�[0m] /cnb/buildpacks/heroku_nodejs-npm/0.4.0/bin/detect: line 11: /cnb/buildpacks/heroku_nodejs-npm/0.4.0/lib/detect.sh: Permission denied
[�[36mdetector�[0m] ======== Output: heroku/[email protected] ========
[�[36mdetector�[0m] /cnb/buildpacks/heroku_nodejs-typescript/0.2.0/bin/detect: line 10: /cnb/buildpacks/heroku_nodejs-typescript/0.2.0/lib/detect.sh: Permission denied
[�[36mdetector�[0m] err:  heroku/[email protected] (1)
[�[36mdetector�[0m] err:  heroku/[email protected] (1)
[�[36mdetector�[0m] err:  heroku/[email protected] (1)
[�[36mdetector�[0m] �[31;1mERROR: �[0mNo buildpack groups passed detection.
[�[36mdetector�[0m] �[31;1mERROR: �[0mfailed to detect: buildpack(s) failed with err
�[31;1mERROR: �[0mfailed to build: executing lifecycle. This may be the result of using an untrusted builder: failed with status code: 101

This seems to only happen to nodejs - other buildpacks work fine. Any update?

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

No branches or pull requests

4 participants