sample_snuts will attempt to optimize the marginal posterior and calculate Q prior to sampling. Better error catching and console output is needed to help users understand what to do. The solutions are to (1) try to optimize externally (e.g., restarting the optimizer, using a different optimizer, or using a Hessian Newton step) and then specifying skip_optimization=TRUE to skip it internally. In this case the $obj$env$last.par.best$ values are used. (2) If no valid mode exists then the user can set metric='stan' to revert to the default behavior of tmbstan, namely to not try optimizing and adapt a diagonal mass matrix during a long warmup period.
It may also be wise to check for estimability after optimization as part of this.