getting error while executing ionic App in terminal using command $ionic serve? - ionic-framework

I have installed
Node.js
Cordova
ionic
After Installation I created a project as
$ionic start myApp
$cd myApp
$ionic serve
but localhost doesn't load any thing and terminal shows the following error:
The port 8100 was taken on the host localhost - using port instead
Gulp startup tasks: 0=sass, 1=watch
Running live reload server: undefined
Watching: 0=www/**/*, 1=!www/lib/**/*
Running dev server: http://localhost:
Ionic server commands, enter:
restart or r to restart the client app from the root
goto or g and a url to have the app navigate to the given url
consolelogs or c to enable/disable console log output
serverlogs or s to enable/disable server log output
quit or q to shutdown the server and exit
ionic $ events.js:141
throw er; // Unhandled 'error' event
^
Error: listen EADDRNOTAVAIL 192.168.1.5
at Object.exports._errnoException (util.js:870:11)
at exports._exceptionWithHostPort (util.js:893:20)
at Server._listen2 (net.js:1221:19)
at listen (net.js:1270:10)
at net.js:1379:9
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:64:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:83:10)
What is the problem?

Update your ionic version
npm install -g ionic
or
npm install -g ionic#1.1.7
or
npm install -g ionic#1.1.9-beta1

Yes, I got the solution
I needed to use the following code before using
$ ionic serve
first, type
$ionic address
it will show
1)your IP-Address
2)localhost
select 1st option i.e. your IP-Address
and now, you can go with $ionic serve
its, working now.
Thanks All.

Related

Getting INSTALL_FAILED_UPDATE_INCOMPATIBLE error

Appium Server version: 1.7.1
OS: Windows 8
While running the code I got
org.openqa.selenium.WebDriverException:
An unknown server-side error occurred while processing the command.
Original error:
Error executing adbExec.
Original error:
'Command 'D\:\\Android\\android-sdk\\platform-tools\\adb.exe -P 8080 -s ------ install C\:\\Users\\resi\\AppData\\Local\\Programs\\appium-desktop\\resources\\app\\node_modules\\appium\\node_modules\\appium-unlock \\bin\\unlock_apk-debug.apk' exited with code 1';
Stderr: 'Failed to install C:\Users\resi\AppData\Local\Programs\appium-desktop \resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk:
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE:
Package io.appium.unlock signatures do not match the previously installed version; ignoring!]'; Code: '1'
error and Appium Setting page is opened and instant closed in real Android device instead of opening app (.apk file)
You need to cleanup the device you are using:
Go to Settings -> Apps
Delete you application under test using Uninstall for all users menu
Delete Appium Settings app
Restart your test and it should work

start a new project in IONIC error

i want to start a new project in IONIC with this command "ionic start myApps tabs" but i get this error :
[INFO] Fetching app base (https://github.com/ionic-team/ionic2-app-base/archive/master.tar.gz) × Downloading - failed! Error: unable to verify the first certificate at Error (native) at TLSSocket. (_tls_wrap.js:1092:38) at emitNone (events.js:86:13) at TLSSocket.emit (events.js:185:7) at TLSSocket._finishInit (_tls_wrap.js:610:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)
please help me to solve it
Be sure that you have the latest node, cordova and ionic cli updates.
Try to stop all server instances. I mean stop the localhost:8080 server.

Livereload not working with Ionic serve command

I run:
ionic serve
✗ (node:7616) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Running dev server: http://localhost:8100
Running live reload server: http://localhost:35729
Watching : [ 'www/**/*', '!www/lib/**/*' ]
Ionic server commands, enter:
restart or r to restart the client app from the root
goto or g and a url to have the app navigate to the given url
consolelogs or c to enable/disable console log output
serverlogs or s to enable/disable server log output
quit or q to shutdown the server and exit
My chrome starts with livereload activated
My source code contains
<script>//<![CDATA[
document.write('<script src="//' + (location.hostname || 'localhost') + ':35729/livereload.js?snipver=1"><\/script>')
//]]></script>
IOnic detects changes on file:
ionic $ JS changed: C:\Users\Proxymis\Desktop\ionic\Monuma\www\js\controllers.js
JS changed: C:\Users\Proxymis\Desktop\ionic\Monuma\www\js\controllers.js
When I open the local host on port 35729 I got
{"tinylr":"Welcome","version":"0.0.5"}
But when I modify my page, my page NEVER reloads !

Error starting ionic project

I have installed Node.js to start with an ionic project.
I have also installed ionic and cordova using the commands below:
npm install ionic -g
npm install cordova -g
I am using the command below to create an ionic project:
ionic start myApp blank
And i m getting the following error:
D:\IonicWork>ionic start myApp blank
Creating Ionic app in folder D:\IonicWork\myApp based on blank project
Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip
Error with start Error: connect ETIMEDOUT 192.30.253.121:443
at Object.exports._errnoException (util.js:1036:11)
at exports._exceptionWithHostPort (util.js:1059:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
Error Initializing app: Error: connect ETIMEDOUT 192.30.253.121:443
Error: connect ETIMEDOUT 192.30.253.121:443
at Object.exports._errnoException (util.js:1036:11)
at exports._exceptionWithHostPort (util.js:1059:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
Caught exception:
Error: connect ETIMEDOUT 192.30.253.121:443
at Object.exports._errnoException (util.js:1036:11)
at exports._exceptionWithHostPort (util.js:1059:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
Please suggest.
Thanks,
Malini
If you are on a company network, you are most probably behind a corporate web proxy. There are plenty of solution out there.
For a headstart, you need to add http_proxy and https_proxy environment variables based on the proxy you got from your company IT department.
Open your node command prompt in administrator mode and run following command. After that, close and restart your node command prompt and try to run ionic start again.
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
Better to start in ionic creator.and its the better place for design also

Ionic run on device not working - daemon issue

It was working find, however now I'm getting the below error, when I run this command:
ionic run android
ERROR running one or more of the platforms: Error: adb: Command failed with exit code 1 Error output:
adb I 3000 58815 usb_osx.cpp:259] Found vid=04e8 pid=6860 serial=41007659c88da12f
adb I 3000 58815 usb_osx.cpp:259]
error: could not install smartsocket listener: Address already in use
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
You may not have the required environment or OS to run this project