Let $x \in \mathbb{R}$ and $S = 1 + x + x^{2} + \dots$
Then $xS = x + x^{2} + \dots$
Thus $S - xS = 1 \Rightarrow \frac{1}{1-x}$
Clearly this isn't correct. Otherwise we would have $x=-1$ giving two different sums for the series.
Where is the error in the logic? I'm thinking perhaps on the division to arrive at $\frac{1}{1-x}$ but I can't quite see why.
If a finite value $S:=1+x+x^2+\cdots$ exists, this argument shows $S=\frac{1}{1-x}$. Whether it exists is the real problem. It doesn't if $|x|\ge1$, because a convergent infinite series has terms that tend to $0$. On the other hand, it does work if $|x|<1$, as can be shown by noting$$\frac{1}{1-x}-(1+x+\cdots+x^{n-1})=\frac{x^n}{1-x},$$which approaches $0$ as $n$ grows.