Unexpected shut down of Apple MBA 2015 [Solved]
My MacBook Air 2015 kept shutting off unexpectedly when unplugged. In fact, it would continue to work as long as it is plugged; even shows that it is charging in the Power settings; but the charge would not go up despite how long it is connected. To make matters worse, the device would shut down within seconds of unplugged from the Magsafe charger. I have found a way to resolved it as the problem was in the hardware I am using - it may not be relevant to you; but some will benefit as I found no reliable solution to this problem - read below.
MacBook Air 13″, macOS 11.5