Skip to content

cli 8.1.1 and 8.1.2 not accounting for 'JSC' tag version - Resulting in error: Cannot read property 'version' of null #5574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cjohn001 opened this issue Sep 15, 2021 · 8 comments · Fixed by #5587
Labels

Comments

@cjohn001
Copy link

cjohn001 commented Sep 15, 2021

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 8.1.1 and 8.1.2
  • Cross-platform modules: "@nativescript/core": "~8.1.2", and 8.1.1
  • Android Runtime: 8.1.1
  • iOS Runtime: JSC
  • XCode Version: Version 12.5.1 (12E507)

Describe the bug

Hello together, since cli version 8.1.1 I am not able to build my project anymore. I run npm i --force manually, I have seen pinned issue. However, when running ns run ... the cli terminates immediately with the following error message:

Cannot read property 'version' of null

Anyone observing the issue. Has someone an idea how I can obtain more debug output?

@rigor789
Copy link
Member

Please run the command with --log trace and share the output.

@cjohn001
Copy link
Author

@rigor789 : Thanks for taking the time to look into it! Attached you find the trace log. Seems like the hooks are not generated.
I did a clean followed by npm i --force before.

Trying to get macOS version.
Exec system_profiler SPSoftwareDataType -detailLevel mini 
 stdout: Software:

    System Software Overview:

      System Version: macOS 11.5.2 (20G95)
      Kernel Version: Darwin 20.6.0
      Time since boot: 2 days 13:36

 
 stderr: 
macOS version based on system_profiler is 11.5.
Looking for project in '/Users/cjohn/Entwicklung/MND/my-nutri-diary/mnd'
Project directory is '/Users/cjohn/Entwicklung/MND/my-nutri-diary/mnd'.
Initializing project identifiers. Config:  {
  id: 'de.mynutridiary.mnd',
  main: 'app.js',
  appResourcesPath: 'App_Resources',
  webpackConfigPath: 'webpack.config.js',
  ios: { discardUncaughtJsExceptions: true },
  android: {
    discardUncaughtJsExceptions: true,
    codeCache: true,
    v8Flags: '--nolazy --expose_gc',
    markingMode: 'none'
  },
  appPath: 'src'
}
Loading extensions.
Collecting system information...
System information:
{
  "platform": "darwin",
  "shell": "/bin/zsh",
  "os": "Darwin Morpheus.fritz.box 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 x86_64\n",
  "procArch": "x64",
  "nodeVer": "15.14.0",
  "npmVer": "7.7.6",
  "nodeGypVer": null,
  "nativeScriptCliVersion": "8.1.2",
  "gitVer": "2.29.2",
  "dotNetVer": null,
  "javacVersion": "1.8.0_275",
  "javaVersion": "1.8.0_275",
  "javaPath": "/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java",
  "adbVer": "1.0.41",
  "androidInstalled": true,
  "monoVer": null,
  "gradleVer": "6.7.1",
  "isAndroidSdkConfiguredCorrectly": true,
  "xcodeVer": "12.5.1",
  "xcodeprojLocation": "/Users/cjohn/.rvm/rubies/ruby-2.7.2/bin/xcodeproj",
  "itunesInstalled": false,
  "cocoaPodsVer": "1.10.1",
  "isCocoaPodsWorkingCorrectly": true,
  "isCocoaPodsUpdateRequired": false,
  "pythonInfo": {
    "isInstalled": true,
    "isSixPackageInstalled": true
  }
}
Current CLI version:  8.1.2
Project dir from hooksArgs is: undefined.
Hooks directories: [ '/Users/cjohn/Entwicklung/MND/my-nutri-diary/mnd/hooks' ]
BeforeHookName for command resolveCommand is before-resolveCommand
Project dir from hooksArgs is: undefined.
Hooks directories: [ '/Users/cjohn/Entwicklung/MND/my-nutri-diary/mnd/hooks' ]
AfterHookName for command resolveCommand is after-resolveCommand
TypeError: Cannot read property 'version' of null
    at ProjectDataService.getInstalledRuntimePackage (/Users/cjohn/.nvm/versions/node/v15.14.0/lib/node_modules/nativescript/lib/services/project-data-service.js:384:66)
    at ProjectDataService.descriptor.<computed> (/Users/cjohn/.nvm/versions/node/v15.14.0/lib/node_modules/nativescript/lib/common/decorators.js:74:43)
    at ProjectDataService.getRuntimePackage (/Users/cjohn/.nvm/versions/node/v15.14.0/lib/node_modules/nativescript/lib/services/project-data-service.js:364:21)
    at IOSProjectService.getPlatformData (/Users/cjohn/.nvm/versions/node/v15.14.0/lib/node_modules/nativescript/lib/services/ios-project-service.js:74:61)
    at PlatformsDataService.getPlatformData (/Users/cjohn/.nvm/versions/node/v15.14.0/lib/node_modules/nativescript/lib/services/platforms-data-service.js:20:60)
    at PlatformValidationService.isPlatformSupportedForOS (/Users/cjohn/.nvm/versions/node/v15.14.0/lib/node_modules/nativescript/lib/services/platform/platform-validation-service.js:77:55)
    at DebugIOSCommand.<anonymous> (/Users/cjohn/.nvm/versions/node/v15.14.0/lib/node_modules/nativescript/lib/commands/debug.js:118:50)
    at Generator.next (<anonymous>)
    at /Users/cjohn/.nvm/versions/node/v15.14.0/lib/node_modules/nativescript/lib/commands/debug.js:14:71
    at new Promise (<anonymous>)
Initializing analytics statuses.
Trying to handle SIGINT event. CLI overrides this behavior and does not allow handling SIGINT as this causes issues with Ctrl + C in terminal.
The stackTrace of the location trying to handle SIGINT is:
    at process.on (/Users/cjohn/.nvm/versions/node/v15.14.0/lib/node_modules/nativescript/lib/nativescript-cli.js:26:28)
    at /Users/cjohn/.nvm/versions/node/v15.14.0/lib/node_modules/nativescript/node_modules/signal-exit/index.js:128:15
    at Array.filter (<anonymous>)
    at load (/Users/cjohn/.nvm/versions/node/v15.14.0/lib/node_modules/nativescript/node_modules/signal-exit/index.js:126:21)
    at module.exports (/Users/cjohn/.nvm/versions/node/v15.14.0/lib/node_modules/nativescript/node_modules/signal-exit/index.js:36:5)
    at Object.<anonymous> (/Users/cjohn/.nvm/versions/node/v15.14.0/lib/node_modules/nativescript/node_modules/proper-lockfile/lib/lockfile.js:331:1)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
spawn: /Users/cjohn/.nvm/versions/node/v15.14.0/bin/node "/Users/cjohn/.nvm/versions/node/v15.14.0/lib/node_modules/nativescript/lib/detached-processes/cleanup-process.js" "/Users/cjohn/.nvm/versions/node/v15.14.0/lib/node_modules/nativescript/lib/bootstrap.js"
Analytics statuses:  { TrackFeatureUsage: 'disabled', TrackExceptions: 'disabled' }

@cjohn001
Copy link
Author

@rigor789 : I just realized, that the issue is only appearing when I build for IOS. The android build runs through without issues. Have you had a chance to look into the issue?

@cjohn001 cjohn001 changed the title with cli 8.1.1 and 8.1.2 - Cannot read property 'version' of null IOS only: with cli 8.1.1 and 8.1.2 - Cannot read property 'version' of null Sep 25, 2021
@rigor789
Copy link
Member

@cjohn001 what are the devDependencies in package.json? I think I may have a clue, but would help confirm to know your devDependencies.

@cjohn001
Copy link
Author

cjohn001 commented Sep 25, 2021

@rigor789 these are the dependencies:

"dependencies": {
	"@angular/animations": "~12.2.5",
	"@angular/common": "~12.2.5",
	"@angular/compiler": "~12.2.5",
	"@angular/core": "~12.2.5",
	"@angular/forms": "~12.2.5",
	"@angular/platform-browser": "~12.2.5",
	"@angular/platform-browser-dynamic": "~12.2.5",
	"@angular/router": "~12.2.5",
	"@apollo/client": "~3.4.11",
	"@nativescript-community/ui-material-tabs": "~6.0.4",
	"@nativescript/angular": "~12.2.0",
	"@nativescript/core": "~8.1.2",
	"@nativescript/firebase": "~11.1.3",
	"@nativescript/iqkeyboardmanager": "~2.0.0",
	"@nativescript/localize": "~5.0.4",
	"@nativescript/secure-storage": "^3.0.0",
	"@nativescript/theme": "~3.0.1",
	"@nativescript/ui-charts": "^0.1.8",
	"apollo-angular": "~2.6.0",
	"apollo3-cache-persist": "~0.13.0",
	"d3-ease": "^2.0.0",
	"graphql": "^15.6.0",
	"graphql-tag": "^2.12.5",
	"intl": "^1.2.5",
	"moment": "^2.29.1",
	"nativescript-oauth2-ext": "file:../mnd-custom-plugins/nativescript-oauth2-ext/publish/package/nativescript-oauth2-ext-3.0.0.tgz",
	"nativescript-sqlite": "^2.8.5",
	"nativescript-ui-autocomplete": "^8.0.0",
	"nativescript-ui-calendar": "file:../mnd-custom-plugins/plugins-ui/dist/packages/ui-calendar/nativescript-ui-calendar-8.0.0.tgz",
	"nativescript-ui-gauge": "8.0.0",
	"reflect-metadata": "~0.1.13",
	"rxjs": "^7.3.0",
	"uuid": "^8.3.2",
	"zone.js": "~0.11.4"
},
"devDependencies": {
	"@angular/compiler-cli": "~12.2.5",
	"@graphql-codegen/cli": "^1.20.1",
	"@graphql-codegen/fragment-matcher": "^2.0.1",
	"@graphql-codegen/introspection": "^1.18.1",
	"@graphql-codegen/typescript": "^1.21.1",
	"@graphql-codegen/typescript-apollo-angular": "~2.3.1",
	"@graphql-codegen/typescript-operations": "^1.17.15",
	"@nativescript/android": "8.1.1",
	"@nativescript/ios": "JSC",
	"@nativescript/types": "~8.1.1",
	"@nativescript/webpack": "^5.0.0",
	"@ngtools/webpack": "~12.2.5",
	"@types/d3-ease": "^3.0.0",
	"@types/intl": "^1.2.0",
	"@types/node": "^13.13.19",
	"@types/uuid": "^8.3.0",
	"codelyzer": "^6.0.2",
	"keycloak-request-token": "^0.1.0",
	"sass": "^1.39.2",
	"ts-node": "^10.2.1",
	"tslint": "^6.1.3",
	"typescript": "~4.2.0"
},

npm --version 7.7.6
node --version v15.14.0

@rigor789
Copy link
Member

Try "@nativescript/ios": "6.5.4", instead of JSC - that's the same version. I'll see what we can do to account for tag versions...

@cjohn001
Copy link
Author

@rigor789: Thank you very much! This fixes the issue. Shall I leave the issue open, till this is fixed in the scripts?

@cjohn001 cjohn001 changed the title IOS only: with cli 8.1.1 and 8.1.2 - Cannot read property 'version' of null IOS only: cli 8.1.1 and 8.1.2 not accounting for 'JSC' tag version - Resulting in error: Cannot read property 'version' of null Sep 25, 2021
@cjohn001 cjohn001 changed the title IOS only: cli 8.1.1 and 8.1.2 not accounting for 'JSC' tag version - Resulting in error: Cannot read property 'version' of null cli 8.1.1 and 8.1.2 not accounting for 'JSC' tag version - Resulting in error: Cannot read property 'version' of null Sep 25, 2021
@rigor789
Copy link
Member

Sure, let's keep it open - I want to get this case fixed.

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

Successfully merging a pull request may close this issue.

2 participants