Error with LiveSync

2 posts, 0 answers
  1. Stefano
    Stefano avatar
    9 posts
    Member since:
    Dec 2015

    Posted 11 Feb Link to this post

    Hi,
    I'm debugging on an Android device (Moto G3, Marshmallow) connected via USB, using the CLI, of course, and PHPStorm as IDE. I deploy the app with 'appbuilder deploy android --debug', then (successfully) activate the live sync with 'appbuilder livesync --watch'. Nonetheless, as soon as I save changes on the computer (MAC, El Capitan) I get this error:  

    TypeError: Cannot read property 'wait' of null
        at FiberFuture.Future.wait (/usr/local/lib/node_modules/appbuilder/node_modules/fibers/future.js:535:15)
        at /usr/local/lib/node_modules/appbuilder/lib/common/services/usb-livesync-service-base.js:61:42
        at /usr/local/lib/node_modules/appbuilder/lib/common/fiber-bootstrap.js:10:13
        - - - - -
        at /usr/local/lib/node_modules/appbuilder/lib/common/services/usb-livesync-service-base.js:268:68
        at Function.settle (/usr/local/lib/node_modules/appbuilder/node_modules/fibers/future.js:249:26)
        at FiberFuture.Future.wait (/usr/local/lib/node_modules/appbuilder/node_modules/fibers/future.js:534:10)
        at /usr/local/lib/node_modules/appbuilder/lib/common/services/usb-livesync-service-base.js:61:42
        at /usr/local/lib/node_modules/appbuilder/lib/common/fiber-bootstrap.js:10:13

     

    Suggestions? Am I doing something wrong?

     

    In addition, even if I don't explicitly activate the livesync, when I tap the three fingers on the screen the app updates, but not to the code I've modified on my computer. Where does it take the code then?

    Thanks,
    Stefano

  2. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 15 Feb Link to this post

    Hello Stefano,

    Thank you for the shared details. I've successfully reproduced the issue on my side and we plan to release a fix for it in the incoming days. 

    Meanwhile you can fix it on your side. Just follow the steps below:
    1) Find where your appbuilder-cli is installed - $ ls -l `which appbuilder` could help you.
    2) In the installation directory, navigate to lib/common/services and open usb-livesync-service-base.js
    3) Navigate to line 305 where you'll find return null and replace the preparePlatformSync with the following code:
    UsbLiveSyncServiceBase.prototype.preparePlatformForSync = function (platform) {
        return require("fibers/future").fromResult();
    };

    Now you'll be able to use the $ appbuilder livesync --watch command.

    As per the three-finger livesync, you have to execute $ appbuilder livesync cloud after saving your changes. This will send the files in the cloud and after that you can use three-finger sync on the device. The operation will pull the files from the cloud. You have to call $ appbuilder livesync cloud whenever you save your files.

    Once again I would like to thank you for reporting this issue. I've update your Telerik Points as a small sign of our appreciation for your efforts.

    Feel free to contact us in case you have any other problems or concerns.

    Regards,
    Rosen Vladimirov
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
Back to Top