The problem is that your objective becomes numerically nonconvex
A model sum(x)^2 is dangerous as Q in x'*Q*x is rank-one, and with some unfortunate numerical scaling and tolerances it can become indefinite enough to fail tolerances (easily seen with example min(eig(ones(10,1)*ones(1,10)))
Recommended way is to introduce a new variable z, with constraint z == sum(x), and then use z^2 instead, which will be easier to detect convexity on as [z;x]*Q*[z;x] is block-positive-definite
(the weird error comes from YALMIP temporarily think it can adress the nonconvex QP via geometric programming in mosek, but then once down that incorrect route it realizes there are semidefinite constraints, which it doesn't want to mix with GP)