Titanium JIRA Archive
Appcelerator Daemon (DAEMON)

[DAEMON-323] Plugin not found error when running exec to fetch android or ios info

GitHub Issuen/a
TypeBug
PriorityHigh
StatusResolved
ResolutionFixed
Resolution Date2020-04-14T21:25:23.000+0000
Affected Version/sAppc Daemon 3.2.0
Fix Version/sAppc Daemon 4.0.0
Componentsappcd, appcd-core
Labelscb-next
ReporterSatyam Sekhri
AssigneeChris Barber
Created2020-02-12T22:21:21.000+0000
Updated2020-06-03T17:03:13.000+0000

Description

When trying to run the exec command to fetch android or iOS info the command fails while reporting missing plugins
$ appc appcd exec /android/latest/info/
{
  "stack": "PluginError: Failed to load plugin: Cannot find module 'androidlib'\n    at Function._resolveFilename (internal/modules/cjs/loader.js:636:15)\n    at PluginModule.require (/Users/satyamsekhri/.appcelerator/install/8.0.0-master.6/package/node_modules/appcd-plugin/dist/plugin-module.js:139:22)\n    at require (/Users/satyamsekhri/.appcelerator/install/8.0.0-master.6/package/node_modules/appcd-plugin/dist/plugin-module.js:181:36)\n    at Object.apply (/Users/satyamsekhri/.appcelerator/appcd/plugins/packages/@appcd/plugin-android/2.0.1/dist/android-info-service.js:17:42)\n    at PluginModule._compile (/Users/satyamsekhri/.appcelerator/install/8.0.0-master.6/package/node_modules/appcd-plugin/dist/plugin-module.js:196:19)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)\n    at PluginModule.load (internal/modules/cjs/loader.js:653:32)\n    at Function.load (/Users/satyamsekhri/.appcelerator/install/8.0.0-master.6/package/node_modules/appcd-plugin/dist/plugin-module.js:71:11)\n    at PluginModule.require (/Users/satyamsekhri/.appcelerator/install/8.0.0-master.6/package/node_modules/appcd-plugin/dist/plugin-module.js:142:23)\n    at require (/Users/satyamsekhri/.appcelerator/install/8.0.0-master.6/package/node_modules/appcd-plugin/dist/plugin-module.js:181:36)",
  "message": "Failed to load plugin: Cannot find module 'androidlib'",
  "status": 400,
  "statusCode": "400.1",
  "type": "error"
}
$ appc appcd exec /ios/latest/info/
{
  "stack": "PluginError: Failed to load plugin: Cannot find module 'ioslib'\n    at Function._resolveFilename (internal/modules/cjs/loader.js:636:15)\n    at PluginModule.require (/Users/satyamsekhri/.appcelerator/install/8.0.0-master.6/package/node_modules/appcd-plugin/dist/plugin-module.js:139:22)\n    at require (/Users/satyamsekhri/.appcelerator/install/8.0.0-master.6/package/node_modules/appcd-plugin/dist/plugin-module.js:181:36)\n    at Object.apply (/Users/satyamsekhri/.appcelerator/appcd/plugins/packages/@appcd/plugin-ios/2.0.2/dist/ios-info-service.js:17:38)\n    at PluginModule._compile (/Users/satyamsekhri/.appcelerator/install/8.0.0-master.6/package/node_modules/appcd-plugin/dist/plugin-module.js:196:19)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)\n    at PluginModule.load (internal/modules/cjs/loader.js:653:32)\n    at Function.load (/Users/satyamsekhri/.appcelerator/install/8.0.0-master.6/package/node_modules/appcd-plugin/dist/plugin-module.js:71:11)\n    at PluginModule.require (/Users/satyamsekhri/.appcelerator/install/8.0.0-master.6/package/node_modules/appcd-plugin/dist/plugin-module.js:142:23)\n    at require (/Users/satyamsekhri/.appcelerator/install/8.0.0-master.6/package/node_modules/appcd-plugin/dist/plugin-module.js:181:36)",
  "message": "Failed to load plugin: Cannot find module 'ioslib'",
  "status": 400,
  "statusCode": "400.1",
  "type": "error"
}
In this case, access was denied to the ~/.config directory which causes Yarn to error attempting to access the ~/.config/yarn/link directory as evident by the appcd log:
appcd:default-plugins Found yarn: /Users/satyamsekhri/.appcelerator/install/8.0.0-master.6/package/node_modules/.bin/yarn
appcd:default-plugins Found lerna: /Users/satyamsekhri/.appcelerator/install/8.0.0-master.6/package/node_modules/.bin/lerna
appcd:default-plugins Found installed plugin @appcd/plugin-android@1.5.2
appcd:default-plugins warn Plugin directory name mismatch: @appcd/plugin-android-2_0_1@2.0.1 found in @appcd/plugin-android, invalidating...
appcd:default-plugins Found installed plugin @appcd/plugin-genymotion@1.6.1
appcd:default-plugins warn Plugin directory name mismatch: @appcd/plugin-ios-1_5_2@1.5.2 found in @appcd/plugin-ios, invalidating...
appcd:default-plugins Found installed plugin @appcd/plugin-ios@2.0.2
appcd:default-plugins Found installed plugin @appcd/plugin-jdk@1.6.1
appcd:default-plugins Found installed plugin @appcd/plugin-system-info@1.5.1
appcd:default-plugins warn Plugin directory name mismatch: @appcd/plugin-system-info-2_0_0@2.0.0 found in @appcd/plugin-system-info, invalidating...
appcd:default-plugins Found installed plugin @appcd/plugin-titanium@1.8.1
appcd:default-plugins warn Skipping incompatible plugin: @appcd/plugin-windows@^1.5.2
appcd:default-plugins Downloading @appcd/plugin-system-info@2.0.0
appcd:default-plugins warn Skipping incompatible plugin: @appcd/plugin-windows@^2.0.1
appcd:default-plugins Downloading @appcd/plugin-android@2.0.1
appcd:default-plugins Downloading @appcd/plugin-ios@1.5.2
appcd:default-plugins Writing plugins/package.json
appcd:default-plugins Writing plugins/lerna.json
appcd:default-plugins Plugins dir: /Users/satyamsekhri/.appcelerator/appcd/plugins
appcd:default-plugins Executing: /Users/satyamsekhri/.appcelerator/appcd/node/v10.16.3/darwin/x64/node /Users/satyamsekhri/.appcelerator/install/8.0.0-master.6/package/node_modules/.bin/lerna bootstrap --no-progress
appcd:default-plugins:lerna cli v3.20.2
appcd:default-plugins:lerna versioning independent
appcd:default-plugins:lerna bootstrap root only
appcd:default-plugins:yarn    yarn install v1.21.1
appcd:default-plugins:lerna error An unexpected error occurred: "EACCES: permission denied, scandir '/Users/satyamsekhri/.config/yarn/link'".
appcd:default-plugins:yarn    info If you think this is a bug, please open a bug report with the information provided in "/Users/satyamsekhri/.appcelerator/appcd/plugins/yarn-error.log".
appcd:default-plugins:yarn    info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
appcd:default-plugins:lerna lerna ERR! yarn install --mutex network:42424 --non-interactive --emoji=false --ignore-engines --no-lockfile --no-progress --production exited 1 in 'root'
appcd:default-plugins:lerna lerna ERR! yarn install --mutex network:42424 --non-interactive --emoji=false --ignore-engines --no-lockfile --no-progress --production exited 1 in 'root'
appcd:default-plugins warn lerna exited with code 1
appcd:default-plugins Finished in 1.0 seconds
A possible resolution is to check if the ~/.config/yarn/link directory is writable (as well as its parent directories).

Comments

  1. Ewan Harris 2020-02-13

    Would yarn 2 really help here? It seems like the pnp stuff would just cause even more headaches for us
  2. Chris Barber 2020-04-14

    This has been resolved by https://github.com/appcelerator/appc-daemon/pull/468.

JSON Source