My sys admin and I wasted approximately two hours trying to diagnose and troubleshoot why ABP applications on my PC would not run. They would get to a certain point in the startup and then abort execution. I checked db logs and event viewer and nothing was present. We tried uninstalling Windows Updates, registry hacks, etc... no luck. Until I finally had the idea to try to run some abp cli commands and see what happens... that's when I finally received the message that my ABP account was not logged in.
This really needs better handling. Rather than silently failing on launch, there should be a clear AbpSessionException or more appropriate name with clear message: "You must login to your ABP account to run this application".
4 Answer(s)
-
0
- Solution
What happened
- ABP Commercial packages perform a license check at application startup. If the local ABP CLI session is missing/expired, protected packages fail the check and the application stops. The CLI shows a clear message (“You need to log in using abp login …”), but when only running the app you may not see that message in your console/logs depending on environment/logging configuration.
Immediate fix (so you can continue working)
- Log in to ABP Platform via CLI:
- abp login
- or abp login --device
- or abp login <username> -p ****** --password
- Restart your application.
- Log in to ABP Platform via CLI:
Make the failure visible next time
- Ensure the license error is written to logs:
- Set logging level to Information (or lower) for startup in your host project so the “ABP-LIC-ERROR” line is captured by your logger (console, Serilog, Application Insights, etc.).
- If you use containers or services that don’t show interactive console:
- Run abp login during your build/CI agent user context before publishing or running the app.
- Or run abp login --device in a provision step and persist the tool’s user profile for the service account.
- Ensure the license error is written to logs:
CI/CD and production guidance
- Never rely on an interactive login at deploy time. Use one of:
- Perform abp login in the build agent account and publish artifacts from that agent.
- For container images, run abp login in the Docker build (multi-stage) using the same user that runs the app, then copy the tool’s persisted credentials to the final image layer.
- If you see “ABP-LIC-ERROR - License check failed … You need to log in using the command abp login <username>”: this is the definitive signal that the environment running the app lacks a valid ABP CLI session. Fix by logging in as the account under which the app runs.
- Never rely on an interactive login at deploy time. Use one of:
Feature request acknowledgement
- Your request for a specific, explicit runtime exception (e.g., AbpSessionException with a “You must login to your ABP account…” message) makes sense. Today, the clear prompt is emitted by the CLI or appears as a license error log line. I’ve noted your suggestion so it can be considered to surface a dedicated, high-visibility exception including remediation steps when license validation fails at startup.
- Sources
- ABP CLI login command and session requirement:
- https://abp.io/docs/latest/cli/
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
-
0
This should not be logged as "Information", this should be thrown as a critical error if it's going to abort execution.
-
0
hi
We will check and improve this case.
This should not be logged as "Information", this should be thrown as a critical error if it's going to abort execution.
Can you share the current app logs?
Thanks.
-
0
We have file logging disabled - we prefer db logging. The db logs don't include any mention of needing to login. We also tried launching with
dotnet runand saw no messages about why the application was aborting."Serilog": { "Using": [ "Serilog.Sinks.MSSqlServer", "Serilog.Sinks.Console" ], "MinimumLevel": { "Default": "Information", "Override": { "Microsoft": "Warning", "Microsoft.EntityFrameworkCore": "Warning", "System": "Warning" } }, "Enrich": [ "FromLogContext", "WithMachineName" ], "Properties": { "Application": "Elite Tenants Platform" }, "WriteTo": [ { "Name": "MSSqlServer", "Args": { "connectionString": "Default", "sinkOptionsSection": { "tableName": "Logs", "autoCreateSqlTable": true }, "restrictedToMinimumLevel": "Warning", "columnOptionsSection": { "additionalColumns": [ { "ColumnName": "MachineName", "DataType": "varchar", "DataLength": 50 }, { "ColumnName": "UserId", "DataType": "uniqueidentifier", "NonClusteredIndex": true } ] } } } ] },