Assume a Gaussian surface in a non-uniform electric field that is directed along X-axis. Say the field is getting weaker as we go along positive X direction and it's constant along Y and Z directions. Then, if the Gaussian surface is a cube and charge enclosed is zero, the electric flux coming into the surface is more than that flowing out. So, shouldn't the net electric flux be non-zero contradicting Gauss's law?
Does it mean such an electric field is impossible without a charge being distributed along the path?