Error map

No database provider has been configured InvalidOperationException: No database provider has been configured for this DbContext

.NET · layer 4, Application & API

Open the full error page →

Centre: this error. First ring: errors it is linked with (12). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

No database provider has been configured — InvalidOperationException: No database provider has been configured for this DbContext (.NET)No database…DisallowedHost — django.core.exceptions.DisallowedHost: Invalid HTTP_HOST header: 'x'. You may need to add 'x' to ALLOWED_HOSTS. (Python)DisallowedHostDataSource url not specified — Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. (Java)DataSource url not …ImproperlyConfigured — django.core.exceptions.ImproperlyConfigured: settings are not configured / SECRET_KEY must not be empty (Python)ImproperlyConfiguredredirect_uri_mismatch — OAuth Error: redirect_uri_mismatch (Authentication)redirect_uri_mismat…1046 — MySQL ERROR 1046 (3D000): No database selected (MySQL)1046PHP mail — PHP mail() returns false / emails not delivered (PHP)PHP mailsudo: unable to resolve host — sudo: unable to resolve host <hostname>: Name or service not known (Linux)sudo: unable to res…1002 — Cloudflare Error 1002: DNS points to Prohibited IP / Restricted (Cloudflare)1002requires a primary key to be defined — EF Core: The entity type 'X' requires a primary key to be defined (.NET)requires a primary …DbUpdateException — DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. (.NET)DbUpdateExceptionCannot access a disposed context instance — ObjectDisposedException: Cannot access a disposed context instance (.NET)Cannot access a dis…1049 — MySQL ERROR 1049 (42000): Unknown database 'x' (MySQL)1049400 — HTTP 400 Bad Request (HTTP)400divergent branches — hint: You have divergent branches and need to specify how to reconcile them. (Git)divergent branchesPython not found — Python was not found; run without arguments to install from the Microsoft Store (Python)Python not foundLF/CRLF warning — warning: in the working copy of 'x', LF will be replaced by CRLF the next time Git touches it (Git)LF/CRLF warningUnsatisfiedDependencyException — UnsatisfiedDependencyException / NoSuchBeanDefinitionException: No qualifying bean of type 'X' available (Java)UnsatisfiedDependen…circular references — The dependencies of some of the beans in the application context form a cycle (Java)circular referencesgpg failed to sign — error: gpg failed to sign the data — fatal: failed to write commit object (Git)gpg failed to signDjango no such table — django.db.utils.OperationalError: no such table: app_model (Python)Django no such tableTemplateDoesNotExist — django.template.exceptions.TemplateDoesNotExist: app/page.html (Python)TemplateDoesNotExistAADSTS700016 — Azure AD (Entra ID): AADSTS700016 Application not found in the directory (Azure)AADSTS700016invalid_grant — OAuth 2.0 Error: invalid_grant (Authentication)invalid_grantinvalid_client — OAuth 2.0 Error: invalid_client (Authentication)invalid_clientnot a constructor — TypeError: x is not a constructor (JavaScript)not a constructorTDZ — ReferenceError: Cannot access 'x' before initialization (JavaScript)TDZ1153 — MySQL ERROR 1153 (08S01): Got a packet bigger than 'max_allowed_packet' bytes (MySQL)1153open_basedir — Warning: file_exists(): open_basedir restriction in effect. File(/x) is not within the allowed path(s) (PHP)open_basedirNo application encryption key — Laravel: No application encryption key has been specified. (PHP)No application encr…UPLOAD_ERR_INI_SIZE — PHP upload error 1: The uploaded file exceeds the upload_max_filesize directive in php.ini (PHP)UPLOAD_ERR_INI_SIZEENOTFOUND — Error: getaddrinfo ENOTFOUND host / Name or service not known (API)ENOTFOUNDsudoers — user is not in the sudoers file. This incident will be reported. (Linux)sudoersapi_version_invalid — API Error: Invalid or unsupported API version (API)api_version_invalidERR_NAME_NOT_RESOLVED — net::ERR_NAME_NOT_RESOLVED (This site can't be reached — server IP address could not be found) (JavaScript)ERR_NAME_NOT_RESOLV…cURL error 6 — cURL error 6: Could not resolve host: api.example.com (PHP)cURL error 6Pending validation — ACM certificate stuck in Pending validation (AWS)Pending validationJsonException object cycle — JsonException: A possible object cycle was detected (.NET)JsonException objec…A second operation was started on this context — EF Core: A second operation was started on this context instance before a previous operation completed (.NET)A second operation …Unable to create a 'DbContext' — dotnet ef: Unable to create a 'DbContext' of type ''. The exception 'Unable to resolve service for type DbContextOptions' was thrown while attempting to create an instance (.NET)Unable to create a …1062 — MySQL ERROR 1062 (23000): Duplicate entry for key (MySQL)10621452 — MySQL ERROR 1452: Cannot add or update a child row: a foreign key constraint fails (MySQL)145223505 — PostgreSQL: ERROR: duplicate key value violates unique constraint (PostgreSQL)23505InvalidOperationException — InvalidOperationException: Unable to resolve service for type 'X' while attempting to activate 'Y' (.NET)InvalidOperationExc…cannot be tracked because another instance with the same key — The instance of entity type 'X' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked (.NET)cannot be tracked b…The LINQ expression could not be translated — EF Core: The LINQ expression 'x' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly (.NET)The LINQ expression…1045 — MySQL ERROR 1045 (28000): Access denied for user (MySQL)10452002 — MySQL ERROR 2002 (HY000): Can't connect to local MySQL server through socket (MySQL)20022006 — MySQL ERROR 2006 (HY000): MySQL server has gone away (MySQL)2006

Directly related (12)

DisallowedHostPython

django.core.exceptions.DisallowedHost: Invalid HTTP_HOST header: 'x'. You may need to add 'x' to ALLOWED_HOSTS.

The request’s Host header isn’t listed in Django’s ALLOWED_HOSTS.

DataSource url not specifiedJava

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Spring Boot found JDBC/JPA on the classpath but no database URL.

ImproperlyConfiguredPython

django.core.exceptions.ImproperlyConfigured: settings are not configured / SECRET_KEY must not be empty

Django can’t load its settings — DJANGO_SETTINGS_MODULE unset, a required setting missing, or an environment variable not provide…

redirect_uri_mismatchAuthentication

OAuth Error: redirect_uri_mismatch

The redirect URI in your OAuth request doesn’t exactly match one registered for the client in the provider’s console.

1046MySQL

MySQL ERROR 1046 (3D000): No database selected

A query referenced tables without a database selected (no USE and no db in the connection).

PHP mailPHP

PHP mail() returns false / emails not delivered

PHP’s mail() function failed or emails never arrive (spam or rejected).

sudo: unable to resolve hostLinux

sudo: unable to resolve host <hostname>: Name or service not known

The machine’s hostname isn’t in /etc/hosts (or DNS), so sudo prints this warning — usually after changing the hostname.

1002Cloudflare

Cloudflare Error 1002: DNS points to Prohibited IP / Restricted

A record points to a private, reserved or Cloudflare IP that Cloudflare won’t proxy to.

requires a primary key to be defined.NET

EF Core: The entity type 'X' requires a primary key to be defined

EF Core found an entity class without a key property it can recognise.

DbUpdateException.NET

DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.

SaveChanges failed in the database; the inner exception (SqlException/PostgresException) has the real reason — constraint violati…

Cannot access a disposed context instance.NET

ObjectDisposedException: Cannot access a disposed context instance

Code used a DbContext after its scope ended — usually async void, fire-and-forget tasks, or capturing a scoped context in a singl…

1049MySQL

MySQL ERROR 1049 (42000): Unknown database 'x'

The database named in the connection doesn’t exist on that server.

Two steps away (36)

400HTTP

HTTP 400 Bad Request

The server could not understand the request because its syntax, headers or body are malformed or invalid.

divergent branchesGit

hint: You have divergent branches and need to specify how to reconcile them.

Git 2.27+ asks you to choose merge, rebase or fast-forward-only when local and remote both have new commits.

Python not foundPython

Python was not found; run without arguments to install from the Microsoft Store

Windows ran the Microsoft Store “App execution alias” instead of a real Python installation.

LF/CRLF warningGit

warning: in the working copy of 'x', LF will be replaced by CRLF the next time Git touches it

Git’s line-ending conversion (core.autocrlf) will change line endings in your working copy.

UnsatisfiedDependencyExceptionJava

UnsatisfiedDependencyException / NoSuchBeanDefinitionException: No qualifying bean of type 'X' available

Spring couldn’t find (or choose) a bean to inject.

circular referencesJava

The dependencies of some of the beans in the application context form a cycle

Two or more Spring beans depend on each other through constructors, and Spring Boot 2.6+ forbids cycles by default.

gpg failed to signGit

error: gpg failed to sign the data — fatal: failed to write commit object

Commit signing is enabled but GPG couldn’t sign — no TTY for the passphrase, wrong key, or agent not running.

Django no such tablePython

django.db.utils.OperationalError: no such table: app_model

Django queried a table that hasn’t been created — migrations missing or not applied.

TemplateDoesNotExistPython

django.template.exceptions.TemplateDoesNotExist: app/page.html

Django searched all template directories and couldn’t find that template.

AADSTS700016Azure

Azure AD (Entra ID): AADSTS700016 Application not found in the directory

The client ID in your sign-in request doesn’t exist in the tenant you’re authenticating against.

invalid_grantAuthentication

OAuth 2.0 Error: invalid_grant

The authorization code, refresh token or credentials sent to the token endpoint are invalid, expired, already used or were issued…

invalid_clientAuthentication

OAuth 2.0 Error: invalid_client

The OAuth server couldn’t authenticate your application — wrong client ID/secret, wrong auth method, or the client doesn’t exist…

not a constructorJavaScript

TypeError: x is not a constructor

new was used with something that isn’t a class/constructor — usually a wrong import.

TDZJavaScript

ReferenceError: Cannot access 'x' before initialization

A let/const/class was used before its declaration line ran (temporal dead zone) — often a circular import.

1153MySQL

MySQL ERROR 1153 (08S01): Got a packet bigger than 'max_allowed_packet' bytes

A single statement or row exceeded max_allowed_packet — big BLOBs, huge INSERTs or large dump lines.

open_basedirPHP

Warning: file_exists(): open_basedir restriction in effect. File(/x) is not within the allowed path(s)

PHP is configured to access only certain directories, and the script tried to touch a file outside them.

No application encryption keyPHP

Laravel: No application encryption key has been specified.

Laravel’s APP_KEY is missing, so it can’t encrypt sessions and cookies.

UPLOAD_ERR_INI_SIZEPHP

PHP upload error 1: The uploaded file exceeds the upload_max_filesize directive in php.ini

The uploaded file is bigger than PHP’s upload_max_filesize, so PHP discarded it.

ENOTFOUNDAPI

Error: getaddrinfo ENOTFOUND host / Name or service not known

DNS lookup for the hostname failed — the name is wrong, doesn’t exist, or this machine can’t resolve it.

sudoersLinux

user is not in the sudoers file. This incident will be reported.

Your account isn’t allowed to use sudo.

api_version_invalidAPI

API Error: Invalid or unsupported API version

The API version you requested — in the URL, a header or the SDK config — doesn’t exist or has been retired.

ERR_NAME_NOT_RESOLVEDJavaScript

net::ERR_NAME_NOT_RESOLVED (This site can't be reached — server IP address could not be found)

DNS couldn’t resolve the hostname in the browser.

cURL error 6PHP

cURL error 6: Could not resolve host: api.example.com

PHP cURL couldn’t resolve the hostname via DNS.

Pending validationAWS

ACM certificate stuck in Pending validation

ACM is waiting to see the DNS (or email) validation record — it wasn’t created, was created in the wrong DNS zone, or has a typo.

JsonException object cycle.NET

JsonException: A possible object cycle was detected

System.Text.Json found a reference loop (e.g. Order → Customer → Orders → …) while serialising, usually from EF Core navigation p…

A second operation was started on this context.NET

EF Core: A second operation was started on this context instance before a previous operation completed

The same DbContext was used concurrently — async calls not awaited, parallel tasks sharing a context, or a context registered as…

Unable to create a 'DbContext'.NET

dotnet ef: Unable to create a 'DbContext' of type ''. The exception 'Unable to resolve service for type DbContextOptions' was thrown while attempting to create an instance

dotnet ef migrations couldn’t construct your DbContext at design time.

1062MySQL

MySQL ERROR 1062 (23000): Duplicate entry for key

An INSERT/UPDATE would create a duplicate value in a PRIMARY or UNIQUE key.

1452MySQL

MySQL ERROR 1452: Cannot add or update a child row: a foreign key constraint fails

You inserted/updated a row whose foreign key value doesn’t exist in the referenced parent table.

23505PostgreSQL

PostgreSQL: ERROR: duplicate key value violates unique constraint

An INSERT/UPDATE would create a duplicate in a UNIQUE or PRIMARY KEY column — or the id sequence is behind the existing data.

InvalidOperationException.NET

InvalidOperationException: Unable to resolve service for type 'X' while attempting to activate 'Y'

ASP.NET Core’s dependency injection container can’t build Y because one of its constructor dependencies (X) was never registered.

cannot be tracked because another instance with the same key.NET

The instance of entity type 'X' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked

Two different objects with the same primary key were attached to one DbContext.

The LINQ expression could not be translated.NET

EF Core: The LINQ expression 'x' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly

The query uses C# code EF Core can’t convert to SQL — custom methods, unsupported string/date functions, or complex projections.

1045MySQL

MySQL ERROR 1045 (28000): Access denied for user

MySQL rejected the login — wrong password, wrong user/host combination, or the user doesn’t exist.

2002MySQL

MySQL ERROR 2002 (HY000): Can't connect to local MySQL server through socket

The client couldn’t reach the MySQL server — it isn’t running, or the client is looking for the socket/port in the wrong place.

2006MySQL

MySQL ERROR 2006 (HY000): MySQL server has gone away

The connection to MySQL was closed — usually by a timeout or a packet larger than `max_allowed_packet`.