As long as the laptop can see that there's a battery there it means that there should be no hardware fault with the laptop. This happens after long usage of laptops as well, because the batteries wear out and lose their charge.
Unfortunately there's nothing much you can do apart from replace the battery. This might be an expensive solution depending on the model of your laptop, so it might just be worthwhile upgrading your laptop and getting a new one if it costs more than $200.