Serubin / pulse-sms-web

The official web app for Pulse SMS - built on Vue.js.
https://pulsesms.app
Other
109 stars 44 forks source link

Worker Retrofit #105

Closed Serubin closed 4 years ago

Serubin commented 4 years ago

Rebuild worker for maintainability and efficiency.

This pr aims to provide two things:

  1. This should help make the web worker testable with jest (not an easy task as it seems)
  2. This increases efficiency by avoiding having to remake keys & aes ciphers for every worker. Instead, we pass a stored pre-created key to each worker and build a new cipher per worker.

Due to how data is serialized between workers, we lose the aes cipher functions, while keeping the aes data, making it unusable.

klinker24 commented 4 years ago

So I have gotten some reports over the past few weeks from Windows users who say that their media isn't loading... I really have no clue why that would be and I am definitely not able to replicate the issue with my Windows machine.

I am going to try to explore this a bit more though. It definitely coincides with this being released

Serubin commented 4 years ago

That's oddly specific. Any idea what browser? We should load up bugsnag or something.

klinker24 commented 4 years ago

One guy said it was happening for Chrome, Edge, and the Pulse desktop app. After looking at it for a few minutes, I am not really sure what the issue could be, to be honest. Just seems so weird. It definitely isn't happening to all Windows users, or I would have gotten more than the handful of complaints that I have received

Serubin commented 4 years ago

Even more odd since this isn't really a functional change. This changed how the worker was invoked. I wonder if there are some weird edge cases where data gets passed in ways we don't expect.