Anvil Uplink invalid response

I am trying to set up a server uplink on my local machine, for testing purposes.

I have followed the documentation, copying this code direct from the uplink menu.

Code Sample:

import anvil.server

I receive this runtime error when running my script:

I’ve tried running my app and or publishing the app before trying to connect the module but that doesn’t seem to help.

Am I missing something obvious?

Hi @MatthewDA, and welcome to the forum!

My best bet here is that outbound websocket connections are being blocked by a corporate firewall or proxy server (and the block message isn’t what the uplink is expecting, hence “Invalid response”). Does the same code work when you’re on your home network (without VPN)?

1 Like

Hi meredydd,

Thankyou for the quick response.

I think your right. It does work on my personal laptop.

I don’t fully understand connections, firewalls and proxies.

If I go to IT and ask them to allow web socket connections to wss://, do you think that would resolve the issue?


Hi Meredydd,

Our IT department is asked me what port and protocol this web socket connection uses.

I cant find any documentation regarding this. What should I tell them?

Hi @MatthewDA,

Yes, allowing connections to wss:// will do the trick! Websockets run on port 443, same as normal HTTPS web browsing, but you might need to explicitly allow that URL.

I am having the same issue but not with uplink I am using API call and this is the error:

ConnectTimeout: HTTPSConnectionPool(host=‘’, port=443): Max retries exceeded with url: /v2/public/scrivano.cfc?method=sendDiagnosisTranscription (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f83f1164e80>, ‘Connection to timed out. (connect timeout=None)’))

I am not sure if I have tell them to open this: wss:// or another.

Thank you for your help.