I had this problem and in my case it was the internal flash chip, pin 8, it was cold soldered. I resoldered and flash was detected again.