Vaadin 14 - VaadinPush.js websocket failure - return code 501

Hi Vaadin team,
I alway receive error message when i load page.

vaadinPush.js?v=2.0.7:1196 WebSocket connection to ‘wss://;%20charset=UTF-8&X-atmo-protocol=true’ failed: Error during WebSocket handshake: Unexpected response code: 501

see details on attached file.

This may be framework issue ?
Vaadin version 14.0.0.



Sounds like you are using @Push but the server does not have websockets enabled for one reason or another. Or you have a proxy in between which does not support websockets.

What is your setup?

yes, we use @Push.
our server also has 2 endpoints for websocket (wss). One for device connects to server, one is javascript we load to browser.
and third one is Vaadin push.
only thing is our server only enables to listern wss at port 8443. we are using pivotal web service.
how to config for Vaadin push understand wss port 8443 ?
if we test at localhost, it is fine.

here is our wss you can try:


i think Vaadin @push should have an option to enable config listen port for ws/wss.

Vaadin uses the server features to add websocket endpoints so any configuration related to that would need to happen in the server. If you have changed the address through a proxy or similar, you can force your Vaadin app to use a given URL for push using getUI().getPushConfiguration().setPushUrl("...") but that will not change the URL that websocket endpoints are deployed to


let say my domain is:
and i only want Vaadin push using wss at port 8443, which param do i need to set to setPushUrl(" ???") ?

is this ?:


i got message below after set @push to use websocket (attched file).

VM1261 vaadinPush.js:2124 Access to XMLHttpRequest at 'wss://' from origin '' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
_executeRequest @ VM1261 vaadinPush.js:2124
_pushOnClose @ VM1261 vaadinPush.js:2565
_disconnect @ VM1261 vaadinPush.js:462
_close @ VM1261 vaadinPush.js:491
AtmosphereRequest.close @ VM1261 vaadinPush.js:2922
atmosphere.unsubscribe @ VM1261 vaadinPush.js:2991
(anonymous) @ VM1261 vaadinPush.js:3430
VM1261 vaadinPush.js:2124 GET wss:// net::ERR_FAILED


before establishing websocket, vaadinpush.js called XMLHttpRequest.
why vaadinpush.js needs a XMLHttpRequest request if we already set transport for it is websocket ?
in case if vaadinpush.js still needs do a XMLHttpRequest, it should not use entire of the url was set on getPushConfiguration().setPushUrl.

i think this is a problem on vaadinpush.js implementation, that is if we set custom url in getPushConfiguration().setPushUrl(), then all request either https or wss will come to this URL. so if we set:


then https also called to wss:// => this is a bug.

we need to change this implementation.

vaadinpush.js still requests to for a XMLHttpRequest.
and only requests to wss:// for websocket.

submitted a request on github: