.... That's really weird. Maybe intermittent motor failure ?
What would the wiring harness have to do with anything?If the sunroof keeps getting stuck and lubricating it doesn't help, the tracks and wire harnesses may need to be replaced. This seems like a common problem as I've been reading about it elsewhere too. they had problems with the tilt function too where only one side will close.
Do you know what the production date is on your car? Hopefully it's not impacting other vehicles from the same production time frame as yours.I am not sure that lubricating or new tracks/wire harness will help. To me it seems like when you press the button the computer isn't acknowledging to actually start to close the window. Sometimes you press it and nothing happens, it's not like it tries to move and gets stuck it just doesn't move at all. Luckily this has only happened to me the 1 time but now I am worried everytime I open the thing that it may not close!
In other forums I have seen quite a few people complaining that theirs gets stuck open when they use the tilt feature. Mine works fine on tilt but this problem happened when it was fully opened. I did take a video recording but unfortunately it was dark so it is hard to see. If it happens again (which I hope it doesn't) I will most definitely be taking a video!Best to record it if it happens again and bring it to the dealership in case you cant recreate it. Yours may be a different problem than from what I've been seeing. Most people hear a grinding sound when their sunroof isn't working and not opening/closing.
Same thing happened to my 2016 Honda Civic Touring. At first it wouldn't close then after a couple of tries it intermittently started closing. Then I tried opening and wouldn't open at all after so many tries.On Friday I drove my car home. Put the car in park and pressed the button to close the sunroof. Nothing happened. I turned off the car and turned it back on, drove it a mile and put it back in park. Still nothing. Finally after a few minutes it started to close an inch at a time everytime I hit the button. My dealership had no explanation for this and it didn't throw any computer codes.