- ABP Framework version: v9.0.3
- UI Type: Blazor WASM
- Database System: EF Core (PostgreSQL)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
- Exception message and full stack trace: 2025-01-13 18:14:03 [23:14:03 ERR] ABP-LIC-ERROR - License check failed for 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Commercial-v9.0.3.0'.
2025-01-13 18:14:03 You need to log in using the command
abp login <username>
. 2025-01-13 18:14:03 For more information, contact to license@abp.io. - Steps to reproduce the issue: Create a new solution using ABP CLI, and configure it to run using docker compose. Under older versions of ABP we would put the "access-token.bin" file in /root/.abp/cli in the Docker container using the following code:
COPY ["../StructureCloud.NET/access-token.bin","/root/.abp/cli/"]
RUN chmod -R 777 /root/.abp/cli/
This used to work fine. Under ABP 9.0.3 and .NET 9, this no longer seems to work.
I tried using the contents of the access-token.bin file as a value for an environment variable named "AbpLicenseCode" but that did not work.
Based on other posts I have found (I did not find any documentation stating that a change was made), I tried adding an environment variable based on the appsettings.secrets.json that was created.
- AbpLicenseCode=PAB...
I am now getting different errors in each container. AuthServer: "ABP-LIC-ERROR - License check failed for 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Commercial-v9.0.3.0'" HttpApi: "ABP-LIC-ERROR - License check failed for 'Volo.Abp.LanguageManagement.Domain-v9.0.3.0'" WebPublic: "ABP-LIC-ERROR - License check failed for 'Volo.Abp.LanguageManagement.HttpApi-v9.0.3.0'"
Why was this changed, why wasn't it documented, and what is the procedure to make it work?
DO NOT tell me to use PRODUCTION mode, I am doing development in VIsual Studio using Docker Compose, and this is the development environment.
9 Answer(s)
-
0
Hi,
We didn't change the license check code, you can check this: https://abp.io/support/questions/5856/Unable-to-Apply-License-Code-for-Docker-Container-to-run-in-Debug-Mode#answer-3a0e07fe-d549-6d71-fb2c-f893ea965be1
-
0
I added debugging code:
2025-01-13 23:30:10 [04:30:10 INF] Location of access-token file: 2025-01-13 23:30:10 [04:30:10 INF] /root/.abp/cli/access-token.bin 2025-01-13 23:30:10 [04:30:10 INF] Access token file does not exist. 2025-01-13 23:30:10 [04:30:10 INF] Value of Environment variable 'AbpLicenseCode':PAB... (this value matches the appsettings.secrets.json file)
I then receive the error
ABP-LIC-ERROR - License check failed for 'Volo.CmsKit.Pro.Public.HttpApi-v9.0.3.0'.
If i remove the environment variable, the error I receive is:
ABP-LIC-0020 - License code not found! Ensure that your appsettings.json or appsettings.secrets.json has "AbpLicenseCode" key with your license code.
The license code is being found and loaded, why does it only work for some portions of the project?
-
0
2025-01-13 23:30:10 [04:30:10 INF] Access token file does not exist
I think because of the Access token file does not exist, please make sure they are in the container
-
0
It worked under ABP7, but that code no longer works under 9.0.3 which I stated in the initial post. Why doesn't it work as an environment variable?
-
0
I wasted more time doing what you said, even though I already explained that it did not work previously. Here are the results.
At startup, my debug code logged:
2025-01-14 08:23:19 [13:23:19 INF] Location of access-token file: 2025-01-14 08:23:19 [13:23:19 INF] /root/.abp/cli/access-token.bin 2025-01-14 08:23:19 [13:23:19 INF] Access token file exists. 2025-01-14 08:23:19 [13:23:19 INF] Value of Environment variable 'AbpLicenseCode': 2025-01-14 08:23:20 [13:23:20 ERR] ABP-LIC-0020 - License code not found! Ensure that your appsettings.json or appsettings.secrets.json has "AbpLicenseCode" key with your license code.
I don't care if I need to populate it as a file (the way it worked in the past), or as an environment variable in the container, but it needs to work. We have been trying to migrate to ABP 9 and this is preventing us from doing so. We cannot use our commercial subscription without being able to deploy and debug in containers, and this is advertised as a working scenario.
-
0
I tried using the contents of the access-token.bin file as a value for an environment variable named "AbpLicenseCode" but that did not work.
Do not use
access-token.bin
value asAbpLicenseCode
, they are different things.ABP-LIC-0020 - License code not found! Ensure that your appsettings.json or appsettings.secrets.json has "AbpLicenseCode" key with your license code.
The value of
AbpLicenseCode
should exist in theappsettings.secrets.json
file and should included in the publish folder.If your
AbpLicenseCode
code is invalid, you can try create a new project and copy it'sAbpLicenseCode
into your existing project -
0
These things are NOT both required under version 7 - we have the exact same configuration working with only the access-token.bin file in place - we are not setting any environment variables. Why has this been changed?
-
0
Also, why are 2 separate copies of our license required? Why would we be required to keep multiple pieces of the same information, and track it in different places? This is exactly the type of maintenance burden that ABP is supposed to alleviate
-
0
Hi,
Is your project working now?
These things are NOT both required under version 7 - we have the exact same configuration working with only the access-token.bin file in place - we are not setting any environment variables. Why has this been changed?
As I know, we didn't change anything about the license check.
Also, why are 2 separate copies of our license required? Why would we be required to keep multiple pieces of the same information, and track it in different places? This is exactly the type of maintenance burden that ABP is supposed to alleviate
access-token.bin
is used for local development, andAbpLicenseCode
is used for offline checking in the production environment(but also needs development env).They are usually already configured when you create a project, and in most cases, you don't need to care about them, but additional configuration is required when the container is deployed in a development environment, and we'll consider updating the documentation to mention this.
I apologize for the inconvenience caused to you