nativescript emulator displays nothing

2 posts, 0 answers
  1. Peres
    Peres avatar
    3 posts
    Member since:
    Mar 2016

    Posted 23 Apr Link to this post

    I have two major issues when running both emulators:

     

    1 - When I run the android emulator it invokes the emulator but then comes with the below message and stops running:

    Error: getaddrinfo ENOTFOUND localhost undefined:5554
        at errnoException (dns.js:27:10)
        at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:78:26)Error: getaddrinfo ENOTFOUND localhost undefined:5554
        at errnoException (dns.js:27:10)
        at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:78:26)

     

    2 - Both emulators (Android and iOS) when running displays nothing but a dark screen and cannot actually see what my app does.

  2. Nikolay Iliev
    Admin
    Nikolay Iliev avatar
    95 posts

    Posted 26 Apr Link to this post

    Hi Perez,

    Your specific error made me think you are probably using a http request in some part of your application. After through research I have found out that one reason for this error is node.js trying to handle invalid host and/or hostname.

    As discussed here https://github.com/felixge/node-mysql/issues/1158 and here https://github.com/nodejs/node-v0.x-archive/issues/25751 on some versions and platforms
    this error occurs even if the hostname is corrected after one invalid try.

    I can not reproduce this error as it is too application specific but I can make the following suggestions : 

    1.) If you are using MAC OS try to restart your DNS service.
    2.) Update you Node.js version to the latest stable release.
    3.) Start your emulator manually and then execute your tns run ios --emulator (or tns run android --emulator)
    4.) If you your application is making too many http request lower their count.

    If you are using Android platform from your preferred cmd / shell you can start the command monitor which
    will start Android Device Monitor. With this application you can log additional debug information
    when trying to run your mobile application on device or emulator.

    I hope those suggestions will help you out - if you need further assistance do not hesitate to contact us at NativeScript Forum. If nothing of the suggested above does not resolve your issue - please provide additional information about your application code, NativeScript version and platform on which you are running

    Regards,

    Nikolay Iliev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top