Error map
Cannot convert value of type Swift: Cannot convert value of type 'X' to expected argument type 'Y'
iOS · layer 1, On your device
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.
Directly related (12)
System.InvalidCastException: Unable to cast object of type 'X' to type 'Y'
An explicit cast failed because the object’s runtime type isn’t the target type.
Fatal error: Uncaught TypeError: foo(): Argument #1 ($x) must be of type int, string given
A function received a value of the wrong type for a typed parameter.
java.lang.ClassCastException: class A cannot be cast to class B
An object was cast to a type it isn’t.
Fatal error: Uncaught TypeError: Unsupported operand types: string + int
An arithmetic or array operator was used with incompatible types (PHP 8 is stricter than PHP 7).
Deprecated: Implicit conversion from float 2.5 to int loses precision
PHP 8.1+ warns when a float with a fractional part is silently converted to int (array keys, % operator, int parameters).
AttributeError: 'X' object has no attribute 'y'
You accessed an attribute or method that doesn’t exist on that object type.
Swift: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
A long expression (often in a SwiftUI body) has too many possible type combinations for the compiler — or hides a type error.
TS2339: Property 'x' does not exist on type 'Y'.
TypeScript’s type for the object doesn’t include that property.
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
A value’s type doesn’t match the function parameter — commonly a possibly-undefined value passed where a definite one is required.
Warning: Array to string conversion
An array was used where a string is expected — echoing it, concatenating it, or passing it to a string function.
Fatal error: Uncaught Error: Cannot use object of type stdClass as array
Code used array syntax (`$x['key']`) on an object.
TypeError: can only concatenate str (not "int") to str
You joined a string and a non-string with +.
Two steps away (36)
java.lang.IllegalArgumentException
A method rejected an argument value as invalid.
java.lang.IllegalStateException
A method was called when the object wasn’t in the right state for it.
java.lang.ArithmeticException: / by zero
Integer division or modulo by zero.
PHP Fatal error: Allowed memory size of X bytes exhausted
The script tried to use more memory than PHP’s `memory_limit` allows.
PHP Fatal error: Uncaught Error: Call to undefined function
PHP can’t find the function you called — usually a missing extension, missing include, or namespace issue.
Fatal error: Cannot redeclare function foo() (previously declared in …)
The same function (or class) was defined twice — usually a file included more than once.
java.lang.StringIndexOutOfBoundsException: begin 0, end 10, length 5
substring()/charAt() used an index outside the string.
java.lang.UnsupportedOperationException (List.of / Arrays.asList is immutable)
Code tried to modify an immutable or fixed-size collection.
java.io.IOException: Stream closed
Code read or wrote a stream after it was closed — often by a try-with-resources block or a wrapper closing the underlying stream.
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated
PHP 8.1+ warns when null is passed to a built-in function that expects a string/int.
Deprecated: Creation of dynamic property Foo::$bar is deprecated
PHP 8.2+ deprecates creating properties that aren’t declared in the class.
WordPress on PHP 8: Fatal error: Uncaught Error: Call to undefined function create_function() / each()
An old plugin/theme uses functions removed in PHP 8 (create_function, each), so the site breaks after a PHP upgrade.
DeprecationWarning: Buffer() is deprecated due to security and usability issues (DEP0005)
Code (yours or a dependency) uses the deprecated new Buffer() constructor.
WARN: the attribute `version` is obsolete, it will be ignored
A harmless Compose v2 warning: the top-level version: line in docker-compose.yml is no longer used.
Rust: error[E0308]: mismatched types — expected `X`, found `Y`
A value’s type doesn’t match what the context expects — common with &str vs String, Option/Result vs plain values, and integer ty…
TypeError: x is not a function
You called something as a function, but its value is not a function (it’s undefined, a string, an object…).
ImportError: cannot import name 'x' from 'y'
The module was found, but the name you’re importing from it doesn’t exist — usually a version change or a circular import.
KeyError: 'x'
You accessed a dictionary key that doesn’t exist.
error CS0246: The type or namespace name 'X' could not be found (are you missing a using directive or an assembly reference?)
The compiler doesn’t know the type — missing using, missing NuGet package/project reference, or a target framework mismatch.
error CS0103: The name 'x' does not exist in the current context
The identifier isn’t declared in scope — typo, variable declared in another block, missing using static, or a Razor/partial class…
error CS1061: 'X' does not contain a definition for 'Y' and no accessible extension method 'Y' accepting a first argument of type 'X' could be found
The member you call doesn’t exist on that type — typo, wrong type, missing using for an extension method, or an API removed in a…
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
A Node API got an argument of the wrong type — usually undefined because an env var or config value is missing.
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"
Node tried to run a TypeScript file as ESM without a TypeScript loader.
TS2307: Cannot find module 'x' or its corresponding type declarations.
TypeScript can’t resolve the import — the package isn’t installed, the path alias isn’t configured, or there are no types.
TS7016: Could not find a declaration file for module 'x'. 'x.js' implicitly has an 'any' type.
The JavaScript package has no TypeScript types bundled and no @types package installed.
TS2304: Cannot find name 'x'.
TypeScript doesn’t know an identifier — a missing import, missing type definitions (e.g. for Node or Jest globals), or a typo.
TS18048: 'x' is possibly 'undefined'. (TS2532: Object is possibly 'undefined'.)
TypeScript requires you to handle the case where a value may be undefined before using it.
Warning: Undefined variable $x
PHP read a variable that was never assigned in the current scope.
Composer: PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted
Composer ran out of memory while resolving or installing dependencies.
FastCGI sent in stderr: "Primary script unknown"
Nginx passed a script path to PHP-FPM that PHP-FPM couldn’t find — usually a wrong SCRIPT_FILENAME or root.
Fatal error: Uncaught Error: Call to a member function x() on null
Code called a method on a variable that is null instead of an object.
Fatal error: Uncaught ArgumentCountError: Too few arguments to function foo(), 1 passed and exactly 2 expected
A function was called with fewer arguments than it requires.
Fatal error: Uncaught DivisionByZeroError: Division by zero
Code divided by zero (or used modulo by zero) — PHP 8 throws instead of warning.
RangeError: Invalid string length
A string grew beyond the engine’s maximum length — usually runaway concatenation or huge JSON.stringify output.
TypeError: unsupported operand type(s) for +: 'int' and 'str'
An operator was used between two incompatible types, such as adding a number to a string.
TypeError: 'str' object is not callable
You used parentheses on something that isn’t a function — often a variable shadowing a built-in.
Map another error
Popular: 4035004000xC000007BTypeErrorCritical error404NullPointerException