Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with phonegap serve #272

Open
Chener opened this issue Mar 4, 2015 · 12 comments
Open

Problem with phonegap serve #272

Chener opened this issue Mar 4, 2015 · 12 comments
Milestone

Comments

@Chener
Copy link

Chener commented Mar 4, 2015

The cli command phonegap serve should have some issues.

When I use phonegap serve to deploy and open Phonegap Developer App to test my app, it first shows a dialog with "gap-init:2" then output the following errors info:

[phonegap] [console.log] deviceready has not fired after 5 seconds.
[phonegap] [console.log] Channel not fired: onCordovaReady
[phonegap] [console.log] Channel not fired: onFileSystemPathsReady
[phonegap] [console.log] Channel not fired: onCordovaConnectionReady

However , if I use Phonegap Desktop App then deploy the app created by it, everything works fine. I also tried first create by cli phonegap create myApp then import myApp into Phonegap Desktop App and deploy it with Desktop App, still great. Then, guess you already know it, try phonegap serve the app created by Phonegap Desktop App, it gets the errors above.

I should be using the latest version. I guess it is somehow related to Phonegap Developer App, so here it is.

@timkim
Copy link
Contributor

timkim commented Mar 7, 2015

Hi @Chener

What device are you using to test the PhoneGap Developer app with? It seems strange that it would work for one but not the other. The PhoneGap Desktop App and the PhoneGap Developer App both use connect-phonegap to serve content.

@Chener
Copy link
Author

Chener commented Mar 7, 2015

@timkim One is Android 4.4.2 with Samsung Note 3, another one is Android 4.2.2 with Galaxy S4.

@timkim
Copy link
Contributor

timkim commented Mar 7, 2015

Hrm, well I just tested your repo: https://github.com/Chener/tlyblOA and used phonegap serve and it works for me on both iOS and Android.

Can you do phonegap -v and also check to see which version of the PhoneGap Developer app you have on your phones?

@Chener
Copy link
Author

Chener commented Mar 7, 2015

@timkim phonegap -v 4.2.0-0.24.2
PhoneGap Developer App 1.0.0

As I am in China, I can not access the Google Play, so I had to search the web to download this app, would you consider hosting the app on your website for people like me ?

@Chener
Copy link
Author

Chener commented Mar 7, 2015

@timkim I just retested, still the same results.
However, I found out one weird thing which I did not find the last time:

If using with Phonegap Developer App, sometimes the camera would not function well. I had to just wait until it worked... (may need to wait until profile photos loaded or active other APIs such as location first)

@timkim
Copy link
Contributor

timkim commented Mar 7, 2015

Ok, so your phonegap module is up to date but your app is not. The current version is 1.4.0 so that's probably the reason why it is failing for you. If you can't access the Google Play store you can build the developer app for your phone from this repo and deploy it yourself.

Here are the steps:

  1. Clone this repo: git clone https://github.com/phonegap/phonegap-app-developer.git
  2. cd phonegap-app-developer
  3. cordova run android --device (You may need to set up your android dev environment for this to work - see this guide: http://cordova.apache.org/docs/en/4.0.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide)

If you still can't get that to work, then you could downgrade your phonegap cli to version 3.3.0-0.19.6 by going npm install [email protected]

@Chener
Copy link
Author

Chener commented Mar 7, 2015

@timkim Thank you for your help! I am going to try that out.

@timkim
Copy link
Contributor

timkim commented Mar 7, 2015

Let me know how it goes! If all else fails, I guess I can put up the apk file somewhere so you can just grab it. Also, as noted in another thread, the camera api is kinda broken in the PhoneGap Developer App. It should be able to take a picture but getting the actual picture back from the camera won't work.

@Chener
Copy link
Author

Chener commented Mar 9, 2015

@timkim Hi, it all works, well partly.
This time, with phonegap 4.2.0-0.24.2, both cli and developer app behave the same. However, the "Call Office", "SMS" etc won't work, while it has the native notification working. On the other hand, using Phonegap Build, the "Call Office", "SMS" etc all work, but the native notification does not. I do not know what is wrong, there is no output from the console.

@Chener
Copy link
Author

Chener commented Mar 10, 2015

@timkim One other thing, Phonegap Develop App still does not support cookie, does it? While the same code built by Phonegap Build supports cookie ?

@timkim
Copy link
Contributor

timkim commented Mar 10, 2015

Hi @Chener

I'd have to take a closer look at why the call and sms functionality won't work. I'll try to invest sometime into that this week. And cookies currently are not working. See these issues for more info:

#253
#231

@Chener
Copy link
Author

Chener commented Mar 11, 2015

@timkim I changed the code address, it is here now.
I tested on both my andriod phones:

  • Android 4.4.2 with Samsung Note 3 (N3)
  • Android 4.2.2 with Samsung Galaxy S4 (S4)

With Phonegap Developer App, acting as the following:

  • Call Office False
  • Call Cell False
  • SMS False
  • Email False
  • Add location True for S4 without GPS enabled, False for N3 with GPS enabled.
  • Add to contacts True
  • Change Picture True
  • Native Alert True

With real App built with Phonegap Build, the results are:

  • Call Office True
  • Call Cell True
  • SMS True
  • Email True
  • Add location True for S4 without GPS enabled, False for N3 with GPS enabled.
  • Add to contacts True
  • Change Picture True
  • Native Alert False

Thank you for your time!

@mwbrooks mwbrooks modified the milestone: Backlog Sep 11, 2015
@mwbrooks mwbrooks removed the backlog label Sep 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants