I have found that special characters like (@) in the user password will cause this problem too.
I was able to connect with SYS using sqlplus /nolog as sysdba but my SYS user had a different password with no special characters, but every time I try to connect using a regular user like [email protected] when prompted to inputing the password it was throwing the same error "ORA-12532: TNS:invalid argument".
I deleted the listener, recreated it, delete the tnsnames and recreated it, I even uninstall and reinstall oracle. but during the installation I was using the same standard password, and I will have the same problem.
Until a created a new user (TEST01) using a password with no special characters and I notice that I did not had the problem so I when and change the SYSTEM password and eliminate the special characters then the connection was successfully no more errors. (All of this time it was the password that was causing the problem).
hope this helps.