erikswed / InstaChatX

Originally the Appsrox.com chat IM using GCM, but now with AppCompat and more
21 stars 36 forks source link

Can´t send message #4

Closed qweqwe123 closed 10 years ago

qweqwe123 commented 10 years ago

Hi I download the zip and import it all work, but I can´t send a message:

If I click send the message Text field turn empty and nothing happen,

I add my other email from other phone and there is the text online, but it doesn´t work why?

himanshuagarwal77225 commented 10 years ago

I also have the same issue... when I test this app on real devices it does't work. I deployed on two real devices and add each other in contact list, following are the issues when i run this app:

  1. Other user don't get notified with any new contact add request.
  2. Status always remains online or remains showing connecting....
  3. Could not able to send or receive messages on real devices.

Please help or guide to solve this issues asap. Thanks

erikswed commented 10 years ago

Get the feeling none of you are running the GAE server

himanshuagarwal77225 commented 10 years ago

I deployed server code on app engine as described.

erikswed commented 10 years ago

In the Constants.java There should be no ending slash in the server URL String SERVER_URL = "http://insta-chat-x.appspot.com";

himanshuagarwal77225 commented 10 years ago

No still not able to resolve any of the mentioned issues.

qweqwe123 commented 10 years ago

Here is my constants.java

public interface Constants {

/**
 * Base URL of the Demo Server (such as http://my_host:8080/gcm-demo)
 */
String SERVER_URL = "http://xxxx-xxxxxx.appspot.com";//TODO provide server url e.g. http://demoserver.appspot.com

/**
 * Google API project id registered to use GCM.
 */
String SENDER_ID = "xxxxxxxxxxxxxxx";//TODO provide project id e.g. 4815162342

}

erikswed commented 10 years ago

What is your server log saying at https://appengine.google.com/ Im assuming your server is running and you have set up the String API_KEY correct. Do you have any entry in your DB at Datastore Viewer?

himanshuagarwal77225 commented 10 years ago

Here's my app engine log :

test

erikswed commented 10 years ago

When you run InstaChat it will register itself to the server. Is there any server log showing that this is happening? Also I see your log picture, That is just a Warning about KeyStore. You should have this "2014-04-07 10:01:16.392 /register" and the Datastore Viewer then have en entry gmail+regid. If not then your device cannot make the connection to your hostname gae

himanshuagarwal77225 commented 10 years ago

I can see entries in my datastore viewer "contact" schema has both device information, so what shall i do to resolve this?

erikswed commented 10 years ago

You must debug this, I would delete the contact data in the DB and try again, can the device /register again? If it can /register then it can send a GCM message to, unless you mistyped any projectid or API_KEY ....

himanshuagarwal77225 commented 10 years ago

yes i tried empty contact data and again run the app, it register my device and entries in contact data... what shall i do next?

erikswed commented 10 years ago

debug it, can the server send a gcm message?, ok, is the message received in the app?, ok, then why is it not showed in my chat window

himanshuagarwal77225 commented 10 years ago

I could't able to identify where is error or problem, using debug tool...

qweqwe123 commented 10 years ago

Can you say me how I can reset/delete the database and other things on appengine.Google.com?? Please

qweqwe123 commented 10 years ago

I got this error in appengine.Google.com

javax.servlet.ServletContext log: unavailable javax.servlet.UnavailableException: com.appsrox.messenger.server.RegisterServlet at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:79) at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:242) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:219) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:194) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:134) at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:446) at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:437) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:444) at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:188) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:308) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:300) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:441) at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251) at java.lang.Thread.run(Thread.java:724)

And this critical (most serve):

Uncaught exception from servlet javax.servlet.UnavailableException: Initialization failed. at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:228) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:194) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:134) at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:446) at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:437) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:444) at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:188) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:308) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:300) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:441) at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251) at java.lang.Thread.run(Thread.java:724)

erikswed commented 10 years ago

You cannot delete the DB because it's the Google BigTable. But you can delete the rows you insert. https://appengine.google.com/datastore/explorer? If you running in debug mode the db is located at war/WEB-INF/appengine-generated/local_db.bin

qweqwe123 commented 10 years ago

Okay thanks and can you find anything in the error?

erikswed commented 10 years ago

not really but check your web.xml mapping for RegisterServlet

On Mon, Apr 21, 2014 at 3:47 PM, qweqwe123 notifications@github.com wrote:

Okay thanks and can you find anything in the error?

— Reply to this email directly or view it on GitHubhttps://github.com/erikswed/InstaChatX/issues/4#issuecomment-40936267 .

qweqwe123 commented 10 years ago

Okay but Register is there