-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example doesn't work #9
Comments
What kind of device are you viewing this on? Could you also give the full error text? crosstab does some UA Sniffing to see if you are on mobile, as any browser environment that freezes tabs not displayed is unsupported. If crosstab detects that something is unsupported, it saves that setting in localStorage and will continue to be unsupported even if you switch emulation modes in chrome. You need to click "Clear Local Storage Setup Keys" in the demo and refresh the page on standard desktop chrome to have the example work. |
I took a fresh clone of the repo and run grunt then loaded the demo on Chrome, and it works for me. However looking through the code again, I realized it won't print that a frozen tab environment was detected if it was set in localStorage, so I will update that to report the error correctly. I strongly suspect this is what happened in your case, but let me know when you get a chance to try it out again. Thanks for reporting this! |
Hello. Problem still present. Desktop Ubuntu 14.10. Chrome 39.0.2171.95 (64-bit) - latest |
@IAlexanderI -- could you also give the following information?
Thanks |
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 Error message: Error: crosstab not supported: frozen tab environment detected Error happens when i try send message. |
Were the steps I outlined pretty much exactly what you did? The error you are getting indicates that pinging the master tab timed out, which is how the "frozen tab environment" gets set. I'll grab an Ubuntu vagrantfile and test later today. For now I would suggest clearing localStorage and reloading to see if the issue goes away. You can also try bumping up the timeout here: https://github.com/tejacques/crosstab/blob/master/src/crosstab.js#L468-L469 from 100ms to something like 1000ms. |
Hmm.. I clear localStorage - then all works fine. Thank you. |
No problem. My best guess for now is that on your initial pageload there was a little bit of lag which caused the ping to time out. I'll keep this issue open for now while I investigate how often this occurs across a variety of different machines and script configurations. It's possible that this is a random event that didn't just affect you. |
Another question. How can i use library, without angular. |
You don't need to use angular, the example page just uses it since that was an easy way to whip up a test page. You can look here for a quick overview: https://github.com/tejacques/crosstab#api Here's a very quick example: crosstab.on('testEvent', function(message) {
console.log('tab: ' + message.origin + ', message: ' + message.data);
});
crosstab.broadcast('testEvent', 'testMessage'); output
|
The timeout doesn't seem to be an issue in further testing, so for now I'm closing this. |
Example doesn't work - please check it. Browser Chrome - errorText - crosstab not supported - without explain. FF - ok
The text was updated successfully, but these errors were encountered: