[appengine-java] Re: Channel API reconnect after token timeout
...finally figured out how to properly remove the iframe from a GWT app: public static native void removeChannelApi() /*-{ var child = $wnd.parent.document.getElementById("wcs-iframe"); if ( child != null ) { child.parentNode.removeChild(child); } }-*/; -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/sg_sPX024w8J. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Channel API reconnect after token timeout
Still I experience issues when a token times out. Did anybody manage to renew a timed out token? Thanks, Daniel -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/IAl1tPXX5FkJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Channel API reconnect after token timeout
Hi there, (First I'm french... so please apologize for my english mistakes) I'm working with GAE, using python, and get the same problem as you, to refresh tokens for users allready connected just to say... I've started a chat-script, by using a login script, with session in python: from gaesessions import get_current_session & for example, calling the session using : def Guestbook(message, tokens=None): > if not tokens: > tokens = memcache.get('tokens') > if tokens: > session = get_current_session() > user=session.get('user_name') But each time I restarted the server, the user wasn't automatically reconnected... which is quite the same problem as yours here is my issue, from client-side : > > > > GAE Test-Channel-API > > #userlist { > margin: 5px 0 0 0; > padding: 5px; > border: 1px solid #ccc; > height: 320px; > overflow: auto; > font-size:12px; > } > > > > > reco_count=0; > $(document).ready( > function() { > var token; > function get_token() { > if (token) {return false;} ;// try to prevent duplicate entry > $.get('/get_token', function(data){ > if (data) { > reco_count=0; > token = data; > document.getElementById('userlist').innerHTML=token + " connected!
" > openChannel(); > } > else > { > document.getElementById('userlist').innerHTML=document.getElementById('userlist').innerHTML+"Can't > > connect... Channel Full ? !
"; > } > }); > setTimeout(function() {if (!token) {Reconnect();} },4000 ); // retry to > connect > } > get_token(); > > function Reconnect() { > setTimeout(function() {if (token) {reco_count=0; return false;} else > {reco_count=reco_count+1; > document.getElementById('userlist').innerHTML="Server error !
Trying to > reconnect ("+reco_count+")... fail
"; get_token(); }; }, 4000); > } > function onClose() { > token=null; > Reconnect(); > } > function onError() { > token=null; > Reconnect(); > } > function onOpen() { > $.post('/open', {'token': token}); > } > function onMessage(m) { > // getting message > // TODO > } > function openChannel() { > var channel = new goog.appengine.Channel(token); > var handler = { > 'onopen': onOpen, > 'onmessage': onMessage, > 'onerror': onError, > 'onclose': onClose > }; > channel.open(handler); > } > $(window).bind('beforeunload', function() { > if (token) { > document.getElementById('userlist').innerHTML=document.getElementById('userlist').innerHTML+token > > + " disconnected!
" > $.post('/del_token', {'token': token}); > } > }) > } > ) > > > > > Hoping it will help some, Rgds, guibs -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/cqdUw6HMleYJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Channel API reconnect after token timeout
Hey, I am also experiencing this problem. Trying to reconnect from the client side after the token expiries with no luck. I'm using the gwt-gae-channel library on client side. I was just wondering if you have found a solution to this problem? Thanks Joe -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Channel API reconnect after token timeout
I've received a reasonable workaround from Google Enterprise Support: You can use a timer on the client side to renew the token before it expires. This will work somehow... -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/NivXiDrqW7QJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Channel API reconnect after token timeout
Hey, I am also experiencing this problem. Trying to reconnect from the client side after the token expiries with no luck, I'm using the gwt-gae-channel library on client side. I was just wondering if you have found a solution to this problem? Thanks Joe -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/qwj6druVlUsJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.