It happened to my Canon A590 when I let too much fine grit get on the lens barrel.
I dabbed of the face of the assembly with a towel and my breath blowing it off too.
Then with a a wand on a can of WD40 I barely touched the nozle and got a little of it distributed in the crevices. I hit the power buton and redid this. Blotting with a towel each time to prevent the liquid from getting built up to much and getting inside the electronics.
It only took a minute or two for the lens to come all the way out.
Some isoproply alcohol on a paper towel was then used to clean of the excess from the lens barrel. Making sure I got off all the grit.
The lens has worked great since then.