Crossbar newbie question about browser support

148 views
Skip to first unread message

Zhou Chao

unread,
Oct 16, 2014, 5:37:40 AM10/16/14
to autob...@googlegroups.com
I use crossbar.io with pyramid
I run pyramid on port 6543 and crossbar.io on port 8786
I already can communicate over websockets, so I want to comply old browser support
I already try these solutions
  1. read  https://github.com/crossbario/crossbar/wiki/Browser%20Support
  2. use https://github.com/gimite/web-socket-js/,  but it dont support wamp, I guess need DIY?
  3. use longpoll by AutobahnJS, but error happen. 
XMLHttpRequest cannot load http://127.0.0.1:8786/lp/open. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:6543' is therefore not allowed access. The response had HTTP status code 501.
because cross origin

chrome developr console output:
AutobahnJS debug enabled 
trying to create WAMP transport of type: longpoll
longpoll.Factory.create 
new http_post request http://127.0.0.1:8786/lp/open {"protocols":["wamp.2.json"]} 2000
using WAMP transport type: longpoll 
XMLHttpRequest cannot load http://127.0.0.1:8786/lp/open. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:6543' is therefore not allowed access. The response had HTTP status code 501. 
longpoll.Transport: could not open transport 0 
retrying in 1.4713375856010915 s 

I dont know how to solve this problem


PS. sorry for my bad english :)
 

Tobias Oberstein

unread,
Oct 17, 2014, 12:56:01 PM10/17/14
to autob...@googlegroups.com
Am 16.10.2014 11:37, schrieb Zhou Chao:
> I use crossbar.io with pyramid
> I run pyramid on port 6543 and crossbar.io on port 8786
> I already can communicate over websockets, so I want to comply old
> browser support
> I already try these solutions
>
> 1. read https://github.com/crossbario/crossbar/wiki/Browser%20Support
> 2. use https://github.com/gimite/web-socket-js/, but it dont support
> wamp, I guess need DIY?

No, that should work. I added that to Crossbar.io:

https://github.com/crossbario/crossbar/wiki/Flash-Policy-Transports

Note: I only tested this with recent Chrome/IE _forcing_ use of Flash.
We could need help testing this with say IE8/9+Flash10+ ...

> 3. use longpoll by AutobahnJS, but error happen.
>
> XMLHttpRequest cannot load http://127.0.0.1:8786/lp/open. No
> 'Access-Control-Allow-Origin' header is present on the requested
> resource. Origin 'http://127.0.0.1:6543' is therefore not
> allowed access. The response had HTTP status code 501.
>
> because cross origin
>
>
> chrome developr console output:
>
> AutobahnJS debug enabled
> trying to create WAMP transport of type: longpoll
> longpoll.Factory.create
> new http_post request http://127.0.0.1:8786/lp/open
> {"protocols":["wamp.2.json"]} 2000
> using WAMP transport type: longpoll
> OPTIONS http://127.0.0.1:8786/lp/open
> XMLHttpRequest cannot load http://127.0.0.1:8786/lp/open. No
> 'Access-Control-Allow-Origin' header is present on the requested
> resource. Origin 'http://127.0.0.1:6543' is therefore not allowed
> access. The response had HTTP status code 501.
> longpoll.Transport: could not open transport 0
> retrying in 1.4713375856010915 s
>
>
> I dont know how to solve this problem

Please file a bug against AutobahnPython .. this should work. But I need
more time to look into / track this down.

Cheers,
/Tobias

>
>
> PS. sorry for my bad english :)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to autobahnws+...@googlegroups.com
> <mailto:autobahnws+...@googlegroups.com>.
> To post to this group, send email to autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/autobahnws/6c1ee105-b9f7-49cc-a08a-2a78f2d55684%40googlegroups.com
> <https://groups.google.com/d/msgid/autobahnws/6c1ee105-b9f7-49cc-a08a-2a78f2d55684%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Zhou Chao

unread,
Oct 20, 2014, 4:52:21 AM10/20/14
to autob...@googlegroups.com
Thank u. I use flash policy successfully
Reply all
Reply to author
Forward
0 new messages