CognitixERP Troubleshooting & FAQ

Troubleshooting & FAQ

Common CognitixERP setup and runtime issues — startup, CORS, database, licensing, SMTP, permissions, and production.

Version 1.0.0 Offline HTML support@cognitivebd.com
Related docs: Installation Guide · Production Deployment Guide · Database/MIGRATION-NOTES.md · Database/SEED-DATA-NOTES.md

Startup & preloader

Q1. The WebApp preloader spins forever / blank white screen

Cause: Blazor WASM cannot reach the API, or cached WASM files are stale.

Fix:

  1. Confirm API is running: open https://localhost:7149/api/system/version
  2. Check apps/Cognitix.WebApp/wwwroot/appsettings.jsonApiBaseUrl must match API URL (trailing slash required)
  3. Hard refresh: Ctrl+Shift+R
  4. DevTools → Application → Clear site data, then reload
  5. Delete bin and obj under WebApp, rebuild, run again
Q2. API crashes immediately on startup

Common message: JWT signing key is missing or too short

Set Jwt:Key in API appsettings.json with at least 32 characters, or set environment variable COGNITIX_JWT_KEY.

Also verify Jwt:Issuer and Jwt:Audience are not empty.

Q3. Browser warns about HTTPS / certificate not trusted (development)

Run once: dotnet dev-certs https --trust

Or use the HTTP profile (update CORS origins and ApiBaseUrl to http:// ports consistently).

CORS & API connection

Q4. Browser console shows CORS policy blocked

Example: blocked by CORS policy: No 'Access-Control-Allow-Origin' header

Add your WebApp origin to API appsettings.json:

"Cors": {
  "AllowedOrigins": [
    "https://localhost:7019",
    "http://localhost:5281"
  ]
}

Origin must match exactly — scheme (https vs http) and port included.

Q5. WebApp loads but all API calls fail / network error
  1. API running? Test /api/system/version in browser
  2. ApiBaseUrl in WebApp matches API base address
  3. Firewall not blocking local ports 7149 / 7019
  4. If using IIS or reverse proxy, confirm published API URL is updated in WebApp config

Login & JWT

Q6. Invalid username or password (default admin)

Use the admin account created in Setup Wizard Step 2. There is no default production password shipped with the product.

Ensure Step 1 (database) completed successfully before Step 2. See Database/SEED-DATA-NOTES.md.

Q7. 401 Unauthorized after login or on API calls
  1. Jwt:Issuer / Jwt:Audience should match your API public URL
  2. Clear browser storage (localStorage) and log in again
  3. Check token expiry — default 60 minutes in AccessTokenMinutes
  4. Logout and verify refresh token is rejected (expected security behaviour)
Q8. Too many login attempts / account locked

Rate limiting applies to login endpoint. Wait ~15 minutes or reset via database/admin procedure in development.

Database & migrations

Q9. Do I need to run dotnet ef or migration scripts?

No for normal install or updates. Use Setup Wizard Step 1 Continue — the system prepares the database automatically.

Support/recovery only: Database/apply-migrations.ps1 — see Database/MIGRATION-NOTES.md.

Q10. dotnet ef: command not found (support script)
dotnet tool install --global dotnet-ef

Restart terminal. Buyers do not need this for Setup Wizard install.

Q11. Cannot open database / login failed for user

Before Setup Wizard Step 1: API logs may show “Cannot open database” — this is normal until you complete Step 1.

  1. Database service is running (SQL Server / PostgreSQL / MySQL)
  2. In Step 1, engine + server host/port/credentials match your server
  3. Login has permission to create/alter tables (and create database if it does not exist)
  4. You entered the database name you want — there is no required name CognitixERP
  5. PostgreSQL: use host 127.0.0.1 when DB is on the same VPS; check pg_hba.conf allows the API user
  6. MySQL: confirm port (often 3306) and that the user can create schemas
Q12. Invalid object name / table does not exist

CognitixERP uses 12 EF Core DbContexts in one database. Normal buyers use Setup Wizard Step 1 — not manual scripts.

If Step 1 fails: drop the entire database you chose in the wizard and retry, or use Database/apply-migrations.ps1 (support).

After setup is complete, API restart auto-applies pending schema updates on startup.

Q13. Database setup failed / object already exists

Database was partially set up from a previous attempt. Drop the entire database name you used in Setup Wizard Step 1 and run Step 1 again.

Q14. Setup complete but WebApp config block is empty / login fails

Copy or download the JSON from the Setup Wizard completion screen into:

apps/Cognitix.WebApp/wwwroot/appsettings.json

Example:

{ "ApiBaseUrl": "https://localhost:7149/" }

Trailing slash required. Must match the API URL from Step 1. See Installation Guide §7.

License & CognitiveCircle

Q15. Step 3 fails — SSL error / CognitiveCircle unreachable

Development: With Licensing:SkipInDevelopment=true and ASPNETCORE_ENVIRONMENT=Development, the 14-day trial can start locally. Purchase-code activation still calls CognitiveCircle and rejects invalid codes.

Production: Requires SkipInDevelopment=false, internet access to https://api.cognitivebd.com, and valid product ApiKey / HmacSecret.

SSL errors in development usually mean the API is not running in Development mode or skip is disabled. Cognitix ERP Linux samples use Kestrel on 127.0.0.1:5100 (not 5000).

Q15b. Company logo / favicon does not load (401 or blank image)
  1. nginx must proxy /uploads/ (and preferably /api/uploads/) to the API — see deploy/hetzner/nginx-site.conf.example
  2. In Setup Wizard, API URL must be the site origin without /api (e.g. https://yourcompany.com)
  3. Direct test: curl -I https://yourcompany.com/uploads/logos/YOUR_FILE.png should return 200 and an image content type
Q15c. CI build fails: Cognitix.Licensing not found / CS0234

The buyer package uses DLLs under lib/Cognitix.Licensing/. Commit those three DLLs and publish with -p:BuyerBuild=true (the sample deploy.yml detects this automatically).

Q16. How do I know real Envato activation worked?

In production (not dev skip):

  • GET /api/license/status returns Active or Trial — not DevelopmentSkipped
  • SQL: LicensedItemId, LicensedItemTitle, PurchaseCodeLast4 saved in Licensing.InstallationSettings
  • CognitiveCircle Admin → Licenses shows the buyer row
Q17. Activated on wrong hostname / subdomain error

app.example.com and example.com are separate domains. Regular license allows one active domain per purchase code.

Activate on the exact URL your users open in the browser. If you moved hosts, contact support for a domain reset (Regular) or use Settings → License on the correct URL.

Q18. License was revoked — still shows Active briefly

If CognitiveCircle marks your activation Inactive/Revoked, CognitixERP locks on the next heartbeat or Re-verify (typically within 24 hours, or immediately if you click Re-verify).

72-hour offline grace applies only when CognitiveCircle is unreachable (network/server outage) — not when the server explicitly reports revoked.

Q19. No internet — how long can I use the ERP?

With a previously verified Active license, ERP allows up to OfflineGraceHours (default 72) while CognitiveCircle cannot be reached. After that, re-verify when connectivity returns.

Email / SMTP

Q20. Email not sending / SMTP errors

Configure SmtpSettings in API appsettings.json or optional smtp.settings.json next to the API project.

  • Use valid host, port, SSL setting for your provider
  • Gmail requires app password or OAuth — not plain account password in many cases
  • Test from Settings → Email in the WebApp after SMTP is configured

Never commit real SMTP passwords to source control.

UI & permissions

Q21. Page missing from menu / 403 Forbidden

Role & Permission system hides pages the user cannot access. Assign correct role in User Management or log in as admin.

Branch-scoped users only see data for their assigned branch.

Q22. Dark mode text hard to read / invisible icons

Toggle theme from user profile/preferences. If custom CSS was added, ensure it uses theme CSS variables (--cgx-*) from shared stylesheets.

Q23. Amounts show wrong decimal places (always 2)

Decimal places come from Currency Management (e.g. JPY = 0, KWD = 3). Configure currency in Financials → Currency; do not hardcode N2 in custom code.

Production deployment (summary)

Q24. Production CORS — what origins should I allow?

Only your real WebApp URL(s), e.g. https://yourcompany.com. Remove all localhost entries in production appsettings.Production.json or environment variables.

Add every hostname users open in the browser (including www aliases). Do not use wildcard *.

"Cors": {
  "AllowedOrigins": [ "https://yourcompany.com" ]
}

Environment variable: Cors__AllowedOrigins__0=https://yourcompany.com

Full steps: Production Deployment Guide §5.

Q25. Production JWT configuration
  • Set strong COGNITIX_JWT_KEY via environment variable (32+ chars) — do not commit keys to source control
  • For same-origin deploy, set Jwt:Issuer and Jwt:Audience to the public site origin (same as ApiBaseUrl without trailing slash), e.g. https://yourcompany.com
  • Always use HTTPS in production
  • Use the admin account created in Setup Wizard Step 2 — change password after first login
COGNITIX_JWT_KEY=<generated-key>
Jwt__Issuer=https://yourcompany.com
Jwt__Audience=https://yourcompany.com

Full steps: Production Deployment Guide §4.

Q26. Still stuck?

See Please Contact us below, or email support@cognitivebd.com with:

  • CodeCanyon purchase code
  • CognitixERP version (GET /api/system/version)
  • Steps to reproduce + screenshots / API log excerpt
  • OS, .NET version (dotnet --version), database engine (SQL Server / PostgreSQL / MySQL)

Included support: 6 months from purchase.

Please Contact us

  1. Sign up at https://cognitivebd.com
  2. Create a Support Ticket.
  3. Within 48hr we will reply.

Or email support@cognitivebd.com with your purchase code, version, and screenshots/logs.