user96053: 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... .

user208: 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).

96053: <p>I tried to sign a message from gui v18 and the debug console without success:
With the popup it shows red text:<br> </p>

<blockquote>
  <p>"the entered address does not refer to a key. Please check the address
  and try again"</p>
</blockquote>

<p>With the console: </p>

<blockquote>
  <p>"Address does not refer to key (code -3)"</p>
</blockquote>

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

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

<p><a href="https://i.stack.imgur.com/yecF3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yecF3.png" alt="enter image description here"></a></p>

<p>the throw happens <a href="https://github.com/bitcoin/bitcoin/blob/de5af41e3567dd9660b3e9734113dccbce394207/src/qt/signverifymessagedialog.cpp#L123" rel="nofollow noreferrer">here</a> in the sourcecode. The addr. starts with 3... .</p>
 208: <p>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).</p>
