Results 1 to 10 of 10

Thread: PhoneGap error on Android: "Server connection lost" and no data from LiveView

  1. #1
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,129

    PhoneGap error on Android: "Server connection lost" and no data from LiveView

    I followed "A guide to building Lianja Mobile business database Apps" to step 6.
    Using Android phone and Lianja App Builder on Windows 10 laptop. Trying mobile demo apps only.
    Steps:
    1.WiFi set on router, on development Win10 machine and phone.
    2.On Win10: Lianja App Builder | Projects | lianja_mobiledemo | lianja_mobiledemo (doubleclick) | Phone App View | LiveView
    (Message:...is now runnung...connect to 192.168.5.10:3000)
    3.On Android: PhoneGap | Server Address: 192.168.5.10:3000 | Connect
    (Messages:...Downloading...Extracting...Success!.. .)
    App header is showing with label captions and after "Loading..." or refreshing, an error:
    "server connection lost
    the server failed to respond"


    Suspecting on Visual Studio I uninstalled once again (1) MS Visual Studio, (2) Lianja APaaS and (3) node.js additionally. Then installed Lianja again, no Visual Studio yet.

    Interesting points, maybe relevant, maybe not:
    1) According LiveView, Phonegap LiveView Server is running, but when I issue the commands in Command Window, regardless before LiveView or after LiveView, get always the same error:
    cd "C:\Users\xxxx\AppData\Roaming\npm"
    phonegap serve
    [error] project directory could not be found
    2) When I change app in Lianja App Builder, the PhoneGap on phone is automatically refreshing / reconnecting.
    3) Trying to open the "example_pagecenter" on phone, only header+menu+arrows are shown, no 2 icons and no "Select a Page" title.
    4) The Firewall is off, no VM involved.

    What am I missing to get data from server displayed on my phone, as I get labels and headers?

    Josip

  2. #2
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,715
    Hi Josip,

    Is your Lianja Server definitely running on your development machine?

    Regards,

    Yvonne

  3. #3
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,129
    Yes, Lianja Server is definitely running on development machine.
    O
    n the bottom of Lianja Server Manager:
    "Running - Lianja Server"

    On top:

    Green arrow icon, "Start/Continue" disabled, other buttons enabled.

    Right now
    0
    active connections

    Max connections: 50 (with licence information).
    (in which occasion can I see this number "Right now" is ever changed? Is this live LCD?
    This is only 1 digit place and I do not remember seeing anything but "0")
    Truly, I rarely look it.

    I did not change any setting of Lianja Server and Windows Firewall is turned off.

    Josip
    Last edited by josipradnik; 2016-04-11 at 08:50.

  4. #4
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,715
    Hi Josip,

    Yes, the number updates to show the active connections.

    Can you connect to http://192.168.5.10:8001 in your phone's browser and run the Apps?

    Regards,

    Yvonne

  5. #5
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,129
    Hi Yvonne,

    I can connect from phone's Chrome to this IP address (:8001)
    and after log in (admin/admin) get Lianja App Center with 3 tiny :-) known app icons.

    Running them I get data and everything is looking fine. I am impressed viewing Lianja for the first time on my phone.
    I checked Lianja Server Manager: 6 active connections (expected 1 although: suddenly these 50 does not seam too many anymore).

    Immediately, I tried PhoneGap again (:3000) but no avail.
    I feel we are almost there.

    Josip
    Last edited by josipradnik; 2016-04-11 at 10:56.

  6. #6
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,781
    Blog Entries
    18
    For anyone interested in this thread. These issues were resolved on tickets.
    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
    Hi Barry,
    I am facing the same problem. Preview mode works well.
    In LiveView mode: the mobile device shows the UI screen, thereafter shows "loading" for 5 mins, then pops "Server Connection lost". Hence, the UI shows a combobox that is not populated and also a non-working commandbox ...

    Anybody can point me towards the right direction to troubleshoot? Thkq

  8. #8
    I found the solution here https://lianjadeveloper.wordpress.co...21/phonegap-4/
    Turn off the firewall and it works.
    Hope it helps others. Good day

  9. #9
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,129
    Hi Wintz,

    Instead of turning Firewall off, enable the port for PhoneGap in your Firewall.
    On Win10 you need new Outbound Rule (private)

    Name:  Screenshot - 29.6.2017. , 9_08_56.png
Views: 311
Size:  21.6 KB

    You set port 8001

    Name:  Screenshot - 29.6.2017. , 9_08_36.png
Views: 292
Size:  16.3 KB

    And Inbound Rule too:

    Name:  Screenshot - 29.6.2017. , 9_16_56.png
Views: 256
Size:  22.7 KB

    Name:  Screenshot - 29.6.2017. , 9_16_17.png
Views: 265
Size:  18.0 KB

    Josip
    Last edited by josipradnik; 2017-06-29 at 02:18.

  10. #10
    Senior Member
    Join Date
    Mar 2014
    Posts
    122
    Thanks guys for sharing the Information!
    So important to document in the forum any "tricks" or "smarts"...
    Appreciate it

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