Wkhtmltopdf reported an error: Exit with code 1 due to network error: TimeoutError

Hi,

When I try to create custom format for any doctype I am receiving below error.


wkhtmltopdf reported an error: Exit with code 1 due to network error: TimeoutError

      stdout = b'%PDF-1.4\n1 0 obj\n<<\n/Title (\xfe\xff\x00V\x00i\x00p\x00 \x00I\x00n\x00d\x00u\x00s\x00t\x00r\x00i\x00e\x00s\x00 \x00L\x00i\x00m\x00i\x00t\x00e\x00d)\n/Creator (\xfe\xff\x00w\x00k\x00h\x00t\x00m\x00l\x00t\x00o\x00p\x00d\x00f\x00 \x000\x00.\x001\x002\x00.\x006\x00.\x001)\n/Producer (\xfe\xff\x00Q\x00t\x00 \x004\x00.\x008\x00.\x007)\n/CreationDate (D:20240820135345Z)\n>>\nendobj\n3 0 obj\n<<\n/Type /ExtGState\n/SA true\n/SM 0.02\n/ca 1.0\n/CA 1.0\n/AIS false\n/SMask /None>>\nendobj\n4 0 obj\n[/Pattern /DeviceRGB]\nendobj\n8 0 obj\n<<\n/Type /Annot\n/Subtype /Link\n/Rect [37.5000000  827.750000  86.2500000  842 ]\n/Border [0 0 0]\n/A <<\n/Type /Action\n/S /URI\n/URI (https://reliable.fusionsofttech.co.in/api/method/frappe.utils.print_format.download_pdf?doctype=Purchase%20Invoice&name=PINV-24-00005&key=None)\n>>\n>>\nendobj\n9 0 obj\n<<\n/Type /Catalog\n/Pages 2 0 R\n>>\nendobj\n5 0 obj\n<<\n/Type /Page\n/Parent 2 0 R\n/Contents 10 0 R\n/Resources 12 0 R\n/Annots 13 0 R\n/MediaBox [0 0...
      stderr = 'Exit with code 1 due to network error: TimeoutError\n'
      exit_code = 1
  File "env/lib/python3.11/site-packages/pdfkit/pdfkit.py", line 155, in handle_error
    raise IOError('wkhtmltopdf reported an error:\n' + stderr)
      exit_code = 1
      stderr = 'Exit with code 1 due to network error: TimeoutError\n'
      stderr_lines = ['Exit with code 1 due to network error: TimeoutError']
builtins.OSError: wkhtmltopdf reported an error:
Exit with code 1 due to network error: TimeoutError

Has anyone faced this, earlier it was working fine.

Following APP is been installed

Also, when below url is called it’s not returning anything

http://localhost/api/method/frappe.utils.print_format.download_pdf?doctype=Sales%20Invoice&name=REL-24%2F00502&format=TESTING%20SI&no_letterhead=0&letterhead=FusionLetterHead&settings={}&_lang=en

When I checked the docker logs following appear


ERROR   Property: Invalid value for "CSS Level 2.1" property: var(--gray-900) [14:3: color]
WARNING Property: Unknown Property name. [64:2: word-wrap]
WARNING Property: Unknown Property name. [83:2: columns]
WARNING Property: Unknown Property name. [90:2: background-size]
WARNING Property: Unknown Property name. [98:2: object-fit]
WARNING Property: Unknown Property name. [110:2: -webkit-print-color-adjust]
WARNING Property: Unknown Property name. [158:2: word-break]
WARNING Property: Unknown Property name. [278:9: --scale-factor]
WARNING Property: Unknown Property name. [278:30: --modal-x]
WARNING Property: Unknown Property name. [278:46: --modal-y]
WARNING Property: Unknown Property name. [278:448: overflow-wrap]
WARNING Property: Unknown Property name. [278:496: user-select]
WARNING Property: Unknown Property name. [278:926: overflow-wrap]
WARNING Property: Unknown Property name. [278:974: user-select]
WARNING Property: Unknown Property name. [278:1384: user-select]
WARNING Property: Unknown Property name. [278:1490: user-select]
WARNING Property: Unknown Property name. [278:1874: user-select]
WARNING Property: Unknown Property name. [278:1893: object-fit]
WARNING Property: Unknown Property name. [278:1917: object-position]
WARNING Property: Unknown Property name. [278:1949: background-size]
WARNING Property: Unknown Property name. [278:2233: user-select]
WARNING Property: Unknown Property name. [278:2651: overflow-wrap]
WARNING Property: Unknown Property name. [278:2699: user-select]
WARNING Property: Unknown Property name. [278:3172: user-select]
WARNING Property: Unknown Property name. [278:3649: user-select]
WARNING Property: Unknown Property name. [278:3757: --print-width]
WARNING Property: Unknown Property name. [278:3783: --print-height]
WARNING Property: Unknown Property name. [278:3810: --print-container-width]
WARNING Property: Unknown Property name. [278:3846: --print-container-height]
WARNING Property: Unknown Property name. [278:3883: --print-margin-top]
WARNING Property: Unknown Property name. [278:3908: --print-margin-bottom]
WARNING Property: Unknown Property name. [278:3940: --print-margin-left]
WARNING Property: Unknown Property name. [278:3966: --print-margin-right]
WARNING Property: Unknown Property name. [278:4026: --print-width]
WARNING Property: Unknown Property name. [278:4052: --print-height]
WARNING Property: Unknown Property name. [278:4079: --print-container-width]
WARNING Property: Unknown Property name. [278:4115: --print-container-height]
WARNING Property: Unknown Property name. [278:4152: --print-margin-top]
WARNING Property: Unknown Property name. [278:4177: --print-margin-bottom]
WARNING Property: Unknown Property name. [278:4209: --print-margin-left]
WARNING Property: Unknown Property name. [278:4235: --print-margin-right]
WARNING Property: Unknown Property name. [278:4295: --print-width]
WARNING Property: Unknown Property name. [278:4321: --print-height]
WARNING Property: Unknown Property name. [278:4348: --print-container-width]
WARNING Property: Unknown Property name. [278:4384: --print-container-height]
WARNING Property: Unknown Property name. [278:4421: --print-margin-top]
WARNING Property: Unknown Property name. [278:4446: --print-margin-bottom]
WARNING Property: Unknown Property name. [278:4478: --print-margin-left]
WARNING Property: Unknown Property name. [278:4504: --print-margin-right]
WARNING Property: Unknown Property name. [284:9: dpi]
WARNING Property: Unknown Property name. [285:9: page-width]
WARNING Property: Unknown Property name. [286:9: page-height]
ERROR   Property: Invalid value for "CSS Level 2.1" property: -webkit-box [363:9: display]
ERROR   Property: Invalid value for "CSS Level 2.1" property: -webkit-flex [364:9: display]
ERROR   Property: Invalid value for "CSS Level 2.1" property: flex [365:9: display]
WARNING Property: Unknown Property name. [367:9: flex]
WARNING Property: Unknown Property name. [372:9: flex-direction]
WARNING Property: Unknown Property name. [373:9: flex]
WARNING Property: Unknown Property name. [376:9: -webkit-box-sizing]
ERROR   Property: Invalid value for "CSS Level 2.1" property: var(--gray-900) [14:3: color]
WARNING Property: Unknown Property name. [64:2: word-wrap]
WARNING Property: Unknown Property name. [83:2: columns]
WARNING Property: Unknown Property name. [90:2: background-size]
WARNING Property: Unknown Property name. [98:2: object-fit]
WARNING Property: Unknown Property name. [110:2: -webkit-print-color-adjust]
WARNING Property: Unknown Property name. [158:2: word-break]
WARNING Property: Unknown Property name. [278:9: --scale-factor]
WARNING Property: Unknown Property name. [278:33: --modal-x]
WARNING Property: Unknown Property name. [278:49: --modal-y]
WARNING Property: Unknown Property name. [278:451: overflow-wrap]
WARNING Property: Unknown Property name. [278:499: user-select]
WARNING Property: Unknown Property name. [278:929: overflow-wrap]
WARNING Property: Unknown Property name. [278:977: user-select]
WARNING Property: Unknown Property name. [278:1387: user-select]
WARNING Property: Unknown Property name. [278:1493: user-select]
WARNING Property: Unknown Property name. [278:1877: user-select]
WARNING Property: Unknown Property name. [278:1896: object-fit]
WARNING Property: Unknown Property name. [278:1920: object-position]
WARNING Property: Unknown Property name. [278:1952: background-size]
WARNING Property: Unknown Property name. [278:2236: user-select]
WARNING Property: Unknown Property name. [278:2654: overflow-wrap]
WARNING Property: Unknown Property name. [278:2702: user-select]
WARNING Property: Unknown Property name. [278:3175: user-select]
WARNING Property: Unknown Property name. [278:3652: user-select]
WARNING Property: Unknown Property name. [278:3760: --print-width]
WARNING Property: Unknown Property name. [278:3786: --print-height]
WARNING Property: Unknown Property name. [278:3813: --print-container-width]
WARNING Property: Unknown Property name. [278:3849: --print-container-height]
WARNING Property: Unknown Property name. [278:3886: --print-margin-top]
WARNING Property: Unknown Property name. [278:3911: --print-margin-bottom]
WARNING Property: Unknown Property name. [278:3943: --print-margin-left]
WARNING Property: Unknown Property name. [278:3969: --print-margin-right]
WARNING Property: Unknown Property name. [278:4029: --print-width]
WARNING Property: Unknown Property name. [278:4055: --print-height]
WARNING Property: Unknown Property name. [278:4082: --print-container-width]
WARNING Property: Unknown Property name. [278:4118: --print-container-height]
WARNING Property: Unknown Property name. [278:4155: --print-margin-top]
WARNING Property: Unknown Property name. [278:4180: --print-margin-bottom]
WARNING Property: Unknown Property name. [278:4212: --print-margin-left]
WARNING Property: Unknown Property name. [278:4238: --print-margin-right]
WARNING Property: Unknown Property name. [284:9: dpi]
WARNING Property: Unknown Property name. [285:9: page-width]
WARNING Property: Unknown Property name. [286:9: page-height]
ERROR   Property: Invalid value for "CSS Level 2.1" property: -webkit-box [363:9: display]
ERROR   Property: Invalid value for "CSS Level 2.1" property: -webkit-flex [364:9: display]
ERROR   Property: Invalid value for "CSS Level 2.1" property: flex [365:9: display]
WARNING Property: Unknown Property name. [367:9: flex]
WARNING Property: Unknown Property name. [372:9: flex-direction]
WARNING Property: Unknown Property name. [373:9: flex]
WARNING Property: Unknown Property name. [376:9: -webkit-box-sizing]
ERROR   Property: Invalid value for "CSS Level 2.1" property: var(--gray-900) [14:3: color]
WARNING Property: Unknown Property name. [64:2: word-wrap]
WARNING Property: Unknown Property name. [83:2: columns]
WARNING Property: Unknown Property name. [90:2: background-size]
WARNING Property: Unknown Property name. [98:2: object-fit]
WARNING Property: Unknown Property name. [110:2: -webkit-print-color-adjust]
WARNING Property: Unknown Property name. [158:2: word-break]
ERROR   Property: Invalid value for "CSS Level 2.1" property: initial [297:5: color]
WARNING Property: Unknown Property name. [302:5: word-break]
ERROR   Property: Invalid value for "CSS Level 2.1" property: end [374:5: text-align]
ERROR   Property: Invalid value for "CSS Level 2.1" property: end [412:5: text-align]

@murtaza.ghadiali please check this link

@Meet Thanks for your response but I am using through docker