If I lookup a key on the key oxide site via WKD (https://keyoxide.org/wkd/<email>), it finds my key using WKD.
Great.
But if I then do "Encrypt Message", when trying to subsequently encrypt, an error:

Could not encrypt message!
==========================
Public key could not be fetched (Misformed armored text)

I suspect the problem is that it is attempting to to HKP lookup instead of using the key just retrieved by WKD.
(In the case above, the key is only available via WKD and not HKP).

7 days later

That's weird, it should just use the key it already has. Not sure what "Misformed armored text" means.

It appears to come from here: https://github.com/openpgpjs/openpgpjs/blob/5e6dd8b1edbe7c98f52343c11dcbb7c92b92c67c/src/encoding/armor.js

Here the unit test that tests for this error:
https://github.com/openpgpjs/openpgpjs/blob/4d2cf85a5185b7f64beeabf69349a2f7e13b9bd9/test/general/armor.js#L115

Is it somehow complaining about your armored key? But if so, why is the profile showing?

Are you serving an armored key on your WKD? Or binary?

My bad, just checked the keyoxide-web, the website does fetch the key again to encrypt a message. It fetches it from the same URL as the server did, so we don't have to worry about Keyoxide mistakenly querying HKP...

So what could be the issue, then?

Do you enable CORS on your WKD endpoint?

As it is WKD my key is served as binary. The error message implies an armored key is expected, which is clearly not the case (it is given a binary key)