EACCES: permission denied

Bitrise Build Issue Report template

Description of the issue

I’m migrating from an Xcode 12.5.X macOS 11.4 (Big Sur) stack to Android&Docker 20.4 one and I’m getting the following error:

Error: EACCES: permission denied, mkdir '/root/.local/share/Detox'
    at Object.mkdirSync (fs.js:921:3)
    at Object.mkdirsSync (/bitrise/src/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:31:9)
    at Object.createFileSync (/bitrise/src/node_modules/fs-extra/lib/ensure/file.js:40:11)
    at ExclusiveLockfile._ensureFileExists (/bitrise/src/node_modules/detox/src/utils/ExclusiveLockfile.js:123:10)
    at ExclusiveLockfile._lock (/bitrise/src/node_modules/detox/src/utils/ExclusiveLockfile.js:106:10)
    at ExclusiveLockfile.exclusively (/bitrise/src/node_modules/detox/src/utils/ExclusiveLockfile.js:38:16)
    at DeviceRegistry.allocateDevice (/bitrise/src/node_modules/detox/src/devices/DeviceRegistry.js:71:27)
    at AttachedAndroidAllocDriver.allocate (/bitrise/src/node_modules/detox/src/devices/allocation/drivers/android/attached/AttachedAndroidAllocDriver.js:25:48)
    at /bitrise/src/node_modules/detox/src/devices/allocation/DeviceAllocator.js:17:20
    at traceCall (/bitrise/src/node_modules/detox/src/utils/trace.js:41:26)
    at DeviceAllocator.allocate (/bitrise/src/node_modules/detox/src/devices/allocation/DeviceAllocator.js:16:12)
    at Detox._doInit (/bitrise/src/node_modules/detox/src/Detox.js:189:54)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  errno: -13,
  syscall: 'mkdir',
  code: 'EACCES',
  path: '/root/.local/share/Detox'
}

Environment:

Android&Docker 20.4
Script step 1.1.6

Local reproduction

Can it be reproduced on your own Mac/PC by following our local debug guide? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what bitrise.io will get when it does a git clone in the clean environment! If possible please note which sections you tried.

Build log

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.