Could be a hardware problem. Maybe the connector in your smartphone has a bad connection. If you try to install a different ROM maybe that will work. If not, try to clean the connector.
The device is only a few months old and has been kept in a very clean environment. I cleaned out the port with an xacto knife, toothpick, alcohol swab and finally high pressure compressed air
Edit: My device was defective. Adhesive seeped into the slot during manufacturing making the port much more shallow. After scraping it out, cables work perfectly.