Open Closed

Error while updating from 8.0.1 to 8.1.1 #7100


User avatar
0
dkaczor created
  • ABP Framework version: v8.0.1 -> v8.1.1
  • UI Type: Angular
  • Database System: EF Core
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I am trying to update abp from 8.0.1 to 8.1.1. I did dotnet tool update -g Volo.Abp.Cli. Now when I run abp update in root directory all the nuget packages are updated but then it is stuck on Checking installed npm global packages... for around half an hour. After that the following exception is shown and the update crashes:

Volo packages are updated in XYZ solution
Checking installed npm global packages...
Updated @volosoft/abp.ng.theme.lepton-x to ~3.0.1 in \angular\package.json.
Updated @volo/abp.aspnetcore.mvc.ui.theme.leptonx to ~3.0.1 in \aspnet-core\src\MyProject.AuthServer\package.json.
One or more errors occurred. (startIndex ('-1') must be a non-negative value. (Parameter 'startIndex')
Actual value was -1.)
System.AggregateException: One or more errors occurred. (startIndex ('-1') must be a non-negative value. (Parameter 'startIndex')
Actual value was -1.)
 ---> System.ArgumentOutOfRangeException: startIndex ('-1') must be a non-negative value. (Parameter 'startIndex')
Actual value was -1.
   at System.ArgumentOutOfRangeException.ThrowNegative[T](T value, String paramName)
   at System.String.ThrowSubstringArgumentOutOfRange(Int32 startIndex, Int32 length)
   at System.String.Substring(Int32 startIndex, Int32 length)
   at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.ExtractVersions(String output) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 372
   at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.GetPackageVersionList(JProperty package, String workingDirectory) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 363
   at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.GetLatestVersion(JProperty package, Boolean includeReleaseCandidates, Boolean includePreviews, String workingDirectory, Boolean includePreRc) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 280
   at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.TryUpdatingPackage(String filePath, JProperty package, Boolean includePreviews, Boolean includeReleaseCandidates, Boolean switchToStable, String specifiedVersion, Boolean includePreRc) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 239
   at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.UpdatePackagesInFile(String filePath, Boolean includePreviews, Boolean includeReleaseCandidates, Boolean switchToStable, String specifiedVersion, Boolean includePreRc) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 179
   at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.<>c__DisplayClass18_0.<<Update>g__UpdateAsync|0>d.MoveNext() in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 80
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.WaitAllCore(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.WaitAll(Task[] tasks)
   at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.Update(String rootDirectory, Boolean includePreviews, Boolean includeReleaseCandidates, Boolean switchToStable, String version, Boolean includePreRc) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 88
   at Volo.Abp.Cli.Commands.UpdateCommand.UpdateNpmPackages(String directory, String version) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\UpdateCommand.cs:line 55
   at Volo.Abp.Cli.Commands.UpdateCommand.ExecuteAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\UpdateCommand.cs:line 49
   at Volo.Abp.Cli.CliService.RunInternalAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\CliService.cs:line 173
   at Volo.Abp.Cli.CliService.RunAsync(String[] args) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\CliService.cs:line 80
Unhandled exception. System.AggregateException: One or more errors occurred. (startIndex ('-1') must be a non-negative value. (Parameter 'startIndex')
Actual value was -1.)
 ---> System.ArgumentOutOfRangeException: startIndex ('-1') must be a non-negative value. (Parameter 'startIndex')
Actual value was -1.
   at System.ArgumentOutOfRangeException.ThrowNegative[T](T value, String paramName)
   at System.String.ThrowSubstringArgumentOutOfRange(Int32 startIndex, Int32 length)
   at System.String.Substring(Int32 startIndex, Int32 length)
   at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.ExtractVersions(String output) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 372
   at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.GetPackageVersionList(JProperty package, String workingDirectory) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 363
   at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.GetLatestVersion(JProperty package, Boolean includeReleaseCandidates, Boolean includePreviews, String workingDirectory, Boolean includePreRc) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 280
   at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.TryUpdatingPackage(String filePath, JProperty package, Boolean includePreviews, Boolean includeReleaseCandidates, Boolean switchToStable, String specifiedVersion, Boolean includePreRc) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 239
   at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.UpdatePackagesInFile(String filePath, Boolean includePreviews, Boolean includeReleaseCandidates, Boolean switchToStable, String specifiedVersion, Boolean includePreRc) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 179
   at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.<>c__DisplayClass18_0.<<Update>g__UpdateAsync|0>d.MoveNext() in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 80
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.WaitAllCore(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.WaitAll(Task[] tasks)
   at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.Update(String rootDirectory, Boolean includePreviews, Boolean includeReleaseCandidates, Boolean switchToStable, String version, Boolean includePreRc) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 88
   at Volo.Abp.Cli.Commands.UpdateCommand.UpdateNpmPackages(String directory, String version) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\UpdateCommand.cs:line 55
   at Volo.Abp.Cli.Commands.UpdateCommand.ExecuteAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\UpdateCommand.cs:line 49
   at Volo.Abp.Cli.CliService.RunInternalAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\CliService.cs:line 173
   at Volo.Abp.Cli.CliService.RunAsync(String[] args) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\CliService.cs:line 80
   at Volo.Abp.Cli.Program.Main(String[] args) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli\Volo\Abp\Cli\Program.cs:line 43
   at Volo.Abp.Cli.Program.<Main>(String[] args)

7 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    could you please share your package.json file? so that I will better assist you

    thanks

  • User Avatar
    0
    dkaczor created

    Here's angular package.json:

    {
      "name": "MyApp",
      "version": "0.0.0",
      "scripts": {
        "ng": "ng",
        "start": "ng serve --open",
        "build": "ng build",
        "build:prod": "ng build --configuration production",
        "watch": "ng build --watch --configuration development",
        "test": "ng test",
        "lint": "ng lint",
        "postinstall": "npm run compile:ivy",
        "compile:ivy": "yarn ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points --tsconfig './tsconfig.prod.json' --source node_modules"
      },
      "private": true,
      "dependencies": {
        "@abp/ng.components": "~8.0.1",
        "@abp/ng.core": "~8.0.1",
        "@abp/ng.oauth": "~8.0.1",
        "@abp/ng.setting-management": "~8.0.1",
        "@abp/ng.theme.shared": "~8.0.1",
        "@angular/animations": "^17.0.8",
        "@angular/common": "^17.0.8",
        "@angular/compiler": "^17.0.8",
        "@angular/core": "^17.0.8",
        "@angular/forms": "^17.0.8",
        "@angular/localize": "^17.0.8",
        "@angular/platform-browser": "^17.0.8",
        "@angular/platform-browser-dynamic": "^17.0.8",
        "@angular/router": "^17.0.8",
        "@types/dragula": "^3.7.4",
        "@volo/abp.commercial.ng.ui": "~8.0.1",
        "@volo/abp.ng.account": "~8.0.1",
        "@volo/abp.ng.audit-logging": "~8.0.1",
        "@volo/abp.ng.gdpr": "~8.0.1",
        "@volo/abp.ng.identity": "~8.0.1",
        "@volo/abp.ng.identity-server": "~8.0.1",
        "@volo/abp.ng.language-management": "~8.0.1",
        "@volo/abp.ng.openiddictpro": "~8.0.1",
        "@volo/abp.ng.payment": "~8.0.1",
        "@volo/abp.ng.saas": "~8.0.1",
        "@volo/abp.ng.text-template-management": "~8.0.1",
        "@volo/abp.ng.theme.lepton": "~8.0.1",
        "@volosoft/abp.ng.theme.lepton-x": "^3.0.1",
        "devextreme": "^23.2.3",
        "devextreme-angular": "^23.2.3",
        "devextreme-schematics": "^1.6.5",
        "dragula": "^3.7.3",
        "ng-gallery": "6.0.1",
        "ng2-dragula": "^5.0.1",
        "rxjs": "~7.8.0",
        "tslib": "^2.1.0",
        "zone.js": "~0.14.3"
      },
      "devDependencies": {
        "@abp/ng.schematics": "~8.0.1",
        "@angular-devkit/build-angular": "^17.0.9",
        "@angular-eslint/builder": "~17.2.0",
        "@angular-eslint/eslint-plugin": "~17.2.0",
        "@angular-eslint/eslint-plugin-template": "~17.2.0",
        "@angular-eslint/schematics": "~17.2.0",
        "@angular-eslint/template-parser": "~17.2.0",
        "@angular/cli": "^17.0.9",
        "@angular/compiler-cli": "^17.0.8",
        "@angular/language-service": "^17.0.8",
        "@types/jasmine": "~3.6.0",
        "@types/node": "^12.11.1",
        "@typescript-eslint/eslint-plugin": "^5.59.2",
        "@typescript-eslint/parser": "^5.59.2",
        "devextreme-cli": "1.6.5",
        "devextreme-themebuilder": "^23.2.3",
        "eslint": "^8.39.0",
        "jasmine-core": "~4.0.0",
        "karma": "~6.3.0",
        "karma-chrome-launcher": "~3.1.0",
        "karma-coverage": "~2.1.0",
        "karma-jasmine": "~4.0.0",
        "karma-jasmine-html-reporter": "^1.7.0",
        "ng-packagr": "^17.0.3",
        "typescript": "~5.2.2"
      }
    }
    

    Here's AuthServer's package.json:

    {
      "version": "0.1.0",
      "name": "my-app-authserver",
      "private": true,
      "dependencies": {
        "@volo/abp.aspnetcore.mvc.ui.theme.leptonx": "~3.0.0",
        "@volo/account": "~8.0.1"
      }
    }
    
    
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello again,

    Give a try by changing leptonX version in package.json file from 3.0.1 to 3.1.1 "@volosoft/abp.ng.theme.lepton-x": "~3.1.1", after that delete the yarn.lock file and run yarn command and then run npm start

    thanks

  • User Avatar
    0
    dkaczor created

    Here's the result of yarn command:

    yarn install v1.22.10
    info No lockfile found.
    [1/4] Resolving packages...
    error An unexpected error occurred: "https://registry.yarnpkg.com/@volo%2fabp.aspnetcore.mvc.ui.theme.leptonx: unable to verify the first certificate".
    info If you think this is a bug, please open a bug report with the information provided in "ProjectPath\\yarn-error.log".
    info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
    

    yarn-error.log:

    Arguments: 
      C:\Program Files\nodejs\node.exe C:\Users\DawidK\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js
    
    PATH: 
      ...
    
    Yarn version: 
      1.22.10
    
    Node version: 
      18.20.2
    
    Platform: 
      win32 x64
    
    Trace: 
      Error: unable to verify the first certificate
          at TLSSocket.onConnectSecure (node:_tls_wrap:1659:34)
          at TLSSocket.emit (node:events:517:28)
          at TLSSocket._finishInit (node:_tls_wrap:1070:8)
          at ssl.onhandshakedone (node:_tls_wrap:856:12)
    
    npm manifest: 
      {
        "version": "0.1.0",
        "name": "my-app-authserver",
        "private": true,
        "dependencies": {
          "@volo/abp.aspnetcore.mvc.ui.theme.leptonx": "~3.1.1",
          "@volo/account": "~8.0.1"
        }
      }
    
    yarn manifest: 
      No manifest
    
    Lockfile: 
      No lockfile
    
    
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    can you please update your package.json file as per my file package.json

    After that delete your yarn.lock file and node_modules folder Run commands : yarn and then npm start

    I think your npm packages are not updated properly.

    thanks,

  • User Avatar
    0
    dkaczor created

    Your link to package.json doesn't work. I am sure that my package.json file is correct.

    I did some research and turns out that after some update ESET started blocking https access for npm/node.js Here are some details: https://forum.eset.com/topic/40702-eset-ssl-protection-produces-an-invalid-certificate-chain-for-nodejs-apps/

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    please check the similar issue https://support.abp.io/QA/Questions/7086/Angular-app-does-not-working-after-upgrade-to-811 in this case my package.json worked for him. I am resharing it with you please recheck once.

    { "name": "MyApp", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve --open", "build": "ng build", "build:prod": "ng build --configuration production", "watch": "ng build --watch --configuration development", "test": "ng test", "lint": "ng lint" }, "private": true, "dependencies": { "@abp/ng.components": "~8.1.1", "@abp/ng.core": "~8.1.1", "@abp/ng.oauth": "~8.1.1", "@abp/ng.setting-management": "~8.1.1", "@abp/ng.theme.shared": "~8.1.1", "@volo/abp.commercial.ng.ui": "~8.1.1", "@volo/abp.ng.account": "~8.1.1", "@volo/abp.ng.audit-logging": "~8.1.1", "@volo/abp.ng.gdpr": "~8.1.1", "@volo/abp.ng.identity": "~8.1.1", "@volo/abp.ng.openiddictpro": "~8.1.1", "@volo/abp.ng.language-management": "~8.1.1", "@volo/abp.ng.saas": "~8.1.1", "@volo/abp.ng.text-template-management": "~8.1.1", "@volosoft/abp.ng.theme.lepton-x": "~3.1.1", "@angular/animations": "~17.1.0", "@angular/common": "~17.1.0", "@angular/compiler": "~17.1.0", "@angular/core": "~17.1.0", "@angular/forms": "~17.1.0", "@angular/localize": "~17.1.0", "@angular/platform-browser-dynamic": "~17.1.0", "@angular/platform-browser": "~17.1.0", "@angular/router": "~17.1.0", "rxjs": "~7.8.0", "tslib": "^2.0.0", "zone.js": "~0.14.0" }, "devDependencies": { "@abp/ng.schematics": "~8.1.1", "@angular-devkit/build-angular": "~17.1.0", "@angular-eslint/builder": "~17.2.0", "@angular-eslint/eslint-plugin": "~17.2.0", "@angular-eslint/eslint-plugin-template": "~17.2.0", "@angular-eslint/schematics": "~17.2.0", "@angular-eslint/template-parser": "~17.2.0", "@angular/cli": "~17.1.0", "@angular/compiler-cli": "~17.1.0", "@angular/language-service": "~17.1.0", "@types/jasmine": "~3.6.0", "@types/node": "^20.0.0", "@typescript-eslint/eslint-plugin": "6.9.1", "@typescript-eslint/parser": "6.9.1", "eslint": "^8.0.0", "jasmine-core": "~4.0.0", "karma": "~6.3.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.1.0", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.0.0", "typescript": "~5.3.0" } }

    I hope this will help you, thanks

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09