You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "FAURE SYSTEMS (JIRA)" <ji...@apache.org> on 2018/02/21 11:27:00 UTC

[jira] [Comment Edited] (CB-11123) Cordova Windows Universal App websockets not working

    [ https://issues.apache.org/jira/browse/CB-11123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16371259#comment-16371259 ] 

FAURE SYSTEMS edited comment on CB-11123 at 2/21/18 11:26 AM:
--------------------------------------------------------------

I guess not... I use mqttws31.js  (Eclipse Paho JavaScript client) in a Cordova App which runs well on Android simulator but not on Windows 10 with error:

{{Exception non gérée à la ligne 979, colonne 4 dans ms-appx-web://io.cordova.myapp6efe26/www/scripts/mqttws31.js}}
 {{0x800a139e - JavaScript runtime error: SecurityError a eu lieu}}

{{The line:}}{{ }}

{{this.socket = new WebSocket(wsurl, ["mqtt"]); }}

I added you suggestion :<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline'gap://ready gap: cdvfile: file: [https://ssl.gstatic.com|https://ssl.gstatic.com/] blob: ws: wss:;"/>

but same error.


was (Author: fauresystems):
I guess not... I use mqttws31.js  (Eclipse Paho JavaScript client) in a Cordova App which runs well on Android simulator but not on Windows 10 with error:

{{Exception non gérée à la ligne 979, colonne 4 dans ms-appx-web://io.cordova.myapp6efe26/www/scripts/mqttws31.js}}
{{0x800a139e - JavaScript runtime error: SecurityError a eu lieu }}

I added you suggestion :<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline'gap://ready gap: cdvfile: file: [https://ssl.gstatic.com|https://ssl.gstatic.com/] blob: ws: wss:;"/>

but same error.

> Cordova Windows Universal App websockets not working
> ----------------------------------------------------
>
>                 Key: CB-11123
>                 URL: https://issues.apache.org/jira/browse/CB-11123
>             Project: Apache Cordova
>          Issue Type: Wish
>          Components: cordova-windows
>    Affects Versions: 3.5.0
>         Environment: Windows 10
>            Reporter: Chetana YIN
>            Priority: Major
>              Labels: newbie
>
> I'm working on a mobile application build with Cordova, my server is using WebSockets and is reachable in my App on iOS, but i want to use my client side app on Windows 10, so i did an Apache Cordova Windows Universal App. Problem is that the only way to make it work, is when i use the client on the same computer as the server. I have access to internet (internet capabilities already set up). Does anyone have an idea of what can block the access to external websockets ? 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org