Skip to content

Cannot read property 'version' of null after upgrading to 2.1.0 RC7 #524

Closed
@lorro

Description

@lorro

Hi,

A while ago we developed a POS software which has been working fine so far. Printing of receipts and opening of the cash drawer runs through the QZ tray software. The first cash registers that have been registered in the POS are using our own compiled version of QZ Tray 2.1.0-RC5, without issues.

However, the last couple of cash registers that we registered in the POS software are using a newer compiled version of QZ Tray 2.1.0-RC7. Now regulary some issues pop up when an employee tries to print/open the drawer. The following javascript error is returned regularly.

TypeError: Cannot read property 'split' of undefined (Most recent call first)
File webpack:///./own_modules/qz-tray/qz-tray.js line 627 col 1 in compatible
   var semver = _qz.websocket.connection.version.split(/[.-]/g);
File webpack:///./own_modules/qz-tray/qz-tray.js line 1169 col 1 in print
   _qz.tools.compatible(data[d]);
TypeError: Cannot read property 'version' of null (Most recent call first)
File webpack:///./own_modules/qz-tray/qz-tray.js line 627 col 1 in compatible
   var semver = _qz.websocket.connection.version.split(/[.-]/g);
File webpack:///./own_modules/qz-tray/qz-tray.js line 1169 col 1 in print
   _qz.tools.compatible(data[d]);

After doing a manual browser refresh printing works again. That's however not really a solution as the POS is a single page application.

Anyone has an idea what direction we should look into to fix this issues?
Has any remarkable changes been made that could cause this behavior?
The connection with QZ Tray is setup on first page load. Is the connection with QZ tray lost for some reason perhaps?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions