There is a control box, or ECU, under the carpet where the passenger feet is.
I kid you not, its a combination of things......
I clean out the sunroof drain, then it's wet again. I found that somehow, water seep in where the cabin filter is. Checked the rain cowl/tray thing, found a design flaw, well it was good when it's brand new but overtime, it became a design flaw.
From the rain cowl/tray, i found more design flaw, no wonder these cars are well known to have water coming in issues, very common with the g37 crews in the US.