bitcoin core command line walletpassphrase incorrect but works for the main system?
If your passphrase contains spaces or special characters, you will need to wrap it with single quotes (') so that the debug console can properly parse your passphrase. For example, if your passphrase were This is my passphrase, then your command should be 

walletpassphrase 'This is my passphrase'