Macbook Air recognizes battery while starting, but later says "no battery available" (battery icon X) I spilled a full glass of water on the keyboard of my Macbook Air 11" mid-2011 (running OS X Mavericks).

After drying everything out, etc., here's what happens when I start the laptop:


It has to be plugged in to start. The green LED on the magsafe plug doesn't light up any more.
As it starts, I can pull out the magsafe plug, and it continues to start.
If I leave the magsafe plug unplugged, then just before it reaches the main login screen, the screen goes totally blank (and I can dimly see the cover's apple logo behind it, indicating that the screen is off), but the keyboard stays lighted up. If I plug the magsafe back in, nothing changes. 
If I don't pull out the magsafe plug in (2.), then the laptop reaches the login screen just fine, and after I log in, there's an X on the battery icon with the message "no battery found".


I've tried SMC, PRAM resets.

It's clear that the battery is being recognized for a while, so it's not some mechanical connection issue.

If this might be some firmware issue, is there some way to update the Macbook's firmware?
Unfortunately, intermittent battery connection failures can also be a result of spilling water on the computer.  It's not just a case of either it works or not.

You'll need to take the computer in to a service center. The technician will likely try swapping out the battery first to see if that does the trick. Otherwise, you might be looking at a full logic board replacement.