The error message "The contact with the specified contact details has been archived. The contact must be un-archived before creating new invoices or credit notes" is a message prompted from Xero.
Sometimes when two contacts are merged together in Xero, one of the contacts will be archived.
Depending on how they were merged, if you merged Customer A into Customer B then A will be archived. On the contrary, if you merged Customer B into Customer A then B will be archived.
1) Select a new contact from the contact list in Hubdoc and republish the document.
2) Un-archive the contact in Xero and publish the document again.