I created a simple web app card game that is currently in development mode.
The way it works is simple: users log in and start playing. To play, the user clicks on three cards that make a match and clicks submit. Submit sends the names of the chosen cards to the server to be saved. Then the next round is loaded and presented.
However, in testing, some of my users are getting stuck in the game after clicking submit.
An investigation in the console reveals a message:
POST https://myproj.herokuapp.com/api/user/billy/saveResult
net::ERR_NAME_NOT_RESOLVED
I can't figure out why this is happening. The save mechanism works for other rounds. Why does this randomly happen suddenly to some rounds?
Any ideas?
ERR_NAME_NOT_RESOLVED is given when the request can not reach the DNS server and therefore can not translate the given name into an IP sequence. This might be given to a bad connection to internet resulting to null network service, for example.
You could try to point directly to the IP address, so the request does not need to be translated and can be pointed direclty to the server. So instead of having:
POST https://myproj.herokuapp.com/api/user/billy/saveResult
You could try:
POST https://54.225.236.39/api/user/billy/saveResult
Please, also note that this could also be caused by a wrong Proxy Settings SetUp in case you have one.
Hope it helps!
Related
Stack: Nextjs, expressjs, socket.io, WebRTC
I'm trying to build a video chat, at the moment everything works fine only if the second user joins and agrees to use the camera and has one at all.
Otherwise, the connection is established, a chat is available between two users, but user 2 does not receive the video stream of user 1.
I put this code on github for more clarity and a better understanding of what is happening.
Very big cosmic thanks for help!
You are calling createOffer without the "legacy" offerToReceive* constraints. Without these, if the user creating the offer does not have a camera they will only negotiate audio and not attempt to negotiate video.
See https://webrtc.github.io/samples/src/content/peerconnection/pc1/ for a sample using those options.
I've ported the WebRTC demo app to work with the flask framework.
the strange thing is that everything is working perfect when one of the users is not logged in.
but when I login both users, I don't get the onIceConnectionStateChanged = connected.
I don't see any connection between the two modules (I've kept the apprtc random number user)
any ideas ?
I assume you are testing this from Chrome. In Chrome you can type in "chrome://webrtc-internals" to get all of the info about your ICE connection and other webrtc related debug information. If you already know this, do you see that any errors on that page?
Couple of ideas:
1. Make sure that setLocalDescription or setRemoteDescription steps succeed on both clients.
2. Check and make sure that all of your ICE-related info(like STUN or TURN servers) are correctly specified.
I have implemented Google App Engine's Channel API feature in my application. Everything runs smoothly. I create new channels every one hour for every user. I have managed to maintain one channel per session (same channel for different tabs in a browser). I have implemented the onerror and onclose methods in such a way that every time they are invoked, a call is made to the server requesting for a valid token.
Sometimes, after the channel's been alive for a while, it gets disconnected. I can see failed HTTP calls to talkgadget.google.com on the JavaScript console. The URLs are something like this:
https://129.talkgadget.google.com/talkgadget/dch/bind?VER=8&clid=.....
These calls have responses like "401 (Token timed out)" or "401 (Token invalid)".
Which is indeed true, the token used by the client is invalid. It should get updated with the new token but the onerror or onclose methods aren't invoked. How am I supposed to figure out when this would happen or how to handle it? There is no real way to say if a client is disconnected or not except for the onerror or onclose methods. This issue is resolved if I refresh the page (I get the valid token from database every time the user refreshes).
I checked the socket objects's "readyState" property and it had the value 1. There are many who face this issue and as of date, there seems to be no valid solution offered by the folks at GAE.
Edit: I'm a premium account holder and this issue is holding back our deployments.
Edit 2: Having one channel per tab reduces the frequency of this happening. But it doesn't solve the problem completely.
It has been six days since I posted the question and there has been no response from the AppEngine team or any other users.
The workaround I applied was to have a button on the site that would fetch the (valid) token from the database, close the channel and then open it again with the token received.
Sometimes its a new token which should've been received before, sometimes its the same token that had been valid all along.
This issue cannot be replicated often I agree, but when it happens, it causes a lot of damage. I hope I find a solution soon.
Edit: Having one channel per tab reduces the frequency of this happening. But it doesn't solve the problem completely.
Steps to Reproduce (unexpected behavior in bold):
I successfully create an app contact via the Python Starter App
I successfully subscribe to timeline notifications
I take a photo with Glass
I share that photo with my app contact
The photo is duplicated on the timeline
The app's callbackUrl is never pinged (yet POSTing manually via curl works fine)
Attempting to delete the duplicated photo card makes the Glass OS glitch out until reboot
Posting some sample code with actual URLs may help us spot a possible error, but two things you may want to look into as you're debugging:
Don't forget that the URL in your contact must be HTTPS. HTTP URLs are not supported.
Check the contact object that is returned when you create the contact. It may be worth checking to make sure the URL and everything else is as you expect it to be... and then test against THAT URL.
Can you also clarify what you mean by "glitch out" in this case?
I am slowly making some progress on figuring out how Litmus (litmus.com/analytics) and some other companies actually track email opens by which Email Client the user is using.
I found this really cool article written a long time ago that basically helped me get a start to actually understanding what goes into just simply tracking opens.
http://webanalyticsinsight.wordpress.com/2010/03/04/how-to-track-email-open-rates/
I'm no developer but I'm assuming there must be some sort of get_browser() that would allow me to do this.
any push in the right direction would help, thanks.
It's done by inserting a small hosted image into each message that is sent. The URL to the location where the image is hosted is unique for each message, so this way the system can determine which messages have been opened (provided that the recipient's mail client is set to open hosted images).
See: http://ultrasmtp.com/resources/openedmessagealerts.php for more info.