A "very small number" of MacBook Pro owners with models from 2016 and 2017 have reported an error that prevents the battery charging beyond 1%, Apple writes in a new support document.

All models launched in 2016 and 2017, both the 15in and 13in models with and without the Touch Bar, are potentially susceptible to the issue, although Apple suggests that only a small proportion have actually experienced it.

The problem is caused by a software bug, which Apple has now fixed in the macOS Big Sur 11.2.1 and Catalina 10.15.7 supplemental updates released on Tuesday. Affected machines should display a message recommending a battery service.

Apple will replace all affected batteries free of charge. All you need to do is contact Apple to arrange the repair; the company will inspect it to make sure it's eligible for the replacement programme.

Here's how to test a MacBook battery to see if it needs replacing. If you're not eligible for a free replacement, check out our roundup of the best MacBook Pro deals for a good price on a new model.

This article originally appeared on Macworld Sweden. Translation by David Price.