Is orbited 0.6 support Cross domain transport on Internet explorer 6/7 ?

17 views
Skip to first unread message

Donald Tse

unread,
Sep 2, 2008, 6:46:13 AM9/2/08
to Orbited Discussion
Hi all,

I have a similar setup as the the following post :

http://groups.google.com/group/orbited-users/browse_thread/thread/e121ee416ffe44ba/fd03afacea9d5fde?lnk=gst&q=ie+7#fd03afacea9d5fde

orbited.example.com:8000 to host orbited
example.com:80 to host tomcat
orbited.example.com:1500 to socket server

it works on firefox and safari, but not work on internet explorer. I
read some old post by Michael
, i believe it should be work on IE also.

I can observe my server when IE try to connect, but when client try to
send message to server, i found the the conn.readystate is still 2
( READY_STATE_OPENING )..

at the same times, IE developer tools prompts the following errors:

Err#1 : ( Orbited.js line 527 : ) transportOnReadFrame
when it run to switch case 'data', it prompts errors on
"Orbited.base64.decode , invalid return type "

************************************************
Orbited.base64.decode=function(/* string */str){
// summary
// Convert a base64-encoded string to an array of bytes
var s=str.split(""), out=[];
var l=s.length;
var tl=0;
while(s[--l]==p){ ++tl; } // strip off trailing padding
for (var i=0; i<l;){
var t=tab.indexOf(s[i++])<<18;
if(i<=l){ t|=tab.indexOf(s[i++])<<12 };
if(i<=l){ t|=tab.indexOf(s[i++])<<6 };
if(i<=l){ t|=tab.indexOf(s[i++]) };
out.push(String.fromCharCode((t>>>16)&0xff));
out.push(String.fromCharCode((t>>>8)&0xff));
out.push(String.fromCharCode(t&0xff));
}
// strip off trailing padding
while(tl--){ out.pop(); }
return out.join(""); // string
};"

******************************************************************

Err#2 ( static/HTMLFileFrame.js line 64 )

error : "Invalid document.domain for cross-frame communication"



------------------------------------------------------------------------------------

And here the is the i try to connect my socket server though orbited

var hostname = orbited.example.com;
var port = 1500;

document.domain = document.domain;
Orbited.settings.port = 8000;
Orbited.settings.hostname = 'orbited.example.com';

conn = new Orbited.TCPSocket();
conn.onread = StreamDataRequest.onRead;
conn.onclose = function(){
print( "Connection Closed", "red");
bConnected = false;
}
conn.onopen = function(){
login();
};
conn.open( hostname, port );

-------------------------------------------------------------------------------

Did i do somethings wrong?

Thanks in advance.
Donald Tse

Michael Carter

unread,
Sep 2, 2008, 7:24:20 AM9/2/08
to orbite...@googlegroups.com
Hey Donald,

It looks like you're doing everything right... I think there may have been some problem in the 0.6.0 release with IE 6/7 that have since been fixed. Try using trunk and see if that works. In the next day or two we'll be releasing 0.6.1 which should take care of these problems.

Donald Tse

unread,
Sep 2, 2008, 10:36:39 AM9/2/08
to Orbited Discussion
Hey Micheal.

Thanks for your quick response and effort.
I am looking forward to 0.6.1 : )

Donald


On 9月2日, 下午7時24分, "Michael Carter" <cartermich...@gmail.com> wrote:
> Hey Donald,
>
> It looks like you're doing everything right... I think there may have been
> some problem in the 0.6.0 release with IE 6/7 that have since been fixed.
> Try using trunk and see if that works. In the next day or two we'll be
> releasing 0.6.1 which should take care of these problems.
>
> On Tue, Sep 2, 2008 at 3:46 AM, Donald Tse <donaldtse...@gmail.com> wrote:
>
> > Hi all,
>
> > I have a similar setup as the the following post :
>
> >http://groups.google.com/group/orbited-users/browse_thread/thread/e12...

Donald Tse

unread,
Sep 3, 2008, 5:40:33 AM9/3/08
to Orbited Discussion
Hey Micheal,

I tried to download trunk version, but the problem still exist..at the
same time, i found that i found a syntax error and it should be the
root cause of Err#1 i mentioned..

Err#1 : ( Orbited.js line 543 : ) in transportOnReadFrame function...

" data = Orbited.base64.decode(frame.data);"

data is not define within this function, and ie would prompt error, so
that the readyState is always.." READY_STATE_OPENING ", and with is
observation, i found now i am able to connect my socket server while
orbited and tomcat hosting at the same domain..

Err#2 :
internet explorer developer tools show me "premission denied" when
running
"HEARTBEAT_TIMEOUT = parent.Orbited.settings.HEARTBEAT_TIMEOUT"
at HTMLFileFrame.js then alert "invalid document.domain." prompt out,
should be related to topDomain == null ..

Regards,
Donald

Michael Carter

unread,
Sep 3, 2008, 7:45:25 PM9/3/08
to orbite...@googlegroups.com


2008/9/3 Donald Tse <donald...@gmail.com>


Hey Micheal,

I tried to download trunk version, but the problem still exist..at the
same time, i found that i found a syntax error and it should be the
root cause of Err#1 i mentioned..

Err#1 : ( Orbited.js line 543 : ) in transportOnReadFrame function...

"  data = Orbited.base64.decode(frame.data);"

data is not define within this function, and ie would prompt error, so
that the readyState is always.." READY_STATE_OPENING ", and with is
observation, i found now  i am able to connect my socket server while
orbited and tomcat hosting at the same domain..
Hmm, apparently data is a global variable... I just fixed this in rev 541, but i haven't tested it (I don't have IE right atm)  

Err#2 :
internet explorer developer tools show me "premission denied" when
running
"HEARTBEAT_TIMEOUT = parent.Orbited.settings.HEARTBEAT_TIMEOUT"
at HTMLFileFrame.js then alert "invalid document.domain." prompt out,
should be related to topDomain == null ..

I'm not sure why this is failing. Could you create a ticket and upload your orbited.cfg, and the html file you're using?

Also, are you declaring <script>document.domain=document.domain</script> at the top of your html file? this is also necessary.

-Michael Carter

Donald Tse

unread,
Sep 4, 2008, 12:01:52 AM9/4/08
to Orbited Discussion
Hi Michael,

I created a ticket here : http://orbited.org/ticket/61
and added <script>document.domain=document.domain</script> at
the top of html file already.

Thanks,
Donald

On Sep 4, 7:45 am, "Michael Carter" <cartermich...@gmail.com> wrote:
> 2008/9/3 Donald Tse <donaldtse...@gmail.com>

zhouqimin

unread,
Sep 5, 2008, 1:46:47 AM9/5/08
to Orbited Discussion
In function transportOnReadFrame ,the variable "data" have not
declare,
then ,I modify the code of transportOnReadFrame as follow:
-----------------
var transportOnReadFrame = function(frame) {
........
//data = Orbited.base64.decode(frame.data) //old
code ,error in IE
var data = Orbited.base64.decode(frame.data)
.........
-----------------
then the "static/test_socket2.html" can run without error in IE

Donald Tse

unread,
Sep 5, 2008, 2:44:01 AM9/5/08
to Orbited Discussion
Hi qimin,

As Michael said, variable "data" is defined as global variable( but i
dunno where .. anyway, firefox, safari, chrome work ! )
I had tried to define this variable also.As I said in previous, it
works if while orbited and web server are hosting at the same
domain.. , but no work on web server and orbited hosted at different
sites ( cross sub-domain ).

> then the "static/test_socket2.html" can run without error in IE
Do you mean on same domain? ( i mean directly access the page host at
orbited )
or any new findings?

Regards,
Donald

Michael Carter

unread,
Sep 5, 2008, 3:36:35 AM9/5/08
to orbite...@googlegroups.com
On Thu, Sep 4, 2008 at 11:44 PM, Donald Tse <donald...@gmail.com> wrote:

Hi qimin,

As Michael said, variable "data" is defined as global variable( but i
dunno where .. anyway, firefox, safari, chrome work ! )
I had tried to define this variable also.As I said in previous, it
works if while orbited and web server are hosting at the same
domain.. , but no work on web server and orbited hosted at different
sites ( cross sub-domain ).

> then the "static/test_socket2.html" can run without error in IE
Do you mean on same domain? ( i mean directly access the page host at
orbited )
or any new findings?

I haven't had the chance yet to pursue this in earnest. I will get a fix out in the next few days though. Until then, any further research is welcome.

-Michael Carter
 

zhouqimin

unread,
Sep 5, 2008, 8:52:19 AM9/5/08
to Orbited Discussion
I mean on same domain, with different port .
my orbited on http://localhost:8000/
and my web page on http://localhost/test_socket.html

> but i dunno where .. anyway, firefox, safari, chrome work !
Yes.In javascript ,we can explicitly declare variables by use "var" ,
or implicitly declare by using the assignment operator . But in IE,we
must explicitly declare .

>but no work on web server and orbited hosted at different sites
I have not test in this case.By while orbited can work Cross-
platform,it's not necessary to run cross-domain

Donald Tse

unread,
Sep 7, 2008, 9:43:57 PM9/7/08
to Orbited Discussion
Hi all,

>I haven't had the chance yet to pursue this in earnest. I will get a fix out
in the next few days though. Until then, any further research is
welcome.

looking forward your good news :)

>Yes.In javascript ,we can explicitly declare variables by use "var" ,
or implicitly declare by using the assignment operator . But in IE,we
must explicitly declare .

thanks for your explanation : )

>I have not test in this case.By while orbited can work Cross-
platform,it's not necessary to run cross-domain

hm.. sorry i cant get your meaning.. but actually i have to host
orbited server and web-server ( say tomcat )
in different site ( cross sub-domain ) .. as i want both server are
listening at port 80, so that i avoid any firewall setting in client
side

Regards,
Donald Tse

On Sep 5, 8:52 pm, zhouqimin <zhouq...@gmail.com> wrote:
> I mean on same domain, with different port .
> my orbited onhttp://localhost:8000/
> and my web page onhttp://localhost/test_socket.html

zhouqimin

unread,
Sep 9, 2008, 10:57:02 PM9/9/08
to Orbited Discussion
I test it, it doesn't work while cross domain.
> > > > > > -Michael Carter- 隐藏被引用文字 -
>
> - 显示引用的文字 -

Donald Tse

unread,
Sep 16, 2008, 11:23:55 PM9/16/08
to Orbited Discussion
Hi Micheal,

any update for IE cross-sub domain issue?? thanks!

btw, I have another question about IE 7 :

while I reload the connected test page again, connection cannot be
made again after refresh, I have to close that IE instance and open
another IE to make another connection.

So, I tried to detect the time before tab close by
"window.onbeforeunload" and close those connection before a new one
by calling "tcp.close()" and "tcp.reset()", but it doesnt help.

while FireFox3.0 and Chrome Beta without this behaviour.

Thanks,
Donald

On Sep 5, 3:36 pm, "Michael Carter" <cartermich...@gmail.com> wrote:

Michael Carter

unread,
Sep 16, 2008, 11:32:13 PM9/16/08
to orbite...@googlegroups.com
On Tue, Sep 16, 2008 at 8:23 PM, Donald Tse <donald...@gmail.com> wrote:

Hi Micheal,

any update for IE cross-sub domain issue?? thanks!
I'm sorry to say, there is no progress on this issue. I have, unfortunately, had to cut back my hours for Orbited dramatically due to a back injury. I am more than happy to help someone fix it; I just can't tackle the problem myself right now. One thing that would be a dramatic help would be to try out old revisions until you isolate exactly where it broke (It definitely used to work.) That information could be enough to let me solve the problem relatively quickly.
 

btw, I have another question about IE 7 :

while I reload the connected test page again, connection cannot be
made again after refresh, I have to close that IE instance and open
another IE to make another connection.

So, I tried to detect the time before tab close by
"window.onbeforeunload" and close those connection before a  new one
by calling "tcp.close()" and "tcp.reset()", but it doesnt help.

Is this the case with the latest 0.7 in svn? I recall fixing something similar not too long ago.


-Michael Carter

Donald Tse

unread,
Sep 16, 2008, 11:58:31 PM9/16/08
to Orbited Discussion
I'm sorry to hear u got injury...please take ur time to recover
first :)

>One thing that would be a dramatic help would be to try
> out old revisions until you isolate exactly where it broke (It definitely
> used to work.) That information could be enough to let me solve the problem
> relatively quickly.

I did a ticket #61, do u mean those information?

> Is this the case with the latest 0.7 in svn? I recall fixing something
> similar not too long ago.

oh.. this is observed in 0.6.1 let me have a look on 0.7 first,
thanks :)

Donald Tse



On Sep 17, 11:32 am, "Michael Carter" <cartermich...@gmail.com> wrote:

Michael Carter

unread,
Sep 17, 2008, 12:35:16 AM9/17/08
to orbite...@googlegroups.com
On Tue, Sep 16, 2008 at 8:58 PM, Donald Tse <donald...@gmail.com> wrote:

I'm sorry to hear u got injury...please take ur time to recover
first :)

>One thing that would be a dramatic help would be to try
> out old revisions until you isolate exactly where it broke (It definitely
> used to work.) That information could be enough to let me solve the problem
> relatively quickly.

I did a ticket #61, do u mean those information?

You can check out a particular revision with svn co -r ###, where ### is the revision number that you want. So what I'm saying is that you should look at the revision history of Orbited.js http://www.orbited.org/log/trunk/daemon/orbited/static/Orbited.js and starting with the latest revision, check each version out and test it again the bug. This way we can isolate which revision introduced this bug. Then its a simple matter of analyzing the changelog and we should be able to track down the problem.

-Michael Carter

Donald Tse

unread,
Sep 17, 2008, 2:58:16 AM9/17/08
to Orbited Discussion
>oh.. this is observed in 0.6.1 let me have a look on 0.7 first,

I cant install 0.7 with python 2.5 neither in linux nor windows... I
got the following error..

" python2.5 setup.py install
running install
running bdist_egg
running egg_info
writing requirements to orbited.egg-info/requires.txt
writing orbited.egg-info/PKG-INFO
writing top-level names to orbited.egg-info/top_level.txt
writing dependency_links to orbited.egg-info/dependency_links.txt
writing entry points to orbited.egg-info/entry_points.txt
Traceback (most recent call last):
File "setup.py", line 51, in <module>
'Topic :: Software Development :: Libraries :: Python Modules'
File "distutils/core.py", line 151, in setup
File "distutils/dist.py", line 974, in run_commands
File "distutils/dist.py", line 994, in run_command
File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/
setuptools/command/install.py", line 76, in run
File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/
setuptools/command/install.py", line 96, in do_egg_install
File "/usr/lib/python2.5/cmd.py", line 333, in run_command
del help[cmd]
File "distutils/dist.py", line 994, in run_command
File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/
setuptools/command/bdist_egg.py", line 167, in run
File "/usr/lib/python2.5/cmd.py", line 333, in run_command
del help[cmd]
File "distutils/dist.py", line 994, in run_command
File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/
setuptools/command/egg_info.py", line 171, in run
File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/
setuptools/command/egg_info.py", line 252, in find_sources
File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/
setuptools/command/egg_info.py", line 306, in run
File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/
setuptools/command/egg_info.py", line 333, in add_defaults
File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/
setuptools/command/sdist.py", line 45, in walk_revctrl
File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/
setuptools/command/sdist.py", line 52, in _default_revctrl
File "/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/
setuptools/command/sdist.py", line 98, in entries_finder
NameError: global name 'log' is not defined "


> You can check out a particular revision with svn co -r ###, where ### is the
> revision number that you want. So what I'm saying is that you should look at
> the revision history of Orbited.jshttp://www.orbited.org/log/trunk/daemon/orbited/static/Orbited.jsand
> starting with the latest revision, check each version out and test it again
> the bug. This way we can isolate which revision introduced this bug. Then
> its a simple matter of analyzing the changelog and we should be able to
> track down the problem.

I would try it out soon.

Donald Tse

unread,
Sep 17, 2008, 6:08:40 AM9/17/08
to Orbited Discussion
> You can check out a particular revision with svn co -r ###, where ### is the
> revision number that you want. So what I'm saying is that you should look at
> the revision history of Orbited.jshttp://www.orbited.org/log/trunk/daemon/orbited/static/Orbited.jsand
> starting with the latest revision, check each version out and test it again
> the bug. This way we can isolate which revision introduced this bug. Then
> its a simple matter of analyzing the changelog and we should be able to
> track down the problem.

I tried to use different revision of Orbited.js from 521 to 478... on
IE 6
but no one work with my test.html in cross sub-domain setup

those errors are "invalid domain", "object not found" etc..
is it supposed work in old version?

Regards,
Donald

Michael Carter

unread,
Sep 17, 2008, 10:46:41 AM9/17/08
to orbite...@googlegroups.com
Just to be clear, you're using stream.example.com:8000 for the orbited server, and example.com:80 for the web app?

Althought I believe you can do both cross-subdomain and cross-port, I'm not sure. If this is your setup, can you try doing example.com:8000 for orbited, and example.com:80 for the web app, or stream.example.com:80 for orbited, and example.com for the web app?

-Michael Carter

Donald Tse

unread,
Sep 17, 2008, 9:38:16 PM9/17/08
to Orbited Discussion
I were using the following setup for cross-sub domain test
stream.example.com:8001 ( orbited )
example.com:80 ( tomcat )

for cross-port, same domain setup, it is fine for IE7 and IE6 in the
lastest version ( 521 ) if no reload ..

Donald Tse

On Sep 17, 10:46 pm, "Michael Carter" <cartermich...@gmail.com> wrote:
> Just to be clear, you're using stream.example.com:8000 for the orbited
> server, and example.com:80 for the web app?
>
> Althought I believe you can do both cross-subdomain and cross-port, I'm not
> sure. If this is your setup, can you try doing example.com:8000 for orbited,
> and example.com:80 for the web app, or stream.example.com:80 for orbited,
> and example.com for the web app?
>
> -Michael Carter
>

Donald Tse

unread,
Sep 19, 2008, 3:14:49 AM9/19/08
to Orbited Discussion
Hi Micheal,

I got a funny founding about IE cross sub-domain and I would like
share with you.
It is about the problem with "invalid domain" ....

I found that if I first visit www.google.com ( or other public site ),
then go to my test.html
that no more error message come out. Both IE6 and IE7 work.

It is repeatable, so I think it is one of a main reason why that error
come out..

This is how I add my "custom domain" :

I just modified c:\windows\system32\drivers\etc\hosts
and add "example.com", "stream.example.com" into it.

But I have not test it on a real "public domain". I wonder is it a
special characteristic for IE to resolve domain name lead this error..

Regards,
Donald

adadcalledrichard

unread,
Sep 20, 2008, 7:55:22 AM9/20/08
to Orbited Discussion
Hi everyone,

I am also encountering the same issue when trying to use orbited0.6.1
cross-domain on IE7. It works fine on Firefox 3 and Google Chrome.

My main page is served from www.example.com
Orbited 0.6.1 server is running on orb1.example.com

I had to change document.domain='example.com' on the main page (rather
than document.domain=document.domain) to get the XSHRBridge.html not
to throw errors when it calculates topDomain. I think this is because
the main page document.domain=www.example.com, so the XSHRBridge.html
coul dnot set a matching document domain (e.g. example.com). Now I
have got that working,this has now caused the HTMLFileFrame.js to
throw a Invalid document.domain. message. I found this post:
http://blogs.msdn.com/dthorpe/archive/2007/09/27/cross-domain-communication-using-domain-lowering.aspx
which seems to say that scripts should not rely on being able to lower
the domain (e.g. orb1.example.com down to example.com) and then raise
it back up again (e.g. back to orb1.example.com) which is what the
XSHRBridge.html script does. I am happy to private mail the actual
URLs I have set up to test this if you need a live cross-domain site
setup to help diagnose.

Regards,
Richard

On Sep 19, 8:14 am, Donald Tse <donaldtse...@gmail.com> wrote:
> Hi Micheal,
>
> I got a funny founding about IE cross sub-domain and I would like
> share with you.
> It is about the problem with "invalid domain" ....
>
> I found that if I first visitwww.google.com( or other public site ),

Michael Carter

unread,
Sep 20, 2008, 4:12:50 PM9/20/08
to orbite...@googlegroups.com
On Sat, Sep 20, 2008 at 4:55 AM, adadcalledrichard <adadcall...@gmail.com> wrote:

Hi everyone,

I am also encountering the same issue when trying to use orbited0.6.1
cross-domain on IE7.  It works fine on Firefox 3 and Google Chrome.

My main page is served from www.example.com
Orbited 0.6.1 server is running on orb1.example.com

I had to change document.domain='example.com' on the main page (rather
than document.domain=document.domain) to get the XSHRBridge.html not
to throw errors when it calculates topDomain.  I think this is because
the main page document.domain=www.example.com, so the XSHRBridge.html
coul dnot set a matching document domain (e.g. example.com).  Now I
have got that working,this has now caused the HTMLFileFrame.js to
throw a Invalid document.domain. message.   I found this post:
http://blogs.msdn.com/dthorpe/archive/2007/09/27/cross-domain-communication-using-domain-lowering.aspx
which seems to say that scripts should not rely on being able to lower
the domain (e.g. orb1.example.com down to example.com) and then raise
it back up again (e.g. back to orb1.example.com) which is what the
XSHRBridge.html script does.  I am happy to private mail the actual
URLs I have set up to test this if you need a live cross-domain site
setup to help diagnose.

Unfortunately we don't support subdomains of the form you're using, which is X.b.c and Y.b.c. Instead you need to do Y.b.c and X.Y.b.c, for instance orbited.www.example.com, and www.example.com.

-Michael Carter
 

adadcalledrichard

unread,
Sep 25, 2008, 4:40:29 PM9/25/08
to Orbited Discussion
I changed the subdomain to orb1.www.example.com, change the
document.domain assignment line to document.domain=document.domain,
and it worked on IE7, FF3 and Chrome. Thanks!

On Sep 20, 9:12 pm, "Michael Carter" <cartermich...@gmail.com> wrote:
> On Sat, Sep 20, 2008 at 4:55 AM, adadcalledrichard <
>
>
>
> adadcalledrich...@gmail.com> wrote:
>
> > Hi everyone,
>
> > I am also encountering the same issue when trying to use orbited0.6.1
> > cross-domain on IE7.  It works fine on Firefox 3 and Google Chrome.
>
> > My main page is served fromwww.example.com
> > Orbited 0.6.1 server is running on orb1.example.com
>
> > I had to change document.domain='example.com' on the main page (rather
> > than document.domain=document.domain) to get the XSHRBridge.html not
> > to throw errors when it calculates topDomain.  I think this is because
> > the main page document.domain=www.example.com, so the XSHRBridge.html
> > coul dnot set a matching document domain (e.g. example.com).  Now I
> > have got that working,this has now caused the HTMLFileFrame.js to
> > throw a Invalid document.domain. message.   I found this post:
>
> >http://blogs.msdn.com/dthorpe/archive/2007/09/27/cross-domain-communi...
Reply all
Reply to author
Forward
0 new messages