[AI-Bot] said:
Licensing (ABP Commercial) for your isolated integration-test host (10.7.0)
- Supported input (in-memory config)
- Yes. ABP licensing reads the license code from configuration by key
AbpLicenseCode. Supplying it via an in-memory configuration provider is a supported approach (it’s still justIConfiguration).- Minimal pattern (in your test-host builder):
var builder = WebApplication.CreateEmptyBuilder(new WebApplicationOptions { EnvironmentName = Environments.Development }); builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> { ["AbpLicenseCode"] = "<YOUR_LICENSE_CODE>" });
Why it still fails in Development/Debug without “login”
- In Development / Debug-like scenarios, ABP Commercial licensing can require a local login/token file (created by
abp login <username>) in addition toAbpLicenseCode.- ABP support guidance for similar cases indicates:
- If you must run in Development / Debug, you may need to provide the local license/token artifact (e.g.,
access-token.bin), or log in on that machine/container via ABP CLI. This is why your isolated host (with no secrets/env) fails early duringInitializeApplicationAsync.Developer authentication: ABP Studio sign-in vs
abp login
- ABP Studio sign-in is not the same as ensuring the runtime environment (the user account executing tests) has the ABP CLI login token available.
- For licensing checks that require login, the machine/user running the tests should have executed:
abp login <username>- For containers/isolated environments, ABP support guidance indicates copying the CLI token file into the expected path inside the environment: - **Windows:** `%UserProfile%\.abp\cli\access-token.bin` - (This path is explicitly referenced in support guidance.)
Network requirements / offline vs online / proxies / transmitted data
- No verified, detailed official source in the provided context that enumerates destinations/ports/protocols, payload contents, or proxy/TLS inspection behavior for the license server.
- Practically: if your test fixture blocks outbound traffic at process/network level, you should assume license validation may need outbound HTTPS access unless you rely on cached/offline artifacts (token/license files). (No verified source available for the low-level details you requested.)
Cache / grace period / where stored / per-process vs per-host
- No verified source in the provided context that documents cache/grace-period semantics and storage locations for ABP Commercial license validation in 10.7.
CI unattended authentication (integration tests)
- From the available verified support guidance: unattended environments typically need either
- running
abp loginin the CI environment (which may count as a development machine), or- provisioning the expected token/license artifact files into the runner environment.
- For account ownership, renewal, ephemeral runners, and concurrency/machine limits: no verified source available in the provided context.
Minimal, supported example for integration tests
- ABP’s recommended baseline is to use the built-in integration test infrastructure (instead of building a fully custom
CreateEmptyBuilderhost), then layer your customizations (SQLite in-memory, TestServer, etc.) on top of that.- Use/align with the official “Integration Tests” setup as the foundation.
How to collect a “safe” diagnostic
- Since your process terminates during initialization, the best you can do without modifying internals is:
- enable maximum logging early (before
InitializeApplicationAsync)- ensure logs are flushed (Serilog/File logger) so you capture the first licensing error message that triggers termination.
- A full internal call stack for the licensing failure is not covered by verified sources in the provided context.
- Studio AI context-limit/timeout errors + credits/refund + how to export IDs
- No verified ABP source was returned in the provided context that documents:
- exact Studio AI context token accounting knobs (“context limit”, “Max”),
- compaction/summaries/checkpoints behavior,
- billing rules for over-context rejections, timeouts, transport failures, retries,
- or where/how to export session IDs / request IDs / usage records in ABP Studio 3.1.4.
- Therefore I can’t provide definitive, verified instructions or policy details for these Studio AI credit/refund and diagnostics questions.
- Sources (validated)
- https://abp.io/docs/10.7/testing/integration-tests
- https://abp.io/support/questions/9650
- https://abp.io/support/questions/9640
- https://abp.io/support/questions/1471/containerizing-abp-application
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.
Thanks for the initial response. It helps identify the likely direction, but it does not yet resolve either issue. Please keep the ticket open and route it to an ABP engineer and the Studio/billing team.
For licensing, please confirm the supported procedure specifically for ABP Commercial 10.7.0 on our local Windows Development TestServer host:
The observed error is currently ABP-LIC-0020. We have not established that a token or network failure occurs after supplying the license code. Please distinguish confirmed requirements from possibilities.
For ABP Studio 3.1.4:
The official AI Agent Configuration documentation describes Context Limit and Max. Please explain how these apply to our version, and the supported way to compact or transfer a session and reconnect its saved plan without repeating completed work.
Please also explain how to determine whether a file operation completed before a timeout, and how to export session/request IDs and usage records.
Finally, please review the billing questions: are context-limit rejections, timeouts, transport failures and retries charged? Can you investigate the affected requests and restore/refund any eligible credits? Please tell us what evidence you need and how to submit it privately. We are not assuming all failed requests were charged.
We can provide sanitized diagnostics, but will not upload license codes, tokens or secrets files. Please provide safe, targeted logging instructions rather than unrestricted maximum logging.
Thank you.
Hi ABP team, We need help with two issues affecting the same development batch: Commercial licensing in an isolated integration-test host, and repeated Studio AI context-limit/timeout errors. We have reviewed the documentation, checked the samples index and searched existing support discussions. We still need a confirmed 10.7 licensing approach and practical guidance for continuing AI-assisted work without repeatedly rebuilding context and consuming additional credits.
ABP-LIC-0020 - License code not found! Ensure that your appsettings.json or appsettings.secrets.json has "AbpLicenseCode" key with your license code. The diagnostic sequence reaches: CreateEmptyBuilder AddApplicationAsync Build InitializeApplicationAsync OnPreApplicationInitialization License errors Process exit The recorded host exit code was -42, with zero tests executed. We do not have a full exception stack from the licensing component. A temporary process-exit diagnostic captured only the exit callback, not the original licensing call stack. Please advise how to collect the appropriate diagnostic safely. Steps to reproduce in our fixture