This is from a thread here somewhere in TMC, but I can't find it. I had copied and pasted this to my detailer as I had the same problem with my front doors on my X:
"Keeping the doors open too long (manual car wash drying) resulted in no electric motor action for the driver door. The result was a partially latched door that wouldn't open or close. Once the door was opened from the inside, moving the door in either direction took strength. Lots of resistance, but it could be moved.
Nothing I did could get the driver door to work electrically. I tried a scroll wheel (touchscreen) reset, starting the car, locking the car (couldn't lock it) and powering off the car. Nothing worked.
After calling the local service center, they said to recalibrate the front door. While it didn't solve the problem immediately, it could help others with door issues. Here is the process:
From inside the vehicle, do a scroll wheel (touchscreen) reset. Open the door from inside (the manual handle will always release the door). Manually push the door to the full open position, then slowly and deliberately push the door manually closed so that it will latch. Close it slow enough that it takes about 5 to 10 seconds. If the latch pulls the door in, all is working okay.
Since I could not get the door to latch electrically, a Tesla Motors technician drove out from the SC to help. Before he arrived I remembered a trick that the detailer uses to raise the windshield glass. Sure enough, it did the trick to fool the door into action. With the door open, I moved a standard key across the door latch slot to trigger the switch in the latch. Only about 1/4" of the key depth is used as it is drawn though the slot from the side. The touch screen blacked out for a moment, so I knew the switch had been activated.
Once the door latch switch was triggered, the door calibration could be done. I also lowered the glass window and raised it fully to recalibrate the window, since it had stopped working properly. All is working fine now."