Error purchasing starry pet after Epic Trials

Steam version 6.9.0r46513

Completed 1-3 Epic Trials with purchased Starry pet after each 1-3 epic trial battle.
After 4th battle after trying to purchase I’ve got error mesage ‘not enough gems’. If try again by button occurs same error.

In game I have 12 543 gems, it’s not enough? How I can obtain this unpurchased x5 pets to get it for myth raryty now if Trial unrepeatable?