Support » Plugin: bpost shipping » Printing label not working every time

  • Hello,
    I’m using Woocommerce (4.2.0) on WordPress (5.4.1) with bpost plugin (2.3.7).

    Since last weekend, on some orders I cannot print label, but on some orders I can.
    When I debug, I see an error coming from bpost.

    Here is the debug log :

    06-08-2020 @ 11:15:48 - [DEBUG] curl response: {"status":"0 ()","headers":{"url":"https:\/\/api-parcel.bpost.be\/services\/shm\/005429\/orders\/\/labels\/A6","content_type":"text\/plain; charset=ISO-8859-1","http_code":404,"header_size":317,"request_size":221,"filetime":-1,"ssl_verify_result":0,"redirect_count":0,"total_time":0.146875,"namelookup_time":3.9e-5,"connect_time":0.019271,"pretransfer_time":0.085814,"size_upload":0,"size_download":169,"speed_download":1150,"speed_upload":0,"download_content_length":-1,"upload_content_length":-1,"starttransfer_time":0.146553,"redirect_time":0,"redirect_url":"","primary_ip":"193.191.180.51","certinfo":[],"primary_port":443,"local_ip":"213.167.242.235","local_port":41161},"response":"Error in request: Could not find resource for relative : \/external\/005429\/orders\/\/labels\/A6 of full path: http:\/\/shm-res-pr.netpost\/api\/external\/005429\/orders\/\/labels\/A6"}
    06-08-2020 @ 11:15:48 - [ERROR] Invalid response: Error in request: Could not find resource for relative : /external/005429/orders//labels/A6 of full path: http://shm-res-pr.netpost/api/external/005429/orders//labels/A6: {"code":404,"message":"Invalid response: Error in request: Could not find resource for relative : \/external\/005429\/orders\/\/labels\/A6 of full path: http:\/\/shm-res-pr.netpost\/api\/external\/005429\/orders\/\/labels\/A6","trace":[{"file":"\/wp-content\/plugins\/bpost-shipping\/vendor\/antidot-be\/bpost-api-library\/src\/Bpost.php","line":564,"function":"doCall","class":"Bpost\\BpostApiClient\\Bpost","type":"->","args":["\/orders\/\/labels\/A6",null,["Accept: application\/vnd.bpost.shm-label-pdf-v3.4+XML","Authorization: Basic xxxxxxxxxxxxxx=="]]},{"file":"\/wp-content\/plugins\/bpost-shipping\/vendor\/antidot-be\/bpost-api-library\/src\/Bpost.php","line":592,"function":"getLabel","class":"Bpost\\BpostApiClient\\Bpost","type":"->","args":["\/orders\/\/labels\/A6","A6",false,true]},{"file":"\/wp-content\/plugins\/bpost-shipping\/classes\/api\/class-wc-bpost-shipping-api-label.php","line":40,"function":"createLabelForOrder","class":"Bpost\\BpostApiClient\\Bpost","type":"->","args":["","A6",false,true]},{"file":"\/wp-content\/plugins\/bpost-shipping\/classes\/label\/class-wc-bpost-shipping-label-retriever.php","line":61,"function":"get_label","class":"WC_BPost_Shipping\\Api\\WC_BPost_Shipping_Api_Label","type":"->","args":["","A6",false]},{"file":"\/wp-content\/plugins\/bpost-shipping\/classes\/label\/class-wc-bpost-shipping-label-attachment.php","line":72,"function":"get_label_as_file","class":"WC_BPost_Shipping\\Label\\WC_BPost_Shipping_Label_Retriever","type":"->","args":["\/tmp\/5ede01c3d9d55-Pv1ZKz.tmp",{}]},{"file":"\/wp-content\/plugins\/bpost-shipping\/classes\/label\/class-wc-bpost-shipping-label-attachment.php","line":115,"function":"create_attachment","class":"WC_BPost_Shipping\\Label\\WC_BPost_Shipping_Label_Attachment","type":"->","args":["\/tmp\/5ede01c3d9d55-Pv1ZKz.tmp"]},{"file":"\/wp-content\/plugins\/bpost-shipping\/classes\/label\/class-wc-bpost-shipping-label-retriever.php","line":126,"function":"get_url","class":"WC_BPost_Shipping\\Label\\WC_BPost_Shipping_Label_Attachment","type":"->","args":[]},{"file":"\/wp-content\/plugins\/bpost-shipping\/classes\/label\/class-wc-bpost-shipping-label-retriever.php","line":101,"function":"get_label_attachment_url","class":"WC_BPost_Shipping\\Label\\WC_BPost_Shipping_Label_Retriever","type":"->","args":[13714]},{"file":"\/wp-content\/plugins\/bpost-shipping\/classes\/label\/class-wc-bpost-shipping-label-controller.php","line":85,"function":"get_labels_contents","class":"WC_BPost_Shipping\\Label\\WC_BPost_Shipping_Label_Retriever","type":"->","args":13714},{"file":"\/wp-content\/plugins\/bpost-shipping\/classes\/class-wc-bpost-shipping-hooks.php","line":313,"function":"load_template","class":"WC_BPost_Shipping\\Label\\WC_BPost_Shipping_Label_Controller","type":"->","args":[]},{"file":"\/wp-includes\/class-wp-hook.php","line":287,"function":"bpost_virtual_page_label","class":"WC_BPost_Shipping_Hooks","type":"->","args":[""]},{"file":"\/wp-includes\/class-wp-hook.php","line":311,"function":"apply_filters","class":"WP_Hook","type":"->","args":["",[""]]},{"file":"\/wp-includes\/plugin.php","line":478,"function":"do_action","class":"WP_Hook","type":"->","args":[[""]]},{"file":"\/wp-content\/plugins\/woocommerce\/includes\/class-wc-api.php","line":148,"function":"do_action","args":["woocommerce_api_bpost-label"]},{"file":"\/wp-includes\/class-wp-hook.php","line":287,"function":"handle_api_requests","class":"WC_API","type":"->","args":[{"public_query_vars":["m","p","posts","w","cat","withcomments","withoutcomments","s","search","exact","sentence","calendar","page","paged","more","tb","pb","author","order","orderby","year","monthnum","day","hour","minute","second","name","category_name","tag","feed","author_name","pagename","page_id","error","attachment","attachment_id","subpost","subpost_id","preview","robots","favicon","taxonomy","term","cpage","post_type","embed","post_format","wc-api","sitemap","sitemap_n","yoast-sitemap-xsl","product_cat","product_tag","product","rest_route","order-pay","order-received","orders","view-order","edit-account","edit-address","payment-methods","lost-password","customer-logout","add-payment-method","delete-payment-method","set-default-payment-method","mes-garanties","gdpr","wc-auth-version","wc-auth-route","order-pay","order-received","orders","view-order","downloads","edit-account","edit-address","payment-methods","lost-password","customer-logout","add-payment-method","delete-payment-method","set-default-payment-method","wc-api-version","wc-api-route","wc-api","id","mapsmarkerpro","map","marker","format","address","place_id","wpseo_category_redirect"],"private_query_vars":["offset","posts_per_page","posts_per_archive_page","showposts","nopaging","post_type","post_status","category__in","category__not_in","category__and","tag__in","tag__not_in","tag__and","tag_slug__in","tag_slug__and","tag_id","post_mime_type","perm","comments_per_page","post__in","post__not_in","post_parent","post_parent__in","post_parent__not_in","title","fields"],"extra_query_vars":[],"query_vars":{"wc-api":"bpost-label"},"query_string":null,"request":"wc-api\/bpost-label","matched_rule":"wc-api(\/(.*))?\/?$","matched_query":"&wc-api=bpost-label","did_permalink":true}]},{"file":"\/wp-includes\/class-wp-hook.php","line":311,"function":"apply_filters","class":"WP_Hook","type":"->","args":[null,[{"public_query_vars":["m","p","posts","w","cat","withcomments","withoutcomments","s","search","exact","sentence","calendar","page","paged","more","tb","pb","author","order","orderby","year","monthnum","day","hour","minute","second","name","category_name","tag","feed","author_name","pagename","page_id","error","attachment","attachment_id","subpost","subpost_id","preview","robots","favicon","taxonomy","term","cpage","post_type","embed","post_format","wc-api","sitemap","sitemap_n","yoast-sitemap-xsl","product_cat","product_tag","product","rest_route","order-pay","order-received","orders","view-order","edit-account","edit-address","payment-methods","lost-password","customer-logout","add-payment-method","delete-payment-method","set-default-payment-method","mes-garanties","gdpr","wc-auth-version","wc-auth-route","order-pay","order-received","orders","view-order","downloads","edit-account","edit-address","payment-methods","lost-password","customer-logout","add-payment-method","delete-payment-method","set-default-payment-method","wc-api-version","wc-api-route","wc-api","id","mapsmarkerpro","map","marker","format","address","place_id","wpseo_category_redirect"],"private_query_vars":["offset","posts_per_page","posts_per_archive_page","showposts","nopaging","post_type","post_status","category__in","category__not_in","category__and","tag__in","tag__not_in","tag__and","tag_slug__in","tag_slug__and","tag_id","post_mime_type","perm","comments_per_page","post__in","post__not_in","post_parent","post_parent__in","post_parent__not_in","title","fields"],"extra_query_vars":[],"query_vars":{"wc-api":"bpost-label"},"query_string":null,"request":"wc-api\/bpost-label","matched_rule":"wc-api(\/(.*))?\/?$","matched_query":"&wc-api=bpost-label","did_permalink":true}]]},{"file":"\/wp-includes\/plugin.php","line":544,"function":"do_action","class":"WP_Hook","type":"->","args":[[{"public_query_vars":["m","p","posts","w","cat","withcomments","withoutcomments","s","search","exact","sentence","calendar","page","paged","more","tb","pb","author","order","orderby","year","monthnum","day","hour","minute","second","name","category_name","tag","feed","author_name","pagename","page_id","error","attachment","attachment_id","subpost","subpost_id","preview","robots","favicon","taxonomy","term","cpage","post_type","embed","post_format","wc-api","sitemap","sitemap_n","yoast-sitemap-xsl","product_cat","product_tag","product","rest_route","order-pay","order-received","orders","view-order","edit-account","edit-address","payment-methods","lost-password","customer-logout","add-payment-method","delete-payment-method","set-default-payment-method","mes-garanties","gdpr","wc-auth-version","wc-auth-route","order-pay","order-received","orders","view-order","downloads","edit-account","edit-address","payment-methods","lost-password","customer-logout","add-payment-method","delete-payment-method","set-default-payment-method","wc-api-version","wc-api-route","wc-api","id","mapsmarkerpro","map","marker","format","address","place_id","wpseo_category_redirect"],"private_query_vars":["offset","posts_per_page","posts_per_archive_page","showposts","nopaging","post_type","post_status","category__in","category__not_in","category__and","tag__in","tag__not_in","tag__and","tag_slug__in","tag_slug__and","tag_id","post_mime_type","perm","comments_per_page","post__in","post__not_in","post_parent","post_parent__in","post_parent__not_in","title","fields"],"extra_query_vars":[],"query_vars":{"wc-api":"bpost-label"},"query_string":null,"request":"wc-api\/bpost-label","matched_rule":"wc-api(\/(.*))?\/?$","matched_query":"&wc-api=bpost-label","did_permalink":true}]]},{"file":"\/wp-includes\/class-wp.php","line":388,"function":"do_action_ref_array","args":["parse_request",[{"public_query_vars":["m","p","posts","w","cat","withcomments","withoutcomments","s","search","exact","sentence","calendar","page","paged","more","tb","pb","author","order","orderby","year","monthnum","day","hour","minute","second","name","category_name","tag","feed","author_name","pagename","page_id","error","attachment","attachment_id","subpost","subpost_id","preview","robots","favicon","taxonomy","term","cpage","post_type","embed","post_format","wc-api","sitemap","sitemap_n","yoast-sitemap-xsl","product_cat","product_tag","product","rest_route","order-pay","order-received","orders","view-order","edit-account","edit-address","payment-methods","lost-password","customer-logout","add-payment-method","delete-payment-method","set-default-payment-method","mes-garanties","gdpr","wc-auth-version","wc-auth-route","order-pay","order-received","orders","view-order","downloads","edit-account","edit-address","payment-methods","lost-password","customer-logout","add-payment-method","delete-payment-method","set-default-payment-method","wc-api-version","wc-api-route","wc-api","id","mapsmarkerpro","map","marker","format","address","place_id","wpseo_category_redirect"],"private_query_vars":["offset","posts_per_page","posts_per_archive_page","showposts","nopaging","post_type","post_status","category__in","category__not_in","category__and","tag__in","tag__not_in","tag__and","tag_slug__in","tag_slug__and","tag_id","post_mime_type","perm","comments_per_page","post__in","post__not_in","post_parent","post_parent__in","post_parent__not_in","title","fields"],"extra_query_vars":[],"query_vars":{"wc-api":"bpost-label"},"query_string":null,"request":"wc-api\/bpost-label","matched_rule":"wc-api(\/(.*))?\/?$","matched_query":"&wc-api=bpost-label","did_permalink":true}]]},{"file":"\/wp-includes\/class-wp.php","line":735,"function":"parse_request","class":"WP","type":"->","args":[""]},{"file":"\/wp-includes\/functions.php","line":1274,"function":"main","class":"WP","type":"->","args":[""]},{"file":"\/wp-blog-header.php","line":16,"function":"wp","args":[]},{"file":"\/index.php","line":17,"args":["\/wp-blog-header.php"],"function":"require"}],"file":"\/wp-content\/plugins\/bpost-shipping\/vendor\/antidot-be\/bpost-api-library\/src\/Bpost.php:270"}
    06-08-2020 @ 11:15:48 - [DEBUG] curl request: {"10002":"https:\/\/api-parcel.bpost.be\/services\/shm\/005429\/orders\/","10018":"PHP Bpost\/3.3.0 ","19913":true,"13":30,"84":2,"10023":["Accept: application\/vnd.bpost.shm-order-v3.3+XML","Authorization: Basic xxx=="]}
    06-08-2020 @ 11:15:48 - [DEBUG] curl response: {"status":"0 ()","headers":{"url":"https:\/\/api-parcel.bpost.be\/services\/shm\/005429\/orders\/","content_type":"text\/plain; charset=ISO-8859-1","http_code":405,"header_size":326,"request_size":207,"filetime":-1,"ssl_verify_result":0,"redirect_count":0,"total_time":0.13086399999999998,"namelookup_time":6.2e-5,"connect_time":0.019745,"pretransfer_time":0.08555900000000005,"size_upload":0,"size_download":80,"speed_download":611,"speed_upload":0,"download_content_length":-1,"upload_content_length":-1,"starttransfer_time":0.13070700000000002,"redirect_time":0,"redirect_url":"","primary_ip":"193.191.180.51","certinfo":[],"primary_port":443,"local_ip":"213.167.242.235","local_port":41162},"response":"Error in request: No resource method found for GET, return 405 with Allow header"}

    I see the same problem in another topic (https://wordpress.org/support/topic/print-label-error-not-working/), but no explanation were given.

    Have you any idea of what can be done to solve the problem ?

    best regards

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.