Results 1 to 9 of 9

Thread: Phonegap LiveView "server failed to start"

  1. #1
    Junior Member
    Join Date
    Jul 2015
    Posts
    25

    Phonegap LiveView "server failed to start"

    Hi all,

    I'm trying to test a mobile application and can't get the LiveView working. I get the server failed to start error no matter the mobile platform I attempt to use. I followed the steps at https://www.lianja.com/resources/blo...-database-apps to set it up.

    I have a phonegap account, set up an encryption key for android, etc etc. It works on one of our computers and not the other and we can't work out what we did differently!

    I'm clearly missing something in the setup process, is there documentation out there on how to set up the live view?

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,368
    Blog Entries
    22
    Hi Joanna,

    There is nothing to set as such.

    When you install APaaS Developer it will install node.js and the phonegap modules. It then uses these to build the app.

    "Live View" does not build the app using phonegap build it creates the necessary directory structure and files required and then runs "phonegap serve" in the required directory.

    If the server failed to start you can test it manually by cd to the required directory in a command window and issue phonegap serve.

    It may be a firewall issue on your machine or something else is using the port required (see the phonegap develop app on your mobile device it will tell you).

    You may want to mention what operating system you are using.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Junior Member
    Join Date
    Jul 2015
    Posts
    25
    Thanks Barry,

    I'm on Windows 7, when I try that it tells me that phonegap is not the name of a command. I'm guessing something hasn't been added to PATH? I have liana\bin added but there doesn't seem to be a "phonegap" file in there.

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,368
    Blog Entries
    22
    During the install everything you need is installed and setup for you.

    The phonegap API to work with the adobe phonegap build service is installed silently after node.js is installed (which it uses).

    This is installed using:

    npm install phonegap -g

    It is possible your installation did not complete properly due to an unstable internet connection at the time.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  5. #5
    Junior Member
    Join Date
    Jul 2015
    Posts
    25
    I've installed Lianja about 4 times now and it hasn't worked so clearly it wasn't a random error during install. I ran the command you gave me and first it told me I had the wrong version of python installed. So I uninstalled my Python 3.5 and installed Python 2.7, the same version Lianja uses.

    Now it's spitting back the following two issues:


    C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cp pBuild.targets(403,5): error MSB3191: Unable to create directory "Release\obj\validation\validation.tlog\". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. [C:\Users\Ryan\AppData\Roaming\npm\node_modules\pho negap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\socke t.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-Validate\build\validation.vcxproj]

    and

    C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cp pBuild.targets(403,5): error MSB3191: Unable to create directory "Release\obj\bufferutil\bufferutil.tlog\". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. [C:\Users\Ryan\AppData\Roaming\npm\node_modules\pho negap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\socke t.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil\bui ld\bufferutil.vcxproj]


    I had a look around the internet and it seems to be an issue with the way node.js structures its directories. I had a look through the phonegap directory tree on the computer we have with phonegap working and it doesn't seem to have "node_modules\bufferutil" or "node_modules\utf-8-validate", it goes straight from "ws" to "build". Without those folders the entire path is just barely under the Windows character limit for a folder name, with them it's just barely over.

    Do you know how to get around this or why it's putting those two folders in?

  6. #6
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,368
    Blog Entries
    22
    Lianja is not using those folders. It seems you installed visual studio with PhoneGap tools and it has basically messed up any ability to install PhoneGap and node.js for use with Lianja.

    In other words it's affecting your whole machine.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  7. #7
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,368
    Blog Entries
    22
    It's the path that visual studio has setup for node.js. It's too long as stated in the error messages that you are seeing.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  8. #8
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,368
    Blog Entries
    22
    It's highly likely that visual studio has custom versions of PhoneGap and node.js installed that prevent it being used by other products.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  9. #9
    Junior Member
    Join Date
    Jul 2015
    Posts
    25
    Yep that was it Barry, I uninstalled Visual Studio and reinstalled Lianja and now everything works. Thanks.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us