I've found the following proof which seems to have the conclusion, that the divergence is invariant under a general coordinate transformation when defined with the derivatives of the respective (transformed) components:
Let $f:\mathbb{R}^n\longrightarrow \mathbb{R}^n$ and $J_f$ the jacobi matrix associate to $f$.
$\phi:\mathbb{R}^n \longrightarrow \mathbb{R}^n :(y_1,...,y_n)\longmapsto (x_1...,x_n)$ is a change of coordinates. So $x_i=\phi_i(y_1,...,y_n)$, and $J_\phi$ is Jocobian matrix associate to $\phi$.
Let $g:\phi^{-1}\circ f\circ \phi:\mathbb{R}^n \longrightarrow \mathbb{R}^n: (y_1,...,y_n)\longmapsto (y_1...,y_n)$; the jacobian matrix associate to $g$ is $J_g$.
Chain rule implies: $J_g=J_\phi^{-1} J_f J_\phi$.
Now $div g=tr(J_g)=tr(J_\phi^{-1} J_f J_\phi)=tr(J_f)=div f$ So, the divergence is invariant under a coordinate transformation.
But e.g. in spherical coordiantes the divergence clearly is NOT simply:
$divf = tr(J_g) =\frac{\partial {g}_r}{\partial r} + \frac{\partial {g}_\theta}{\partial \theta}+\frac{\partial {g}_\phi}{\partial \phi}$
So I do not understand where the above proof breaks down or where the mistake is.
There are two errors in this proof: