It could be a bad connector block, possibly the main one from the ingition to the rest of the loom. Get the tank up, there should be a green connector block there - take it apart and check for cleanliness first (clean it with WD40, then some elctrical cleaner if you have some). See how that goes

.
Also, check the connections to the batery are clean and tight