netresearch / dhl-shipping-m2

DHL multi-division shipping extension for Magento 2
Open Software License 3.0
13 stars 4 forks source link

Shipping labels in Magento 2.4.4 do not show up in Magento when created by cronjob #48

Closed plastikschnitzer closed 2 years ago

plastikschnitzer commented 2 years ago

Hi,

with Magento 2.4.4, PHP8.1 and labels created automatically by cronjob, I see a strange issue:

Labels are created in DHL. Label status in Magento goes to green, but no tracking ID or shipping label for download shows up in Magento.

Same applies also to GLS Labels created by cronjob, they are created in GLS but tracking ID and shipping label not showing up in Magento.

If I create the labels manually in Magento (via create shipping and create shipping label or bulk operation on order grid), everything is fine.

The system.log or exception log or the shipping extension logs do not show any error message.

The GLS log looks totally fine. DHL Log see below:

[2022-07-12T07:28:00.066070+00:00] dhlpaket.ERROR: Error:
Not Found
with response:
HTTP/1.1 404 Not Found
Date: Tue, 12 Jul 2022 07:28:00 GMT
Content-Type: application/problem+json
Content-Length: 97
Connection: keep-alive
Correlation-Id: baf9a8d8-e263-4e34-803d-dfcb34e16243
Content-Language: en
access-control-allow-origin: *
access-control-allow-headers: origin,x-requested-with,accept,content-type,dhl-api-key
access-control-max-age: 3628800
access-control-allow-methods: GET,OPTIONS
Strict-Transport-Security: max-age=63113904; includeSubDomains; preload

For unknown reason the GLS repository is read only, maybe someone can clarify, no bugreport possible there.

Thank you!

mam08ixo commented 2 years ago

Hi @plastikschnitzer,

we are no longer contracted to provide support or maintenance for the GLS extension. For any inquiries, please contact GLS directly.

The log excerpt that you provided looks like it is coming from a JSON API. There is no host or response body, so I cannot tell where this comes from. But it is certainly not related to the Business Customer Shipping API.

We cannot replicate the issue so I am afraid you will have to debug into the issue and provide more detail.

Which version of the magento/zendframework1 package do you have installed? Version 1.15.0 has a PHP 8.1 incompatibility that affects label generation, see FAQ.

plastikschnitzer commented 2 years ago

Thank you very much for the clarification on the GLS extension!

I got the error message from a DHL label creation from debug.log

main.CRITICAL: Exception: Deprecated Functionality: Optional parameter $genNum declared before required parameter $factory is implicitly treated as a required parameter in /var/www/magento2/vendor/magento/zendframework1/library/Zend/Pdf/Element/Reference.php on line 91 in /var/www/magento2/vendor/magento/framework/App/ErrorHandler.php:61

BUT I applied the fix described in the Netresearch FAQ, other modules were also stumbling over this bug and they are working after the fix (xtento pdf invoice customizer). Any idea why the fix is not working in this case for DHL?

Version of magento/zendframework1 is 1.15.0

mam08ixo commented 2 years ago

Use version 1.15.1 and the deprecation error should be gone.

plastikschnitzer commented 2 years ago

Yes, I can confirm the zendframework1 component update to 1.15.1 solves the issue!