Provided is a composition capable of imparting a cured film in which generation of defects is suppressed even after repeated exposure under a high temperature-low temperature environment. Moreover, a coating film, a cured film, a lens, a solid-state imaging element, and a new resin are provided. The composition is composed of a resin comprising a repeating unit represented by the following general formula (I-1) or a repeating unit represented by the following general formula (I-2), a solvent, sodium ions, potassium ions, and calcium ions. A composition comprising a specific metal ion selected, wherein the total content of the specific metal ion is 0.01 to 30 ppm by mass relative to the total mass of the composition.
展开▼