I'm guessing you have a battery that slots downwards behind the seatpost, into the docking base.
These do have issues with the contacts opening up after a period of time, but you could also try spraying a cotton bud with contact cleaner, or dip the end in some vodka, and giving the contact...