Skip to content

Instantly share code, notes, and snippets.

@tkafka
Last active October 26, 2025 17:16
Show Gist options
  • Save tkafka/e3eb63a5ec448e9be6701bfd1f1b1e58 to your computer and use it in GitHub Desktop.
Save tkafka/e3eb63a5ec448e9be6701bfd1f1b1e58 to your computer and use it in GitHub Desktop.
Detect Electron apps on mac where the Electron hasn't yet been updated to fix the system wide lag

Electron Apps Causing System-Wide Lag on Tahoe

This script detects apps with not yet updated versions of Electron.

Repo: https://github.com/tkafka/detect-electron-apps-on-mac

See:

Fixed versions:

  • 36.9.2
  • 37.6.0
  • 38.2.0
  • 39.0.0
  • and all above 39

Temporary workaround:

Run

launchctl setenv CHROME_HEADLESS 1

on every system start. The CHROME_HEADLESS flag has a side effect of disabling Electron app window shadows, which makes them ugly, but also stops triggering the issue.

Example output

(as of 1st oct 2025 - it lists all electron apps, but none shows the ✅ checkmark so far)

❌ OpenMTP.app: Electron 18.3.15 (Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework)
❌ DaVinci Resolve.app: Electron 36.3.2 (Contents/Applications/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework)
❌ Electron.app: Electron 36.3.2 (Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework)
❌ Visual Studio Code.app: Electron 37.3.1 (Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework)
❌ Cursor.app: Electron 34.5.8 (Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework)
❌ Windsurf.app: Electron 34.4.0 (Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework)
❌ Claude.app: Electron 36.4.0 (Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework)
❌ Signal.app: Electron 38.1.2 (Contents/Frameworks/Electron Framework.framework/Electron Framework)
❌ Figma Beta.app: Electron 37.5.1 (Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework)
❌ Beeper Desktop.app: Electron 33.2.0 (Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework)
❌ Slack.app: Electron 38.1.2 (Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework)

EDIT 2025-10-03: Congrats to Signal being first!

✅ Signal.app (Electron 38.2.0) - Contents/Frameworks/Electron Framework.framework/Electron Framework

What I also make

🌦️ Weathergraph is my weather app that shows hourly forecasts as charts instead of lists. See a week's worth of temperature, precipitation, wind, UV, and pressure in a single visual.

Built in Swift/SwiftUI for iPhone, Apple Watch, and Mac. Highly customizable if you're into that.

"I first downloaded the app because I caught sight of the large complication on an Apple Store employee's Apple Watch and asked about it. This is the perfect weather app. All information beautifully presented and easily accessible." - lucenvoyage

Thanks! Tomas

Weathergraph

# Detect affected Electron versions
find /Applications /System/Applications ~/Applications -name "*.app" -type d 2>/dev/null | sort --ignore-case | while read -r app; do
appName=$(basename "$app")
electronFrameworkInfo="$app/Contents/Frameworks/Electron Framework.framework/Resources/Info.plist"
if [[ -f "$electronFrameworkInfo" ]]; then
electronVersion=$(plutil -extract CFBundleVersion raw "$electronFrameworkInfo")
if [[ $? -eq 1 || -z "$electronVersion" ]]; then
echo "⚠️ $appName (No Electron version)"
else
IFS='.' read -r major minor patch <<< "$electronVersion"
if [[ $major -gt 39 ]] || \
[[ $major -eq 39 && $minor -ge 0 ]] || \
[[ $major -eq 38 && $minor -gt 2 ]] || \
[[ $major -eq 38 && $minor -eq 2 && $patch -ge 0 ]] || \
[[ $major -eq 37 && $minor -gt 6 ]] || \
[[ $major -eq 37 && $minor -eq 6 && $patch -ge 0 ]] || \
[[ $major -eq 36 && $minor -gt 9 ]] || \
[[ $major -eq 36 && $minor -eq 9 && $patch -ge 2 ]]; then
echo "$appName ($electronVersion)"
else
echo "❌️ $appName ($electronVersion)"
fi
fi
fi
done
# Directly detect Electron apps using the _cornerMask override - thanks avarayr!
find /Applications /System/Applications ~/Applications -name "*.app" -type d 2>/dev/null | sort --ignore-case | while read -r app; do
electronFiles=$(find "$app" -name "Electron Framework" -type f 2>/dev/null)
if [[ -n "$electronFiles" ]]; then
appName=$(basename "$app")
while IFS= read -r filename; do
if [[ -f "$filename" ]]; then
ev=$(grep -aoE 'Chrome/.*Electron/[0-9]+(\.[0-9]+){1,3}' -- "$filename" 2>/dev/null | head -n1 | sed -E 's/.*Electron\/([0-9]+(\.[0-9]+){1,3}).*/\1/')
[ -z "$ev" ] && ev=$(grep -aoE 'Electron/[0-9]+(\.[0-9]+){1,3}' -- "$filename" 2>/dev/null | head -n1 | sed -E 's/.*Electron\/([0-9]+(\.[0-9]+){1,3}).*/\1/')
relativePath="${filename#"$app/"}"
if grep -aqF "_cornerMask" -- "$filename" 2>/dev/null; then
echo "$appName (Electron ${ev:-unknown}) - $relativePath"
else
echo "$appName (Electron ${ev:-unknown}) - $relativePath"
fi
break
fi
done <<< "$electronFiles"
fi
done
@mrleblanc101
Copy link

mrleblanc101 commented Oct 3, 2025

Also, not sure why, but one of the script has echo, the other echo -e which doesn't seem to work on my machine (I'm no bash expert), so the output is prefixed with -e
Capture d’écran, le 2025-10-03 à 11 51 36

@tkafka
Copy link
Author

tkafka commented Oct 3, 2025

@bpresles @mrleblanc101 Thank you both!

  1. I added a check for ripgrep, and a same detection for both scripts, thanks!
  2. echo -e is no longer necessary (it enabled escape sequences for coloring the text; I didn't realize some shells might not have it).

@avarayr
Copy link

avarayr commented Oct 3, 2025

https://avarayr.github.io/shamelectron/

made a website that tracks this bug and automatically updates every day.

feel free to make a PR with your favorite app to track — see example https://github.com/avarayr/shamelectron/tree/main/lib/apps

@MadMacMad
Copy link

MadMacMad commented Oct 4, 2025

i've had some trouble with all those scripts.... non worked ...
so changed the script to make it work...

#!/usr/bin/env bash
set -euo pipefail

if ! command -v rg >/dev/null 2>&1; then
  echo "❌ requires ripgrep (brew install ripgrep)"
  exit 1
fi

scan_dirs=(/Applications "$HOME/Applications" /System/Applications)

find "${scan_dirs[@]}" \
  -path "*/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework" \
  -type f -print0 2>/dev/null |
while IFS= read -r -d '' filename; do
  app="${filename%%.app/*}.app"
  appName="$(basename "$app")"

  ev="$(rg -a -m1 -o -r '$1' 'Chrome/.*Electron/([0-9]+(\.[0-9]+){1,3})' -- "$filename" 2>/dev/null || true)"
  [[ -z "$ev" ]] && ev="$(rg -a -m1 -o -r '$1' 'Electron/([0-9]+(\.[0-9]+){1,3})' -- "$filename" 2>/dev/null || true)"

  relativePath="${filename#"$app/"}"

  if rg -a -q -F "_cornerMask" -- "$filename" 2>/dev/null; then
    echo -e "❌ $appName \033[2m(Electron ${ev:-unknown}) - $relativePath\033[0m"
  else
    echo -e "✅ $appName \033[2m(Electron ${ev:-unknown}) - $relativePath\033[0m"
  fi
done

chmod +x ~/Desktop/detect-electron-fallback.sh
bash ~/Desktop/detect-electron-fallback.sh

@devnoname120
Copy link

avarayr.github.io/shamelectron

made a website that tracks this bug and automatically updates every day.

feel free to make a PR with your favorite app to track — see example github.com/avarayr/shamelectron/tree/main/lib/apps

@avarayr Very cool, thanks for sharing!

@tkafka
Copy link
Author

tkafka commented Oct 21, 2025

Update: @chockenberry noticed that the script uses strings command which is a part of Xcode tools (and not normally available on mac), and provided a workaround.

I have merged Craig's contribution, and also replaced ripgrep for regular grep (which is several times slower, but always available).

Now both detection scripts can run on out-of-the-box macs.

Thanks!

@devnoname120
Copy link

devnoname120 commented Oct 21, 2025

@tkafka Perfect! Any chance you could add this website?
https://avarayr.github.io/shamelectron/

And its repo:
https://github.com/avarayr/shamelectron

@tkafka
Copy link
Author

tkafka commented Oct 21, 2025

@devnoname120 Added the tracker, thanks

@rubnogueira
Copy link

Alternative way for people that don't have Spotlight enabled:

Replace first line:
find /Applications /System/Applications ~/Applications -name "*.app" -type d 2>/dev/null | sort --ignore-case | while read -r app; do

@tkafka
Copy link
Author

tkafka commented Oct 22, 2025

@rubnogueira Thanks, replaced :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment