For mi it was JDK version related issue both on Linux Mint 19 and ubuntu 18.04.
Mint by default uses JDK 11 version, but minecraft uses version 8. So you need to change mint/ubuntu used version by typing this command:
sudo update-alternatives --config java
I selected option 2, cause it was JDK 8, same as minecraft and then restarted PC!