-
-
Notifications
You must be signed in to change notification settings - Fork 750
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
Setting request shared attribute to true causes JavaScript errors in Firefox, IE, and Safari #1102
Comments
I'll look at this. Just make to sure what's your jquery, jquery.atmopshere and os version? If you can provide a test case as a war or a maven project, it would be very nice. |
onLocalMessage is fired by pushLocal method. You need to execute that method with string data explicitly maybe in onMessage callback and with response.responseBody property.
This may be related to https://github.com/flowersinthesand/portal/wiki/Browser-Quirks#a-blank-page-pops-up-when-there-is-a-shared-connection But, the current source's 597 line indicates something wrong. I'm not sure. The problem I find is that when the master connection dies, all the slaves are trying to make the real connection. Originally, the one called 'heir' do that and the others connects to the real connection made by the heir after 100ms. However, it seems that this is broken. By any chance, did you experience this as well? |
Atmosphere Version = 1.0.13
I did have a pushLocal call within the method that was my onMessage callback
No, the page rendered fine but the page just did not update/receive any local push messages. |
Okay, can you test again with jquery.atmosphere-2.0.1? |
Using Atmosphere version 1.0.13 and the jquery.atmosphere.js file, setting the shared attribute on the request leads to two different JavaScript errors in IE and Firefox.
For the following two errors, I was able to verify that only one connection was being created regardless of the amount of tabs that I opened. However, messages were not being shared across tabs.
It also appears that only the page that initially opens the connection is able to receive the push messages. Other tabs that are opened do not receive updates and the onLocalMessage callback is no invoked.
The following are the errors I was able to find.
IE Error (Tested with versions 8, 9, 10)
Firefox Error (Firefox 20)
TypeError: get(...) is null
set("children", get("children").concat([guid]));
In Chrome, it seems that some of the functionality works. I was able to load my site on two tabs and get them to exchange data across tabs. However, functionality did not work the first few times when the tabs to my site were initially created. (I apologize for not being more specific but I am unsure whether my clicking on one tab/refreshing that tab and then performing the same actions on the next page were what got both tabs finally in sync to receive push updates on both). I could not produce any JavaScript errors.
In Safari, I receive the same error as Firefox at line 382
TypeError: 'null' is not an object (evaluating 'get("children").concat')
I can include some of the js code if desired, but I am not including it here because it is really that that different than what is listed here (https://github.com/Atmosphere/atmosphere/wiki/Sharing-connection-between-Browser%27s-windows-and-tabs).
The text was updated successfully, but these errors were encountered: