Fork me on GitHub
#shadow-cljs
<
2020-06-14
>
valerauko01:06:13

i'm running shadow-cljs in electron and i can't figure out what would be a good contentsecuritypolicy header. anyone has a working example maybe? i don't use any non-local resources

rberger02:06:41

I am running my target browser app on Safari on iOS. shadow-cljs works fine with that in regular http defaults. But I have to run the page with SSL/HTTPS. because I’m testing out webRTC stuff which requires the page be served with SSL. I successfully get shadow-cljs to serve the page with ssl/https but the websocket errors out. I’ve tried: • Just adding :ssl {} • Adding:

:ssl {} 
 :http {:port 9630 :host "discovery.local"}
• Adding:
:ssl {} 
 :http {:port 9630  :ssl-port 19630 :host "discovery.local"}
In all cases the basic page works but the websocket doesn’t Here is the error from the debugger:
🠶 shadow-cljs: websocket error
Event
bubbles: false
cancelBubble: false
cancelable: false
composed: false
currentTarget: null
defaultPrevented: false
eventPhase: 0
isTrusted: true
returnValue: true
srcElement: WebSocket
URL: ""
binaryType: "blob"
bufferedAmount: 0
extensions: ""
onclose: null
onerror: null
onmessage: null
onopen: null
protocol: ""
readyState: 3
url: ""
WebSocket Prototype
target: WebSocket
URL: ""
binaryType: "blob"
bufferedAmount: 0
extensions: ""
onclose: null
onerror: null
onmessage: null
onopen: null
protocol: ""
readyState: 3
url: ""
WebSocket Prototype
timeStamp: 1101
type: "error"
Event Prototype

[Error] WebSocket network error: The operation couldn't be completed. (OSStatus error -9807.)
🠶 shadow-cljs: WebSocket disconnected!

rberger22:06:12

Looks like shadow-cljs 2.10.8 is on clojars but http://npmjs.com has only 2.10.7

mauricio.szabo22:06:04

Hi, I updated shadow-cljs yesterday, and I'm getting the message The shadow-cljs Websocket was disconnected more frequently. About two~three weeks ago (last time I upgraded) I could leave the watch process and my node process running while putting my computer to sleep and then keep working on my CLJS, but currently it seems that this is not working anymore...

👍 1
beders22:06:17

Just stopped by to say that I love the latest Inspector changes. So easy to sprinkle in a few tap> s to see what is going on. Well done!