Problem with WebRTC connection on iOS

rickKoch

New Member
I'm using the web sdk and I'm trying to connect iPhone with the WCS but I have this issue:
WSServerHandler - WSS-pool-23-thread-1 THIS DOMAIN IS NOT ALLOWED origin: app://localhost allow: null

I tried with origin null, but also got this:
WSServerHandler - WSS-pool-23-thread-1 THIS DOMAIN IS NOT ALLOWED origin: null allow: null

Can you please help me with this
 

rickKoch

New Member
It's a hybrid application with Cordova, and we are using web sdk. So it's using safari in the background.

It's working fine with Android application.
 
Last edited:

rickKoch

New Member
I got this now:
WSServerHandler - WSS-pool-23-thread-1 Orgign: app://localhost
DomainChecker - WSS-pool-23-thread-1 Can't parse origin as URL app://localhost
WSServerHandler - WSS-pool-23-thread-1 THIS DOMAIN IS NOT ALLOWED origin: app://localhost allow: app://localhost

WSServerHandler - WSS-pool-23-thread-1 Close channel [id: 0x7f4209b2, /x.x.x.x:11662 => /x.x.x.x:8443] because: org.jboss.netty.handler.codec.http.websocketx.WebSocketHandshakeException 'not a WebSocket handshake request
: missing upgrade'
 

Max

Administrator
Staff member
WCS server can't parse passed origin: app://localhost
In current implementation, origin should be either

1) Empty (as sent from Android SDK and iOS SDK)

2) Valid URL, i.e. https://mycompany.com/page1.html or file://myapp

We raised internal ticket WCS-3219 to fix that.

Meanwhile you can avoid this error using nginx as a reverse proxy for Websocket protocol.

Example:

You connect to nginx wss://mydomain.com:443
Nginx proxies this connection to ws://localhost:8081 or wss://localhost:8443
Therefore you will be able to remove Origin header.
 

Max

Administrator
Staff member
Good day.
We fixed the issue with app://localhost origin in build 5.2.995. Please update and check.
 

marcw

Member
Hello!
I found this thread accidently. Does this mean that the WebSDK meanwhile is working on an iPhone? Some time ago that was still not possible due to restricted websockets/webrtc support.
I need it as a low latency audio only streaming.

Best regards
Marc
 
Last edited:

Max

Administrator
Staff member
Does this mean that the WebSDK meanwhile is working on an iPhone?
Yes, WebSDK works in iOS Safari browser since iOS 12. Additionally, WKVebview supports WebRTC since iOS 14.3 (we've teste this on iOS 14.5 and newer), so in iOS 14 WebRTC is also available in third party browsers (Chrome, Firefox), but they all have Safari under the hood.
 
Top