Troubleshooting
Common issues and solutions for Lankir.
Installation Issues
AppImage Won’t Run
Symptoms: Double-clicking does nothing, or “cannot execute” error.
Solutions:
Make it executable:
chmod +x lankir-*.AppImage
Install FUSE (required for AppImages):
sudo apt install libfuse2 # Ubuntu 22.04+ sudo apt install fuse # Older Ubuntu
Run from terminal to see errors:
./lankir-*.AppImage
Missing Libraries
Symptoms: “error while loading shared libraries”
Solutions:
For GTK errors:
sudo apt install libgtk-3-0
For WebKit errors:
sudo apt install libwebkit2gtk-4.0-37
Certificate Issues
No Certificates Found
Symptoms: Certificate list is empty.
Causes & Solutions:
No certificate stores configured
lankir config get certificateStores # If empty, add paths: # Edit ~/.config/lankir/config.json
Certificate files not in expected location
Place
.p12/.pfxfiles in~/.pki/nssdb/Or add your directory to
certificateStores
PKCS#11 token not connected
# Check if token is visible pkcs11-tool --list-slots # Check pcscd service sudo systemctl status pcscd
Certificate Not Valid for Signing
Symptoms: “certificate cannot sign” error
Cause: Certificate lacks Digital Signature key usage.
Solution:
# Check certificate capabilities
lankir cert list | grep -A5 "Name: YourCert"
# Look for "Can Sign: true"
# Or with openssl
openssl x509 -in cert.pem -text | grep -A2 "Key Usage"
Wrong PIN / Invalid Password
Symptoms: “invalid PIN” or “incorrect password”
For PKCS#12 files:
The password is the file’s encryption password
Try the password you set when exporting the certificate
For PKCS#11 tokens:
Default PINs vary by token (often
123456for testing)Check token documentation
Warning: Tokens may lock after 3-5 failed attempts
Token Not Detected
Symptoms: PKCS#11 certificates don’t appear
Check pcscd service:
sudo systemctl start pcscd sudo systemctl enable pcscd
Verify token is recognized:
pcsc_scan # Should show your card/tokenCheck module path:
lankir config get tokenLibraries ls -la /usr/lib/x86_64-linux-gnu/pkcs11/
Signing Issues
Signing Fails Silently
Enable debug mode for details:
lankir --verbose sign pdf input.pdf output.pdf --cert ABC123...
“Certificate does not have associated file path”
Cause: Trying to sign with a certificate that has no accessible private key.
Solution: Use a PKCS#12 file or PKCS#11 token with private key access.
Signed PDF Invalid in Adobe Reader
Possible causes:
Self-signed certificate - Adobe doesn’t trust it
Add your CA to Adobe’s trust store
Or use a publicly trusted certificate
Missing certificate chain - Intermediate CA not included
Ensure your PKCS#12 includes the full chain
PDF Viewing Issues
PDF Won’t Open
Symptoms: “failed to open PDF” error
Solutions:
Check file exists and is readable:
ls -la document.pdf
Verify it’s a valid PDF:
file document.pdf # Should show "PDF document"
Try with another PDF viewer to confirm file isn’t corrupted
Slow Rendering
Symptoms: Pages take long to display
Solutions:
Reduce zoom level - Lower zoom = less data to render
Disable hardware acceleration:
lankir config set hardwareAccel false
Check system resources:
htop # Check CPU/memory usage
Blank Pages
Symptoms: Pages render as white/empty
Solutions:
Wait a moment - large pages take time
Try different zoom level
Check PDF isn’t password-protected
Restart application
Configuration Issues
Config File Corrupted
Symptoms: App crashes on start, or settings don’t work
Solution: Reset configuration:
# Backup current (if needed)
cp ~/.config/lankir/config.json ~/.config/lankir/config.json.bak
# Delete and let app recreate
rm ~/.config/lankir/config.json
# Or reset via CLI
lankir config reset
Settings Not Persisting
Cause: Permission issues or disk full
Check:
# Verify directory permissions
ls -la ~/.config/lankir/
# Check disk space
df -h ~
Performance Issues
High Memory Usage
For large PDFs:
Memory usage is proportional to page size × zoom
Close PDFs when not needed
Reduce zoom level
Memory leak (unlikely but possible):
Restart application
Report issue with reproduction steps
Application Freezes
During signing:
Hardware tokens can be slow - wait for completion
Check token LED for activity
During rendering:
Large pages at high zoom take time
Check if MuPDF process is active
Debug Mode
Enable detailed logging:
# Via config
lankir config set debugMode true
# Via command line
lankir --verbose <command>
# Via environment
LANKIR_DEBUG=1 lankir
Getting Help
Collect Diagnostic Information
# System info
uname -a
cat /etc/os-release
# App info
lankir --version
# Configuration
lankir config get --json
# Certificate sources
lankir cert list --json 2>&1 | head -50
Reporting Issues
When opening a GitHub issue, include:
OS and version (Ubuntu 22.04, Fedora 39, etc.)
Lankir version (
lankir --version)Steps to reproduce
Expected behavior
Actual behavior
Debug output (with
--verbose)Screenshots if UI-related
See Also
FAQ - Frequently asked questions
Configuration Reference - All settings
Development Setup - For advanced debugging