I tried running the command
sudo killall firefox
As there may have been some hidden windows however this didn't work.
Then I tried reinstalling firefox
sudo apt-get install --reinstall firefox
This didn't seem to work either.
Note this command will remove all personal data from firefox, run at your own risk.
After some research I found this
sudo rm -fr /home/"USERNAME"/.mozilla
This worked and I could open firefox again however I don't believe its the best way of solving this problem.
I'm open to any better ways so post in the comments if you have any.