I want to solve the equation $\lvert z\rvert^2+iz+i=0$
Let $z=x+iy$
$$\implies(x^2+y^2)+i(x+iy)+i=0 \\ \iff x^2+y^2-y+ix+i=0 \\ $$ Comparing left and right side:$$\iff (x^2+y^2-y)+i(x+1)=0+0i$$
$$\implies x+1=0 \implies \boxed{x=-1}\\\implies((-1)^2+y^2-y=0)\iff y^2-y+1=0 \\ \implies \boxed{y_{1,2}=\frac{1}{2} \pm \frac{\sqrt3}{2}i}$$
Substituting $x$ an $y$ back into $x+iy$, I get two complex solutions:
$$z_1=-1+i\left(\frac{1}{2} + \frac{\sqrt3}{2}i\right)=-1-\frac{\sqrt{3}}{2}+\frac{1}{2}i\\ z_2 =-1+i\left(\frac{1}{2} - \frac{\sqrt3}{2}i\right)=-1+\frac{\sqrt{3}}{2}+\frac{1}{2}i$$
However, these solutions don't seem to satisfy my equation:
$$\implies \left( \frac{-2-\sqrt{3}}{2}\right)^2+\left( \frac{1}{2}\right)^2+i\left( -1-\frac{\sqrt{3}}{2}+\frac{1}{2}i \right)+i\not=0 \\ $$
What am I doing wrong here?
You forgot that $y$ is a real number. Therefore, the conclusion that you should have obtained is that the equation has no solutions.