Flotype / now

NowJS makes it easy to build real-time web apps using JavaScript
http://www.nowjs.com
MIT License
1.91k stars 175 forks source link

Doesn't seem to work with Android's web browser (tested in the emulator) #12

Closed chadlung closed 13 years ago

chadlung commented 13 years ago

I just published a blog article where I built a simple chat application using NowJS and JQuery Mobile. I noticed it worked fine in Chrome and Firefox but doesn't work in the Android Web Browser (emulator). I then tried the example code from the nowjs repository and that didn't work either in the Android emulator (the initial prompt never shows up). I think this is tied into how the now.js file is sent (based upon warnings from Chrome) but I'm not sure.

You can see the code I used for the chat demo here: http://www.giantflyingsaucer.com/blog/?p=2535

Chad Lung

ericz commented 13 years ago

Hey Chad,

We're looking into this, thanks!

chadlung commented 13 years ago

Update: I've now tried the example code as well as my own code on an actual Droid X (not the emulator) and I get the same issue. One of the warnings I see is: "Resource interpreted as Script but transferred with MIME type text/plain."

ericz commented 13 years ago

Hey Chad,

We just tried it on a Android 2.1 emulator and a physical Android 2.2 Motorola Droid. Both devices showed the prompt and seemed to work fine for the chat demo.

Can you make sure you are on the latest version available in npm? We have recently fixed a bug that caused similar symptoms in Safari. We're not sure if that issue also existed on Android; regardless the new version may make a difference.

If you are already using the latest version, would you mind sharing the exact code you're running that triggers the failure?

Thanks, Eric

chadlung commented 13 years ago

Ok I've done some more work on this. I'm using NowJS version 0.2.3. I got it working finally and what I had to do was change the path for the Now.js file to this (in the HTML file):

script src="nowjs/now.js"

I had it originally set to the IP address of my Ubuntu machine and it would work on Chrome or Firefox from another machine but not on Android. I made the path change and now it works on everything. You can close this issue if you want, thanks for the help.

Chad Lung

ericz commented 13 years ago

Thanks for the bug report Chad!