If your Espresso tastes salty most of the time, it’s simply under extraction. Under extraction occurs when your beans have been ground too coarse, and the water is being pulled through too quickly.
Try grinding your coffee beans finer which will slow the flow of water that comes through in the extraction process; you will need to experiment here with different grinds until you hit that sweet spot.
Still Salty?
Check your water temperature
Your water temperature should be between 90-95 degrees Celsius; if the heat is too low, it can cause salty Espresso.
Clean your equipment
Dirty equipment could be the culprit if you have the extraction and temperature down.
Change your bean
Some beans are difficult to extract properly and can be prone to that unsatisfying salty taste especially Indonesian beans so if all else fails to try a different coffee bean.