micro-editor / micro-editor/micro
Micro hangs on startup (black screen) in Termux environment when termux-api is installed
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
On modern Android devices (Android 13/14, specifically tested on Poco M5), the micro editor hangs indefinitely on a black screen during the initialization phase if the termux-api package is installed in the environment. This appears to be a synchronous blocking call to the system clipboard that never receives a response from the Android OS.
Steps to Reproduce :
- Install Termux on an Android 13+ device.
- Install the micro editor: pkg install micro.
- Install the termux-api package: pkg install termux-api.
- Attempt to open any file or the editor itself: micro test.txt.
The terminal remains on a blank/black screen and does not respond to input.
Technical Diagnosis (Root Cause Analysis) : The issue is a Synchronous Blocking I/O hang. When termux-api is present, micro attempts to interface with the Android system clipboard. Due to Android's strict background execution limits and phantom process restrictions, the system call to the clipboard bridge does not return a value. Because micro does not have an internal timeout for this initialization step, the process enters a deadlock state, awaiting a response from the termux-api service that never arrives.
Workaround Found: Bypassing the system clipboard call by using the internal clipboard flag resolves the issue immediately: micro -clipboard internal [filename]
Environment :
Device: Poco M5 (Android 13/14)
Terminal: Termux
Editor Version: Latest available via pkg install (2.0.13+)
Dependency: termux-api installed.
Additional Context
Mentioning @termux for visibility, as this affects the user expericeen for developers using the Termux environment on modern Android versions. This bug appears to be an integration conflict between the editor's clboipard handling and the Termux-API bridge.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the hang in a Termux environment with termux-api installed, then compare startup using the default clipboard handling and -clipboard internal. Trace the initialization phase's system clipboard call and verify that normal startup no longer blocks while clipboard behavior remains usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, go
- Domain
- cli, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100