Question

Test connection to Kayako fails:

"[XMLPacket] Can't parse xml packet"

How to enable more verbose error displaying in the provider's control panel? How to understand the root cause of failure?

Answer

In case any exception arises in SWIFT (framework for Kayako integration), it is not intercepted in the kayakofusion.php script provided by PBA. The exact error connection fails with may be found in the EXTERNALHELPDESK.log on the PBA Application Server, it is also possible to find some errors when logging in to Kayako admin interface directly and Kayako logs.

Known Kayako-related issues

  • an error in /var/www/html/swift/logs/ (also appears in EXTERNALHELPDESK.log with log level 6-7):

    require_once(nusoap.php): failed to open stream: No such file or directory (./kayakofusion.php:377)
    

    The issue is that php-soap packet is not installed on Kayako server. Please install it.

  • an error on Kayako side:

    PHP [Notice]: Undefined variable: header_security (support/kayakofusion.php:365) 
    

    This is a result of the bug PBA-51512/PBA-50036 (fixed in PBA 5.5.2). If update installation is not possible at the moment, you can edit kayakofusion.php, replace

    if (isset($_SERVER['HTTP_SECURITY'])) { $header_security = $_SERVER['HTTP_SECURITY'];
    

    with

    if (isset($_SERVER['HTTP_HTTP_SECURITY'])) { $header_security = $_SERVER['HTTP_HTTP_SECURITY']; 
    
  • Kayako is of version >= 4.5.1, in Kayako admin interface there are errors like:

    Argument 1 passed to SWIFT_User::__construct() must be an instance of SWIFT_Data, string given, called in /var/www/html/support/kayakofusion.php on line 105 and defined (./__swift/apps/base/models/User/class.SWIFT_User.php:104)
    

    or

    Uncaught Exception: Unable to load User ID: 1 (0) in /var/www/html/support/__swift/library/User/class.SWIFT_User.php:55 
    

    This is a result of changes on Kayako side, that are not reflected in PBA script kayakofusion.php until PBA 5.5.2 (the bug #PBA-51818). If update installation is not possible at the moment, correct the script, replace

    return new SWIFT_User($supportsuite['supportsuite']);
    

    with

    return new SWIFT_User( new SWIFT_DataID($supportsuite['supportsuite']) );
    
  • Integration with Kayako is broken after PBA 5.4.14 - kb #116865

  • error "Session cannot be inited because user was not found" - kb #117851

Internal content

Link on internal Article