Locally trying apprtc demo , facing issue in token and channel creation.

999 views
Skip to first unread message

Shilpa Pradeep

unread,
Jul 16, 2013, 10:21:50 AM7/16/13
to discuss...@googlegroups.com
Am trying apprtc demo on my local machine,
Steps i followed

2)am using eclipse IDE,downloaded the google appengine sdk and google plugin for eclipse.
3)created the project of type new web application .
3)created a folder apprtc in /war directory and copied all the source files there except index.html,i modifed the index.html file by default comes with the project and added the code of apprtc index.html.
4)built and deployed the code using the ID.
5)started the web app server in debug mode,the console log says as ,
Jul 16, 2013 2:21:06 PM com.google.appengine.tools.info.RemoteVersionFactory getVersion
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:559)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
at java.net.URL.openStream(URL.java:1010)
at com.google.appengine.tools.info.RemoteVersionFactory.getVersion(RemoteVersionFactory.java:76)
at com.google.appengine.tools.info.UpdateCheck.getApplicationVersionInfo(UpdateCheck.java:151)
at com.google.appengine.tools.info.UpdateCheck.maybePrintNagScreen(UpdateCheck.java:361)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:316)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:274)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:250)
Jul 16, 2013 2:21:07 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\Users\shilpap\workspace\Guestbook2\war\WEB-INF/appengine-web.xml
Jul 16, 2013 2:21:07 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed C:\Users\shilpap\workspace\Guestbook2\war\WEB-INF/web.xml
Jul 16, 2013 2:21:07 PM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
INFO: Overwriting system property key 'java.util.logging.config.file', value 'C:\Users\shilpap\Downloads\eclipse-jee-kepler-R-win32\eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.8.1.1\appengine-java-sdk-1.8.1.1\config\sdk\logging.properties' with value 'WEB-INF/logging.properties' from 'C:\Users\shilpap\workspace\Guestbook2\war\WEB-INF\appengine-web.xml'
Jul 16, 2013 2:21:08 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Jul 16, 2013 2:21:08 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
Jul 16, 2013 2:21:10 PM com.google.apphosting.utils.jetty.JettyLogger info
Jul 16, 2013 2:21:10 PM com.google.appengine.tools.development.AbstractServer startup
INFO: Server default is running at http://localhost:8888/
Jul 16, 2013 2:21:10 PM com.google.appengine.tools.development.AbstractServer startup
INFO: The admin console is running at http://localhost:8888/_ah/admin
Jul 16, 2013 2:21:10 PM com.google.appengine.tools.development.DevAppServerImpl start
INFO: Dev App Server is now running

6)now i entered the url http://localhost:8888/ on the chrome(apprtc.appspot.com works fine on chrome),for this request(below) am getting the exact index.html file in response.not getting token,room_link/key and app server not creating channel.
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Cache-Control:max-age=0
Connection:keep-alive
Host:localhost:8888
If-Modified-Since:Tue, 16 Jul 2013 05:27:14 GMT
User-Agent:Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36
Response Headersview source
Cache-Control:public, max-age=600
Content-Length:1945
Content-Type:text/html
Date:Tue, 16 Jul 2013 11:18:30 GMT
Last-Modified:Tue, 16 Jul 2013 05:27:14 GMT
Server:Development/1.0

7)response for this request looks like
<meta http-equiv="X-UA-Compatible" content="chrome=1"/>

<link rel="canonical" href="{{ room_link }}"/>
<link rel="stylesheet" href="apprtc/stylesheets/main.css" />

<script type="text/javascript" src="/_ah/channel/jsapi"></script>

<script src="/apprtc/js/main.js"></script>
<!-- Load the polyfill to switch-hit between Chrome and Firefox -->
<script src="/apprtc/base/adapter.js"></script>
  </head>
  <body>
  <script type="text/javascript">
  var channelToken = "{{ token }}";
  var me = '{{ me }}';
  var roomKey = '{{ room_key }}';
  var roomLink = '{{ room_link }}';
  var initiator = '{{ initiator }}';
  var pcConfig = '{{ pc_config|safe }}';
  var pcConstraints = '{{ pc_constraints|safe }}';
  var offerConstraints = '{{ offer_constraints | safe }}';
  var mediaConstraints = '{{ media_constraints | safe }}';
  ar turnUrl = '{{ turn_url }}';
  var stereo = '{{ stereo }}';

  setTimeout(initialize, 1);
</script>
<div id="container" ondblclick="enterFullScreen()"> 
  <div id="card">
    <div id="local">
      <video id="localVideo" autoplay="autoplay" muted="true"/>
    </div>
    <div id="remote">
      <video id="remoteVideo" autoplay="autoplay">
      </video>
      <div id="mini">
        <video id="miniVideo" autoplay="autoplay" muted="true"/>
      </div>
    </div>
  </div>
</div>
 </body>
  <footer id="footer">
</footer>
</html>

8)if i use http://ID.appspot.com also results in same issue.

Am i missing any configurations here.

Thanks in advance,
Shilpa

Vikas

unread,
Jul 16, 2013, 8:23:01 PM7/16/13
to discuss...@googlegroups.com
Hi,

I usually test apprtc demo locally have not faced any issues. I test with Google App Engine launcher ( version 1.8.0) and add apprtc source path by clicking on add existing application and then hit run. What error are you getting, maybe you should try directly with Google app engine launcher? 

/Vikas

Shilpa Pradeep

unread,
Jul 17, 2013, 4:36:51 AM7/17/13
to discuss...@googlegroups.com
Hi Vikas,
Thaks for your reply.
 
I tried on google appengine launcher(1.8.1) as you suggested,added the project and hit run and  opened http://localhost:8888/ and http://ID.appspot.com ,
google appengine launchers console log just shows as below,
 
2013-07-17 13:19:59 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=11080', '--admin_port=8003', 'E:\\webrtcMedia\\apprtc']"
INFO     2013-07-17 13:20:08,233 devappserver2.py:528] Skipping SDK update check.
WARNING  2013-07-17 13:20:08,295 api_server.py:314] Could not initialize images API; you are likely missing the Python "PIL" module.
WARNING  2013-07-17 13:20:08,299 simple_search_stub.py:955] Could not read search indexes from c:\users\shilpap\appdata\local\temp\appengine.testrtcapp1\search_indexes
INFO     2013-07-17 13:20:08,335 api_server.py:138] Starting API server at:
http://localhost:55379
INFO     2013-07-17 13:20:08,341 dispatcher.py:164] Starting server "default" running at: http://localhost:11080
INFO     2013-07-17 13:20:08,348 admin_server.py:117] Starting admin server at: http://localhost:8003
 
and does not recieves any request from the client.
 
Thanks,
Shilpa

Shilpa Pradeep

unread,
Jul 17, 2013, 11:36:12 AM7/17/13
to discuss...@googlegroups.com
Hi Vikas,
 
please ignore my earlier reply for this .
from launcher when i ran ,am getting the errors like,

INFO 2013-07-17 15:22:10,315 apprtc.py:332] Redirecting visitor to base URL to /?r=74873992

HTTPError()

HTTPError()

Traceback (most recent call last):

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate

req.respond()

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond

self.server.gateway(self).respond()

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond

response = self.req.server.wsgi_app(self.env, self.start_response)

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 250, in __call__

INFO 2013-07-17 15:22:10,320 module.py:595] default: "GET / HTTP/1.1" 500 -

return app(environ, start_response)

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/tools/devappserver2/request_rewriter.py", line 311, in _rewriter_middleware

response_body = iter(application(environ, wrapped_start_response))

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 89, in __call__

self._flush_logs(response.get('logs', []))

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 225, in _flush_logs

apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall

return stubmap.MakeSyncCall(service, call, request, response)

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/api/apiproxy_stub_map.py", line 328, in MakeSyncCall

rpc.CheckSuccess()

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl

self.request, self.response)

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 200, in MakeSyncCall

self._MakeRealSyncCall(service, call, request, response)

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 226, in _MakeRealSyncCall

encoded_response = self._server.Send(self._path, encoded_request)

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/tools/appengine_rpc.py", line 393, in Send

f = self.opener.open(req)

File "/usr/lib/python2.7/urllib2.py", line 400, in open

response = meth(req, response)

File "/usr/lib/python2.7/urllib2.py", line 513, in http_response

'http', request, response, code, msg, hdrs)

File "/usr/lib/python2.7/urllib2.py", line 438, in error

return self._call_chain(*args)

File "/usr/lib/python2.7/urllib2.py", line 372, in _call_chain

result = func(*args)

File "/usr/lib/python2.7/urllib2.py", line 521, in http_error_default

raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

HTTPError: HTTP Error 403: Forbidden

Traceback (most recent call last):

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate

req.respond()

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond

self.server.gateway(self).respond()

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond

response = self.req.server.wsgi_app(self.env, self.start_response)

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 250, in __call__

return app(environ, start_response)

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/tools/devappserver2/request_rewriter.py", line 311, in _rewriter_middleware

response_body = iter(application(environ, wrapped_start_response))

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 89, in __call__

self._flush_logs(response.get('logs', []))

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 225, in _flush_logs

apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall

return stubmap.MakeSyncCall(service, call, request, response)

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/api/apiproxy_stub_map.py", line 328, in MakeSyncCall

rpc.CheckSuccess()

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl

self.request, self.response)

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 200, in MakeSyncCall

self._MakeRealSyncCall(service, call, request, response)

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 226, in _MakeRealSyncCall

encoded_response = self._server.Send(self._path, encoded_request)

File "/home/shilpa.p/Desktop/MediaEngine/go_appengine/google/appengine/tools/appengine_rpc.py", line 393, in Send

f = self.opener.open(req)

File "/usr/lib/python2.7/urllib2.py", line 400, in open

response = meth(req, response)

File "/usr/lib/python2.7/urllib2.py", line 513, in http_response

'http', request, response, code, msg, hdrs)

File "/usr/lib/python2.7/urllib2.py", line 438, in error

return self._call_chain(*args)

File "/usr/lib/python2.7/urllib2.py", line 372, in _call_chain

result = func(*args)

File "/usr/lib/python2.7/urllib2.py", line 521, in http_error_default

raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

HTTPError: HTTP Error 403: Forbidden

Any network setting issue here?.
 
Thanks,
Shilpa P

On Wednesday, July 17, 2013 5:53:01 AM UTC+5:30, Vikas wrote:

Vikas

unread,
Jul 17, 2013, 3:39:16 PM7/17/13
to discuss...@googlegroups.com
Sorry not sure about the problem you can probably post in GAE forums. Also came across this post that you can check : http://stackoverflow.com/questions/16102739/dev-server-http-error-403-forbidden

/Vikas

Shilpa Pradeep

unread,
Jul 18, 2013, 3:37:46 AM7/18/13
to discuss...@googlegroups.com
Hi Vikas,
 
Its working!!. Thank you very much.
Did http_proxy=http://10.64.2.43:80.
then restarted server.apprtc demo is working fine locally.
one more thing is do this apprtc demo running on my localhost depends on any external server apart from turn and stun server?
 
Thanks,
Shilpa P

Vikas

unread,
Jul 18, 2013, 3:12:33 PM7/18/13
to discuss...@googlegroups.com
Great, regarding your question apprtc only uses STUN & TURN server.

/Vikas

Shilpa Pradeep

unread,
Jul 26, 2013, 9:18:36 AM7/26/13
to discuss...@googlegroups.com
Hi Vikas,
 
Thanks for your reply.
But in wireshark am seeing two http request going whenever i ran the apprtc demo on my localmachine,
the two request's are( the info from wireshark packet capture am giving below)
 
2)CONNECT ssl.gstatic.com:443 HTTP/1.1
 
Am  not able to understand the purpose of these request.
could you kindly share your thoughts on this.

Thanks,
Shilpa P

--
 
---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/VYS8khIRw7I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Shilpa Pradeep

unread,
Jul 29, 2013, 11:02:03 AM7/29/13
to discuss...@googlegroups.com
Hi Vikas,
 
Any idea on the below requests?

Thank You,
Shilpa P

Rajmohan Banavi

unread,
Jul 29, 2013, 12:38:36 PM7/29/13
to discuss...@googlegroups.com
They might be requests from some other application, browser tab or browser on your local machine.



You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Life is here and now, not yesterday, not tomorrow...!

ega...@vov.com.co

unread,
Sep 4, 2013, 9:23:45 AM9/4/13
to discuss...@googlegroups.com

 have installed the apprtc python application in my linux server, its ok when trying to connect between browsers, but when I'm trying to create peer2peer with the apprtcdemo app for android, I get this error in my channel.html "the provided token is no valid", I see that when I change the android app urlhttps://apprtc.appspot.com/?r= to a custom domain , its weird because if I just use the first url it works...

Could someone help me with that?

Tks very much


Brave Yao

unread,
Sep 4, 2013, 11:05:41 PM9/4/13
to discuss...@googlegroups.com
ApprtcDemo is not like chrome on Android. ApprtcDemo has its own client implementation which simulates the GAE channel functionality. If you try to customize it, you'd better change all the relative stuff, plus your own TURN server. Basically the default TURN server won't work with your own domain. It's hard to make any comments here, so you have to study and modify it carefully.

ega...@vov.com.co

unread,
Sep 5, 2013, 8:58:46 AM9/5/13
to discuss...@googlegroups.com
Ok, do you know about some example where use Apprtc Demo with a custom server? I have tried a lot but not success.... really appreciate it

Satish Patel

unread,
Dec 28, 2013, 4:46:30 AM12/28/13
to discuss...@googlegroups.com
Hi Shilpa/Vikas,

Did you successfully got the video on your browser after setting http_proxy?
I have deployed the server on local. But when I access it (http://localhost:9080/?r=49586402) it gives message "Waiting for someone to join: http://localhost:9080/?r=49586402" and no video, Now when I access the same url from other browser it give message "Initializing".

Thanks
Satish

Shilpa Pradeep

unread,
Dec 31, 2013, 4:24:59 AM12/31/13
to discuss...@googlegroups.com
On chrome browser(v32) i was able to get the video and set up the call.On which browser version are you trying apprtc demo.


--

Satish Patel

unread,
Dec 31, 2013, 6:29:24 AM12/31/13
to discuss...@googlegroups.com

Hi Shilpa,

The issue was because of missing referenced adapter.js. I have resolved it.
Sorry for not responding after solution.

thanks

Biraj Zalavadia

unread,
Jan 8, 2014, 6:51:40 AM1/8/14
to discuss...@googlegroups.com
Hi guys I am new to Webrtc.

By learning from your discussion I got success to Run apprtc demo locally and its works fine between browsers.

Now I am trying to connect from my android device.

My local server is running at

http://192.168.5.85:8080/?r=42141888

I replace
http://apprtc.appspot.com
with
http://192.168.5.85:8080

In Android Apprtc Demo project.

Everything is works able to connect to room. It says "waiting for ice candidates".
But not able to access the channel.

When I see my logcat I found this :

01-08 17:16:33.246: D/WebRequest(18298): start loading url: file:///_ah/channel/dev?command=poll&channel=7bdd25025cd381e6dfe3de5563902c13-channel-3333995373-1389183375-foo/91236113

01-08 17:16:33.247: D/chromium(18298): request for [file:///_ah/channel/dev?command=poll&channel=7bdd25025cd381e6dfe3de5563902c13-channel-3333995373-1389183375-foo/91236113]failed, restarting..

01-08 17:16:33.247: D/chromium(18298): request for [file:///_ah/channel/dev?command=poll&channel=7bdd25025cd381e6dfe3de5563902c13-channel-3333995373-1389183375-foo/91236113]failed, restarting..

01-08 17:16:33.247: D/WebRequest(18298): request error: -6

01-08 17:16:33.247: D/chromium(18298): Unknown chromium error: -6

And When I Inspect browser I found.



What can be the issue?

In android
file:///
and in browser
http://192.168.5.85:8080/

How to fix these issue?

Thanx in advance.


Reply all
Reply to author
Forward
0 new messages