Titanium JIRA Archive
Appcelerator Daemon (DAEMON)

[DAEMON-307] Plugins not installed if access denied to yarn links directory

GitHub Issuen/a
TypeBug
PriorityCritical
StatusResolved
ResolutionFixed
Resolution Date2020-01-06T22:52:50.000+0000
Affected Version/sAppc Daemon 3.1.0
Fix Version/sAppc Daemon 3.2.0
Componentsappcd-default-plugins
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2019-12-06T19:31:38.000+0000
Updated2020-01-07T11:00:07.000+0000

Description

If the yarn links directory exists, but access is denied, it blows up and the daemon does not properly install any plugins.
2019-12-06T17:56:15.849Z appcd:default-plugins Found yarn: /Users/lchoudhary/.appcelerator/install/8.0.0-master.2/package/node_modules/.bin/yarn
2019-12-06T17:56:15.881Z appcd:default-plugins Found lerna: /Users/lchoudhary/.appcelerator/install/8.0.0-master.2/package/node_modules/.bin/lerna
2019-12-06T17:56:15.886Z appcd:server warn { Error: EACCES: permission denied, scandir '/Users/lchoudhary/.config/yarn/link'
2019-12-06T17:56:15.886Z appcd:server warn     at Object.readdirSync (fs.js:790:3)
2019-12-06T17:56:15.886Z appcd:server warn     at GlobSync._readdir (/Users/lchoudhary/.appcelerator/install/8.0.0-master.2/package/node_modules/glob/sync.js:288:41)
2019-12-06T17:56:15.886Z appcd:server warn     at GlobSync._processReaddir (/Users/lchoudhary/.appcelerator/install/8.0.0-master.2/package/node_modules/glob/sync.js:137:22)
2019-12-06T17:56:15.886Z appcd:server warn     at GlobSync._process (/Users/lchoudhary/.appcelerator/install/8.0.0-master.2/package/node_modules/glob/sync.js:132:10)
2019-12-06T17:56:15.886Z appcd:server warn     at new GlobSync (/Users/lchoudhary/.appcelerator/install/8.0.0-master.2/package/node_modules/glob/sync.js:48:10)
2019-12-06T17:56:15.886Z appcd:server warn     at Function.globSync [as sync] (/Users/lchoudhary/.appcelerator/install/8.0.0-master.2/package/node_modules/glob/sync.js:26:10)
2019-12-06T17:56:15.886Z appcd:server warn     at /Users/lchoudhary/.appcelerator/install/8.0.0-master.2/package/node_modules/globule/lib/globule.js:94:17
2019-12-06T17:56:15.886Z appcd:server warn     at /Users/lchoudhary/.appcelerator/install/8.0.0-master.2/package/node_modules/globule/lib/globule.js:29:32
2019-12-06T17:56:15.886Z appcd:server warn     at arrayEach (/Users/lchoudhary/.appcelerator/install/8.0.0-master.2/package/node_modules/globule/node_modules/lodash/lodash.js:516:11)
2019-12-06T17:56:15.886Z appcd:server warn     at Function.forEach (/Users/lchoudhary/.appcelerator/install/8.0.0-master.2/package/node_modules/globule/node_modules/lodash/lodash.js:9342:14)
2019-12-06T17:56:15.886Z appcd:server warn     at processPatterns (/Users/lchoudhary/.appcelerator/install/8.0.0-master.2/package/node_modules/globule/lib/globule.js:25:5)
2019-12-06T17:56:15.886Z appcd:server warn     at Object.globule.find (/Users/lchoudhary/.appcelerator/install/8.0.0-master.2/package/node_modules/globule/lib/globule.js:93:17)
2019-12-06T17:56:15.886Z appcd:server warn     at find (/Users/lchoudhary/.appcelerator/install/8.0.0-master.2/package/node_modules/appcd-default-plugins/dist/index.js:119:28)
2019-12-06T17:56:15.886Z appcd:server warn   errno: -13,
2019-12-06T17:56:15.886Z appcd:server warn   syscall: 'scandir',
2019-12-06T17:56:15.886Z appcd:server warn   code: 'EACCES',
2019-12-06T17:56:15.886Z appcd:server warn   path: '/Users/lchoudhary/.config/yarn/link' }
Reading the yarn links directory is an optional check and thus we simply need to gracefully handle access and continue to install the plugins.

Comments

  1. Chris Barber 2020-01-06

    PR: https://github.com/appcelerator/appc-daemon/pull/445
  2. Ewan Harris 2020-01-07

    [~cbarber] Let me know when this is released so I can include it in the CLI

JSON Source