How to diagnose the «Imported resource (image) could not be downloaded from external resource due to timeout or access permissions» failure on a product import?

How is the message generated?



https://github.com/magento/magento2/blob/d447fa6e1/app/code/Magento/CatalogImportExport/Model/Import/Product.php#L1850-L1865

So the \Magento\CatalogImportExport\Model\Import\Product::uploadMediaFiles() method misses an actual exception report.

How to fix it

Locate the line:

Add a new line just above:

$this->_logger->critical($e);

Using the critical() we log the exceptions into the exception.log file.

Magento team has implemented my fix after 2 years at 2018-01-10 in Magento 2.3. Great reaction!
https://github.com/magento/magento2/commit/0d01f54