This is a migrated thread and some comments may be shown as answers.

nativescript emulator displays nothing

1 Answer 111 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Peres
Top achievements
Rank 1
Peres asked on 23 Apr 2016, 03:11 PM

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.

1 Answer, 1 is accepted

Sort by
0
Nick Iliev
Telerik team
answered on 26 Apr 2016, 12:34 PM

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
Tags
General Discussion
Asked by
Peres
Top achievements
Rank 1
Answers by
Nick Iliev
Telerik team
Share this question
or