I am using licensed UD 2.5.3 on IIS with windows authentication enabled, running on port 80.
I have a grid which displays data, from SQL DB, I added a button to the grid which performs some calculations and using Show-UDModal display it. However, as soon as I click on the button the following message appears: Cannot send data if the connection is not in the ‘Connected’ State.
If I am running the same on localhost, it work as expected.
Please help to understand where is the problem and how to fix it.
Hi @shykhovtsov are you able to post some code behind this? I too am using 2.5.3 and SQL DB and have no issues on displaying a model for example via a button I build into the grid. Sounds like you are loosing connection to your DB. Bit hard to troubleshoot without seeing your code…So if possible please upload, I do have some examples of how I am doing this on gihub under the same alias I use here psdevuk
Hi @psDevUK
As i mentioned above, it is not related to SQL, here is example of code without SQL query which is not working when I am accessing the dashboard from remote.
Here is the page code:
On my iPhone atm as my kids want me to take them out…anyways so just asking before I’m assuming but I run everything through my windows 10 pc through iis. Is this the same for you? Sounds similar. Can you ping iis machine from remote machine ok? Is it just this dashboard or any dashboard you having issues with? I had to run some firewall commands through good old cmd for my dashboard to work. Peace
I am using windows 10, target IIS server is windows 2016.
All the ports are open between client and server.
Found something interesting, tried to execute it using edge and it is working - but, in console there are other errors.
Before tested it on Chrome, Version 76.0.3809.132 (Official Build) (64-bit)
I found the issue - it was combination of chrome and “Set Character Encoding” extension, as soon as I disabled this extension everything started to work.
Very sorry for all the noise and thank you for prompt support!
I’m also getting the same issue. When browsing to my dashboard, or hitting f5 on any page in chrome I get a grey screen, nothing loads for a good few minutes.
In the console, I’m noticing websocket connection attempts are timing out, on the retry, this works and the page loads.
This does not occur in IE.
Errors from chrome console:
shboardhub' to 'https://_____/dashboardhub'.
WebSocketTransport.js:35 WebSocket connection to 'wss://_____/dashboardhub?id=NnidBS6MPMSiowDf1erM4Q' failed: WebSocket opening handshake timed out
||(anonymous)|@|WebSocketTransport.js:35|
| --- | --- | --- | --- |
||(anonymous)|@|WebSocketTransport.js:33|
||step|@|tslib.es6.js:97|
||(anonymous)|@|tslib.es6.js:78|
||fulfilled|@|tslib.es6.js:68|
Utils.js:148 Error: Failed to start the transport 'WebSockets': undefined
||push.ConsoleLogger.log|@|Utils.js:148|
| --- | --- | --- | --- |
||(anonymous)|@|HttpConnection.js:248|
||step|@|tslib.es6.js:97|
||(anonymous)|@|tslib.es6.js:78|
||rejected|@|tslib.es6.js:69|
Utils.js:154 Information: SSE connected to https://____/dashboardhub?id=ebtck1Yl6svFA99R_9MM6w
Utils.js:154 Information: Using HubProtocol 'json'.
Is there anything we can do to aid this issue? It’s a bit of a blocker for us at the moment as our organisation heavily relies on chrome.
Eventually it does, after a couple of mins for the timeout, the websocket retries, connects and my page loads. I’m hosting in IIS v10 on Win Server 2016. I’ve tried clearing the browser cache but this still occurs.
I use Chrome or Edgium for pretty much everything so I doubt it’s a Chrome issue. I wonder if it has to do with HTTPS or something. I think we gotta try upgrading SignalR soon. It sounds like there are some fixes that might help resolve so weirdness like this.
I’d also be curious to hear if you see this issue when hosting locally as well as IIS.
I thought this morning I’d test this without https.
Removed the 443 binding in IIS and disabled my http > https rewrite rule.
Restarted the app pool & site, cleared my local cache etc.
Everything is working as expected… so I’ve re-added everything back in and now I cant seem to replicate my issue again! For sure it’s an odd one. I’ll keep you updated, if I can replicate it again I’ll test hosting locally also.
Just to throw some evidence in the mix, I am running UD on Ubuntu 18 & PSCore 6. I created a basic dashboard (via script) which calls another Powershell script for dynamic content. Three buttons. Press a button, and it runs that external script with a switch and returns a value in a Toast message. If I leave the page idle for a few minutes and then press a button I get the “Cannot send data […]” message. iOS, Android, FireOS (over Mobile Hotspot or WAN). Reloading page fixes connection. Desktop systems (WAN or Mobile Hotspot) seem to keep the connection alive much longer (Win10, Raspbian Buster, Chrome-based browsers). Might be related to client keep-alive rather than server?