rails icon indicating copy to clipboard operation
rails copied to clipboard

Safari 17.5-18 IOs TypeError undefined is not a constructor (evaluating 'new o.WebSocket(this.consumer.url,e)')

Open aleksandrlat opened this issue 1 year ago • 1 comments

I see in production this error TypeError undefined is not a constructor (evaluating 'new o.WebSocket(this.consumer.url,e)') in Safari 17.5-18 IOs

The stacktrace:

at Connection.open(webpack://swoop/./node_modules/@rails/actioncable/app/assets/javascripts/actioncable.esm.js:165:37)
this.webSocket = new adapters.WebSocket(this.consumer.url, socketProtocols);
at Subscriptions.add(webpack://swoop/./node_modules/@rails/actioncable/app/assets/javascripts/actioncable.esm.js:395:19)
this.consumer.ensureActiveConnection();
at createActionCableHandler(webpack://swoop/./app/assets/javascripts/graphql/createActionCableHandler.js:72:58)
const channel = getActionCableClient().subscriptions.create({

From here I see adapters.Websocket can be undefined. But undefined case is not handled any how.

aleksandrlat avatar Jun 20 '24 21:06 aleksandrlat

Are you able to reproduce this locally?

zzak avatar Jun 21 '24 02:06 zzak

@zzak unfortunately not

aleksandrlat avatar Jul 06 '24 21:07 aleksandrlat

This issue has been automatically marked as stale because it has not been commented on for at least three months. The resources of the Rails team are limited, and so we are asking for your help. If you can still reproduce this error on the 7-2-stable branch or on main, please reply with all of the information you have about it in order to keep the issue open. Thank you for all your contributions.

rails-bot[bot] avatar Oct 04 '24 22:10 rails-bot[bot]