i want to crash out
well.. that was the most annoying 2 hours of my life spent there a few days ago. turns out, over 9 months ago a regression was introduced to VERT that was not noticed until now - audio thumbnails wouldn’t display properly.
okay, not that big of an issue. should be a simple fix.. but i spent 2 hours on ts. it was mostly because i had to test a bunch of commits to see when the issue was introduced which took SO long not only for being so long ago.. which was only made worse because:
HELPPPP
basically, i had caching issues relating to Vite’s development server so the commit that i thought was the issue was NOT the issue. i had to restart my little binary searching of commits to find the actual commit that fixed it, all while running bun i && bun run build && bun run preview to install the right dependencies, build VERT for production, run a preview production build, and manually test the build for the issue which added SO much time.
fixing ts
so after finally finding the commit that caused the issue, i saw that it was an update to the package we use for reading audio file metadata, music-metadata, when we updated it to 1.9.0. i initially reported the regression to the developer who was in our discord after not seeing any issues on the GitHub, but when i actually took a look at the code that was reading the data.. what the hell
for some reason, the way the data was being processed was super duper cursed 💔. we were basically initializing a new Uint8Array with the cover image and getting it as an ArrayBuffer, and when generating the Blob we.. generate ANOTHER Uint8array of the same data?? i don’t even know how this worked in the first place, no wonder it broke when we updated. literally we just needed to generate one Uint8array, and pass its buffer to the Blob constructor lmfao (see third image).
imagine you upload a zip file to a program expecting a bunch of images inside, but you accidentally uploaded created a zip archive of the zip archive you just made which contains those images. zip containing a (zip containing many images)–unexpected contents!
Comments 4
multiple images aren’t showing </3
git bisect exists btw, pls try it next time
oh yeah i was only made aware shortly after fixing all that lmao, ty tho
a Uint8Array of a Uint8Array is the kind of bug that makes you question everything. binary searching through commits to find it is patience I don’t have
Sign in to join the conversation.