Error gap_init:2

815 views
Skip to first unread message

Sankalp Reddy

unread,
Oct 8, 2015, 12:00:16 PM10/8/15
to phonegap
Hello,

I am just beginning with Phonegap. 

These are the only steps I ran. I have not added or updated anything. All that I am running is the generated content.

phonegap create PGHelloWorld com.csc.HelloWorld Hello
phonegap platforms add android
phonegap platforms add browser
phonegap build

phonegap serve browser

When accessing via the browser (Chrome v 45.0.2454.1.1) the following alerts are shown and the browser only shows "Connecting to Device"

gap_init:2
gap:[null,"StatusBar","_ready","StatusBar1030499370"]
gap:[null,"App","show","App1030499371"]
gap:[null,"File","requestAllPaths","File1030499372"]
gap:[null,"NetworkStatus","getConnectionInfo","NetworkStatus1030499373"]
gap:[null,"Device","getDeviceInfo","Device1030499374"]]

Running on OS - Win 7 (64 bit), Phonegap - v5.3.6.

The following is seen in the console:
[phonegap] [console.log] deviceready has not fired after 5 seconds.
[phonegap] [console.log] Channel not fired: onFileSystemPathsReady
[phonegap] [console.log] Channel not fired: onCordovaConnectionReady
[phonegap] [console.log] Channel not fired: onCordovaInfoReady

I have similar results with android.

Any pointers on why this is happening and how it can be addressed will be helpful

Thanks
Sankalp

Sankalp Reddy

unread,
Oct 9, 2015, 8:03:03 AM10/9/15
to phonegap
Hello,

Got this sorted out for the android devices. 

When checking for android, my mistake was to use the command "phonegap serve browser" and then try to access the url from the emulator.
The "server" command as I understand from some of the threads is primarily for the "Phonegap App Developer".

What worked was to use the "run" command instead - "phonegap run android".
This opened the emulator and installed the .apk on the emulator.
My guess is that when a real device is not connected (via USB) the emulator is invoked for the .apk to be installed.

Works with the "Genymotion" emulator when the .apk is dragged and dropped in the emulator.

Not very sure if this is the way to be tested but will continue to do so till I find something better.

Need to figure a faster way to check this - maybe via the browser. 
Invoking the emulator all the time is time consuming.

Thanks and regards
Sankalp

Jesse Monroy

unread,
Oct 9, 2015, 4:59:05 PM10/9/15
to phonegap
Thanks for your response. I'm sure it will help others.
Reply all
Reply to author
Forward
0 new messages