I solve this issue on my Galaxy s7 Active by wooden stick for teeth cleaning. I cleaned contacts by it in 20 seconds after watching about 15 youtube videos and wasting about 1-2 hours ^^ My experience.
Just to let people know, majority of the time it is dirty charging port unless somone actually got the port wet. BUT there is also a possibility that the charging port has failed, yes, an actual hardware issue. I personally have tried everything from every site I have been to and every video I watched trying to get my Note 9 to charge by cable. The last thing I did a couple weeks back was the dreaded factory reset. I hated to do it but that was the last thing after weeks of trying everything I read and it did not help. My issue is 100% hardware and needs a new charging port which is where the moisture sensor is located. You must try EVERYTHING you can before giving up and having your phone tore apart to be fixed. I opted to use wireless chargers untill I find my next phone, which won't be a Samsung, after owning 7 Samsung phones. I was loyal, Samsung was not...
This happened to me. My phone is 100% dry the charger is what got wet and it seems like its taking a long time to dry. That's what happened. The phones not wet it's the charger.
This is most annoying feature I have ever seen in a phone. I live in the desert 45C 0% humidy and I just can't charge my phone. Jesus Christ, this is so stupid. They should fire engineers that come up with ideias like this.
None of the solutions have worked for me for the past couple years. And Samsung refuses to admit there is an issue. Today I think I finally beat the problem. After my wireless charger stopped charging the phone, I experimented and it has worked twice today.
1) Turn off your phone. (Mine is an s9+)
2) Plug in the charger. The phone starts charging while it is off.
3) Wait a few minutes and turn it back on with the charger attached.
4) My phone has not displayed the faulty "moisture" error until after the phone was fully charged and I removed it from the charger.
Good luck everyone. I love my phone but when this error comes up, it is a real struggle to not to trade it in on something else.