[Bug]: macOS DMG download on https://t3.codes is x86_64-only
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
- go to https://t3.codes homepage using Safari
- Download the macOS DMG
- Mount the DMG
- Install into /Applications
- Run on arm64 Mac
- Receive alert from Apple about Rosetta being deprecated
Expected behavior
The DMG is a universal app bundle, or the site by default downloads the arm64 bundle while offering a x86_64 bundle alternative link.
Actual behavior
The DMG contains the x86_64 build only.
Impact
Cosmetic issue
Version or commit
No response
Environment
macOS Tahoe 26.5, M1 Pro Macbook Pro
Logs or stack traces
This is *not* a major issue. I feel bad even mentioning it, but I like T3 Code a lot and it's my understanding that the next macOS version being released this fall will not have Rosetta anymore, so new users not familiar with the workaround might see this issue and choose not to use T3 Code.
The link on the homepage: https://github.com/pingdotgg/t3code/releases/download/v0.0.33/T3-Code-0.0.33-x64.dmg
Shows `-x64` there as further proof.
Screenshots, recordings, or supporting files
No response
Workaround
Go to GitHub releases page to download the arm64 build.
Looks like this was resolved :)
Still happens on my Safari.
Still happens on my Safari.
Wow, good catch @fredrik-sogaard ! I forgot I opened it in Safari when I discovered this issue, and later opening it in Chrome it showed up as arm64. I dug into the browser dev tools and found the smoking gun:
function i(e) {
return n.test(e) ? `x64`
: r.test(e) ? `arm64`
: `x64`
}
This is the critical section. Basically they're using WebGL capabilities of the browser to detect which architecture. In Chrome, the UNMASKED_WEBGL_STRING value is jam packed with information about the browser host. On Safari, Apple intentionally stripped this value down to bare minimums for privacy reasons (to prevent finger printing).
Running this in the Safari console
const canvas = document.createElement("canvas");
const gl =
canvas.getContext("webgl") ||
canvas.getContext("experimental-webgl");
const info = gl?.getExtension("WEBGL_debug_renderer_info");
console.log({
renderer: info
? gl.getParameter(info.UNMASKED_RENDERER_WEBGL)
: null,
vendor: info
? gl.getParameter(info.UNMASKED_VENDOR_WEBGL)
: null,
userAgent: navigator.userAgent,
platform: navigator.platform,
userAgentData: navigator.userAgentData
});
navigator.userAgentData
?.getHighEntropyValues(["architecture", "bitness"])
.then(console.log);
Produces this log
[Log] {renderer: "Apple GPU", vendor: "Apple Inc.", userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) Ap… (KHTML, like Gecko) Version/26.6 Safari/605.1.15", platform: "MacIntel", userAgentData: undefined}
What's funny is I ran this on a M1 Ultra and a i9 Intel mac, the output was identical. And this is the mechanism t3.codes uses to determine architecture. But I found a more reliable heuristic:
(async () => {
const canvas = document.createElement("canvas");
const gl =
canvas.getContext("webgl2") ||
canvas.getContext("webgl");
const webgl = {
astc: !!gl?.getExtension("WEBGL_compressed_texture_astc"),
pvrtc: !!gl?.getExtension("WEBGL_compressed_texture_pvrtc"),
etc: !!gl?.getExtension("WEBGL_compressed_texture_etc"),
s3tc: !!gl?.getExtension("WEBGL_compressed_texture_s3tc"),
extensions: gl?.getSupportedExtensions()?.sort(),
};
let webgpu = null;
if (navigator.gpu) {
const adapter = await navigator.gpu.requestAdapter();
webgpu = adapter
? {
astc: adapter.features.has("texture-compression-astc"),
etc2: adapter.features.has("texture-compression-etc2"),
bc: adapter.features.has("texture-compression-bc"),
features: [...adapter.features].sort(),
info: adapter.info,
}
: null;
}
console.log({
webgl,
webgpu,
hardwareConcurrency: navigator.hardwareConcurrency,
});
})();
The differentiation is this:
M-series:
WebGL ASTC = true
WebGPU ASTC = true
Intel:
WebGL ASTC = false
WebGPU ASTC = false
So it is fixable! And it is real :) reopening the issue.
Alright, checked this morning and Safari now shows arm64 builds! But on the intel mac it also shows arm64. The consensus appears to be x86_64 is deprecated (will be officially when the next macOS releases and drops support for rosetta 2 and intel macs in general) so I'm gonna call this one closed :) good enough!