Troubleshooting
Solutions to common issues when developing Krema applications.
Installation Issues
"Java not found" or wrong version
Krema requires Java 25+ for the Foreign Function & Memory API.
# Check Java version
java -version
# Should show 25 or higher
Solution: Install JDK 25:
# macOS
brew install openjdk@25
# Add to PATH
export JAVA_HOME=/opt/homebrew/opt/openjdk@25
export PATH="$JAVA_HOME/bin:$PATH"
"Maven not found"
# Install Maven
brew install maven # macOS
apt install maven # Ubuntu
choco install maven # Windows
Linux: "WebKitGTK not found"
Install the WebKitGTK runtime libraries:
# Ubuntu/Debian
sudo apt install libwebkit2gtk-4.1-0 libgtk-3-0
# Fedora
sudo dnf install webkit2gtk4.0 gtk3
# Arch
sudo pacman -S webkit2gtk-4.1 gtk3
Note: Krema bundles libwebview.so - you only need the WebKitGTK runtime, not the development headers.
Development Issues
"krema dev" shows blank window
Cause: Frontend dev server not ready.
Solutions:
- Check if dev server is running:
curl http://localhost:5173 - Verify
frontend_dev_urlinkrema.tomlmatches your dev server - Check for port conflicts
Hot reload not working
Cause: File watcher not detecting changes.
Solutions:
- Check if your IDE is using external file sync
- Increase file watcher limit on Linux:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
"Command not found" when invoking
Cause: Command not registered or typo in command name.
Solutions:
- Verify the method has
@KremaCommandannotation - Check command name matches exactly (case-sensitive)
- Ensure command class is registered:
Krema.app()
.commands(new MyCommands()) // Don't forget this!
.run();
Permission denied errors
Cause: Required permission not configured.
Solution: Add permission to krema.toml:
[permissions]
allow = [
"fs:read", # Add missing permission
"fs:write"
]
JavaScript errors in console
Cause: window.krema not injected yet.
Solution: Wait for DOMContentLoaded:
document.addEventListener('DOMContentLoaded', async () => {
const result = await window.krema.invoke('myCommand');
});
Or check if krema is available:
if (window.krema) {
// Safe to use
}
Build Issues
"GraalVM not found" for native builds
Solution: Install GraalVM JDK 25+ and set environment:
export GRAALVM_HOME=/path/to/graalvm-jdk-25
export PATH="$GRAALVM_HOME/bin:$PATH"
# Verify (native-image is built-in with GraalVM 25+)
native-image --version
See the Native Image guide for platform-specific installation instructions.
Native image build fails
Common causes:
- Missing
main_class: Setmain_classin the[build]section ofkrema.toml - Missing reflection config: Add your classes to
reflect-config.jsonif they use reflection - Incompatible library: Some libraries need special GraalVM configuration
- Insufficient memory: Increase heap:
MAVEN_OPTS="-Xmx4g" - Architecture mismatch on macOS: Krema handles Apple Silicon automatically, but Rosetta can cause issues with third-party tools
See the Native Image troubleshooting section for detailed solutions.
Frontend build fails
Solution: Build frontend separately first:
cd src
npm install
npm run build
Check for TypeScript or bundler errors.
Bundle Issues
macOS: "App is damaged"
Cause: App not signed or notarized.
Solution:
# Sign and notarize
krema bundle --type dmg --notarize
Or for development, remove quarantine:
xattr -cr /path/to/YourApp.app
macOS: Notarization fails
Common issues:
- Wrong credentials: Check
KREMA_APPLE_PASSWORDis app-specific password - Hardened runtime missing: Krema enables this by default
- Entitlements issue: Ensure JVM entitlements are present
Check notarization log:
xcrun notarytool log <submission-id> --apple-id [email protected] --team-id TEAMID
Windows: SmartScreen warning
Cause: App not signed with trusted certificate.
Solutions:
- Sign with an EV certificate (bypasses SmartScreen immediately)
- Sign with OV certificate (reputation builds over time)
- Users can click "More info" → "Run anyway"
Windows: Missing DLLs
Cause: Visual C++ runtime not installed.
Solution: Bundle the VC++ redistributable or instruct users to install it.
Linux: AppImage won't run
Solution: Make it executable:
chmod +x MyApp.AppImage
./MyApp.AppImage
If that fails, check for missing libraries:
./MyApp.AppImage --appimage-extract
ldd squashfs-root/usr/bin/java | grep "not found"
Runtime Issues
High memory usage
Causes and solutions:
- Memory leak: Profile with VisualVM or JFR
- Large caches: Implement cache eviction
- Too many windows: Close unused windows
Slow startup
Solutions:
- Use native image for instant startup
- Lazy-load heavy dependencies
- Use splash screen to improve perceived performance
Crashes on specific platforms
Debugging:
-
Check Krema crash reports first — Krema automatically writes crash reports to
{appDataDir}/crash-reports/as JSON files. Each report includes the error source, stack trace, OS info, app version, and recent IPC commands:# macOS
ls ~/Library/Application\ Support/YourApp/crash-reports/
# Linux
ls ~/.local/share/YourApp/crash-reports/
# Windows
dir %APPDATA%\YourApp\crash-reports\ -
Run with debug logging:
java -Dkrema.debug=true -jar myapp.jar -
Check OS-level crash logs (if Krema crash reports aren't available):
# macOS: ~/Library/Logs/DiagnosticReports/
# Windows: Event Viewer > Windows Logs > Application
# Linux: /var/log/syslog or journalctl
Auto-Update Issues
"Signature verification failed"
Causes:
- Wrong public key in config
- File corrupted during download
- Signature file missing
Solution:
# Verify signature manually
krema signer verify MyApp.dmg --pubkey "MCowBQYDK2..."
Update check returns 204 but update exists
Cause: Server returning 204 incorrectly.
Check: Verify server endpoint returns JSON for newer versions.
Update downloads but doesn't install
Cause: Platform-specific installation issue.
Debug: Check logs in app data directory for error details.
Getting Help
- Check the logs:
~/.krema/logs/or app-specific log location - Enable debug mode: Run with
-Dkrema.debug=true - Search issues: GitHub Issues
When reporting issues, include:
- Krema version (
krema --version) - Java version (
java -version) - OS and version
- Full error message and stack trace
- Steps to reproduce