Hasn't happened to me (fingers crossed), but you may need to remove the sunroof glass and check the slide tracks for obstructions.
It's pretty simple. There are a couple of good YT vids out there.
I have an early version that has the glued panels, so I can only reach the front half. But if you have an newer version, the panels can be popped off to allow for servicing. I don't remember off the top of my head when that change happened specifically. Sorry