Skip to content

Safari on iOS fails to connect

When I use the simple example of jam-core I get:

Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'crypto.subtle.digest')
promiseEmptyOnRejected
promiseReactionJob
index.js:12

I have put everything in a try/wait and am awaiting all promises so I can't provide more info than that. Here is the code I'm using:


  const enterRoom = async () => {
    try {
      const { createJam } = await import('jam-core')

      let jamConfig = { domain: 'jam.systems' }

      // create client-side jam instance
      const [state, { setProps, enterRoom }] = createJam({
        jamConfig,
        debug: true,
      })

      await setProps({ roomId })
      await enterRoom(roomId)
    } catch (e) {
      // This is not reached
      console.warn(e)
    }
  }