We study generic two-dimensional dilaton gravity with a Maxwell field and prove its triviality for constant dilaton boundary conditions, despite of the appearance of a Virasoro algebra with non-zero central charge. We do this by calculating the canonical boundary charges, which turn out to be trivial, and by calculating the quantum gravity partition function, which turns out to be unity. We show that none of the following modifications changes our conclusions: looser boundary conditions, non-linear interactions of the Maxwell field with the dilaton, inclusion of higher spin fields, inclusion of generic gauge fields. Finally, we consider specifically the charged Jackiw--Teitelboim model, whose holographic study was pioneered by Hartman and Strominger, and show that it is non-trivial for certain linear dilaton boundary conditions. We calculate the entropy from the Euclidean path integral, using Wald's method and exploiting the chiral Cardy formula. The macroscopic and microscopic results for entropy agree with each other.