Magento – Magento 2 : Command bin/magento setup:upgrade failing after upgrade to 2.2.4

magento2.2.4

I was upgrading Magento 2.2.3 to Magento 2.2.4. Everything went ok but the final step is to run bin/magento setup:upgrade and when I run that I get the below error-

enter image description here

We can't save the address: Email has a wrong format.

Which email address has an issue? I have upgraded from 2.2.2 to 2.2.3 with no problem a few months ago.

Edit this is the new error-

enter image description here

Best Answer

I had the same issue but now its resolved after running the following query:

update sales_order_address a left join customer_entity b on a.customer_id = b.entity_id set a.email = b.email where a.email is null

I have found the answer https://github.com/magento/magento2/issues/14964