Error code -3 when signing message from gui? I tried to sign a message from gui v18 and the debug console without success:
With the popup it shows red text: 


  "the entered address does not refer to a key. Please check the address
  and try again"


With the console: 


  "Address does not refer to key (code -3)"


the approach was:
- get a fresh public address from the wallet (new receive address)
- paste it into the address field
- type 'foobar' into the message field
- click sign message  

in the console i unlocked the wallet (for long enough!) then
`signmessage "pupaddr" "foobar"
both with no success. I double checked the pubaddr (taken from the address field on the right button).



the throw happens here in the sourcecode. The addr. starts with 3... .
The message signing feature in Bitcoin Core only works for P2PKH addresses (which start with 1...). There isn't an established standard for other ones (a few competing proposals exist, though).