I am encountering an error trying to update a project to the latest release. The error occurs both the CLI and with Suite.
Suite - upgrade all packages
Starting Suite v4.2.0 ... Opening http://localhost:3000 Press Ctrl+C to shut down. [18:05:45 ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }
[18:05:45 ERR] Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at Volo.Abp.Cli.ProjectModification.VoloNugetPackagesVersionUpdater.GetLatestVersionFromMyGet(String packageId) in D:\github\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\VoloNugetPackagesVersionUpdater.cs:line 222 at Volo.Abp.Cli.ProjectModification.VoloNugetPackagesVersionUpdater.UpdateSolutionAsync(String solutionPath, Boolean includePreviews, Boolean includeReleaseCandidates, Boolean switchToStable, Boolean checkAll, String version) in D:\github\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\VoloNugetPackagesVersionUpdater.cs:line 40 at Volo.Abp.Cli.Commands.UpdateCommand.UpdateNugetPackages(CommandLineArgs commandLineArgs, String directory, String version) in D:\github\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\UpdateCommand.cs:line 70 at Volo.Abp.Cli.Commands.UpdateCommand.ExecuteAsync(CommandLineArgs commandLineArgs) in D:\github\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\UpdateCommand.cs:line 41 at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Services.SolutionService.UpdatePackagesInSolutionAsync(String solutionPath, Boolean npm, Boolean nuget) at Volo.Abp.Suite.Controllers.AbpSuiteController.UpdatePackagesInSolution(String solutionPath, Boolean npm, Boolean nuget) at lambda_method1659(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.
CLI - abp update from the aspnet-core directory
[18:02:34 INF] ABP CLI (https://abp.io) [18:02:34 INF] Version 4.2.0 (Stable) [18:02:35 WRN] ABP CLI has a newer stable version 4.2.1, please update to get the latest features and fixes. [18:02:35 WRN] [18:02:35 WRN] Update Command: [18:02:35 WRN] dotnet tool update -g Volo.Abp.Cli [18:02:35 WRN] [18:02:37 ERR] Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at Volo.Abp.Cli.ProjectModification.VoloNugetPackagesVersionUpdater.GetLatestVersionFromMyGet(String packageId) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\VoloNugetPackagesVersionUpdater.cs:line 222 at Volo.Abp.Cli.ProjectModification.VoloNugetPackagesVersionUpdater.UpdateSolutionAsync(String solutionPath, Boolean includePreviews, Boolean includeReleaseCandidates, Boolean switchToStable, Boolean checkAll, String version) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\VoloNugetPackagesVersionUpdater.cs:line 40 at Volo.Abp.Cli.Commands.UpdateCommand.UpdateNugetPackages(CommandLineArgs commandLineArgs, String directory, String version) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\UpdateCommand.cs:line 70 at Volo.Abp.Cli.Commands.UpdateCommand.ExecuteAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\UpdateCommand.cs:line 41 at Volo.Abp.Cli.CliService.RunAsync(String[] args) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\CliService.cs:line 59
@bunyamin, thank you for the assistance. We were able to deploy our application successfully as a single application in Azure. We may still have issues deploying it behind an SSL terminated load balancer, but that has been deferred to a later date.
Hello @MILLENNIUM, We have not solved the issue with deploying this as a single website with the angular client as a sub folder. We have been successful deploying them as 2 separate web applications.
Here is an exampe of the environment.ts file. This is the local setup, we replace the localhost with a public DNS for our test/production sites.
import { Environment } from '@abp/ng.core';
const baseUrl = 'https://localhost:44316/client';
export const environment = {
production: false,
application: {
baseUrl,
name: 'Portal',
},
oAuthConfig: {
issuer: 'https://localhost:44316',
redirectUri: baseUrl,
clientId: 'Portal_App',
responseType: 'code',
scope: 'offline_access openid profile email phone Portal',
},
apis: {
default: {
url: '',
rootNamespace: 'OtisEd.Portal',
},
},
} as Environment;
Hi @alper,
After upgrading my CLI and Suite to 4.2 and everything worked correctly. For future reference, does Suite always generate based on the latest stable version regardless of which version I have installed? I do not see an option to tell Suite to use --preview or a specific version.
I am not sure whether to report this under 4.2 or 4.1. I just generated a new project using Suite. My ABP CLI and Suite are version 4.1.2. After creating a new tiered MVC project, I am getting a bunch of errors about missing Volo.CmsKit.Pro* packages.
Severity Code Description Project File Line Suppression State Error NU1101 Unable to find package Volo.CmsKit.Pro.HttpApi. No packages exist with this id in source(s): ABP Commercial NuGet Source, BlazoriseMyGet, Microsoft Visual Studio Offline Packages, nuget.org, OtisEd NuGet Source IronGlass.HttpApi C:\AppDev\IronGlass\IronGlass\aspnet-core\src\IronGlass.HttpApi\IronGlass.HttpApi.csproj 1
Here is an excerpt from the *.Domain csproj file. <ItemGroup> <PackageReference Include="Volo.Abp.Emailing" Version="4.2.0" /> <PackageReference Include="Volo.Abp.Identity.Domain" Version="4.2.0" /> <PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="4.2.0" /> <PackageReference Include="Volo.Abp.IdentityServer.Domain" Version="4.2.0" /> <PackageReference Include="Volo.Abp.PermissionManagement.Domain.IdentityServer" Version="4.2.0" /> <PackageReference Include="Volo.Abp.BackgroundJobs.Domain" Version="4.2.0" /> <PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="4.2.0" /> <PackageReference Include="Volo.Abp.FeatureManagement.Domain" Version="4.2.0" /> <PackageReference Include="Volo.Abp.SettingManagement.Domain" Version="4.2.0" /> <PackageReference Include="Volo.Abp.BlobStoring.Database.Domain" Version="4.2.0" /> <PackageReference Include="Volo.Abp.LanguageManagement.Domain" Version="4.2.0" /> <PackageReference Include="Volo.Abp.LeptonTheme.Management.Domain" Version="4.2.0" /> <PackageReference Include="Volo.Saas.Domain" Version="4.2.0" /> <PackageReference Include="Volo.Abp.TextTemplateManagement.Domain" Version="4.2.0" /> <!-- <TEMPLATE-REMOVE IF-NOT='CMS-KIT'> --> <PackageReference Include="Volo.CmsKit.Pro.Domain" Version="4.2.0" /> <!-- </TEMPLATE-REMOVE> --> </ItemGroup>
Beyond the obvious issues. Why does Sutie v4.1 generate a project with 4.2 references?
In that case, the Account Linking option should not show up when the authentication method is openid. The user experience is broken! The end user sees an option which works (links their account on the backend), but breaks their ability to return to the front end and does not actually change their logged in account for the front end application.
A further note on this. While the account profile pages show the new user, if you manually change the URL in the browser to the client app, the logged in user changes back (or stays depending on your perspective) to the original user account.
Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.
Login in as User A to Tenant B
Login as a linked user (different tenant, in case that matters)
**The user is now logged into the new account, but the Return to application button has disappeared. ** The user is now stranded in the MVC application for the identity management with no way back to the client application.
Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.
I am running into 2 issues which may be lack of knowledge.
When I add the RequiresFeature to a method or app service class, I cannot figure out how to get the application tests to work. It fails with a permissions issue since the feature is not "enabled" for the test case. Trying to add programmatically enable the feature has not worked so far. Is there an example available for how to test a service which requires a feature?
When a feature has permissions associated with it, how do I only show the permissions when it is enabled for a tenant? I added a feature check before adding the permissions in the Permission definition provider, but this causes errors if you log out of a tenant who has the feature and then log into a client which does have the feature. The call to AbpConfiguration is not reset and the permissions are not listed there. Is there an example available for how to correctly hide permissions behind a feature?
The issue with the persisted keys does not occur when the API is the root application of a website. I backed up and decided to attempt combining the applications so that the API is at the root and the angular client is deployed as a subfolder within the API.
In the Startup.cs file of the HttpApi.Host project, I added the following code to the ConfigureServices method:
services.AddSpaStaticFiles(configuration =>
{
configuration.RootPath = "client";
});
In the Configure method, I added the following:
app.UseSpaStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(
Path.Combine(env.ContentRootPath, "client")),
RequestPath = "/client"
});
app.UseSpa(spa =>
{
spa.Options.SourcePath = "client";
});
I created a local environment in Angular with the URI settings needed for this configuration, ran ng build for the new environment with a base-href value of /client/ and then used xcopy to place resulting dist files in my API project.
With this configuration, I can access both the client and the API locally. However, while the login/logout process works and the GET methods from the API work for the client, as soon as I attempt to post something from the client, I get an error which is not sent by the server and the following entry in the log files.
[ERR] The required antiforgery header value "RequestVerificationToken" is not present.