Crossbar newbie question about browser support

#1

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

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

PS. sorry for my bad english :slight_smile:

0 Likes

#2

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

···

Am 16.10.2014 11:37, schrieb Zhou Chao:

PS. sorry for my bad english :slight_smile:

--
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.

0 Likes

#3

Thank u. I use flash policy successfully

0 Likes