termux / termux/termux-api

[Bug] ClipboardAPI plugin execution fails with "Connection refused" on LocalSocket (ResultReturner)

Open
#867 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.3k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

Report Info

User Action: plugin execution command
Sender: ResultReturner
Report Timestamp: 2026-04-26 21:26:50.042 UTC

Termux:API Error

Error in ResultReturner:
java.io.IOException: Connection refused
	at android.net.LocalSocketImpl.connectLocal(Native Method)
	at android.net.LocalSocketImpl.connect(LocalSocketImpl.java:259)
	at android.net.LocalSocket.connect(LocalSocket.java:162)
	at com.termux.api.util.ResultReturner.lambda$returnData$0(SourceFile:250)
	at com.termux.api.util.ResultReturner.$r8$lambda$RFR2zSHu5FsJH7JvuCx4CPnUmMY(SourceFile:0)
	at com.termux.api.util.ResultReturner$$ExternalSyntheticLambda0.run(SourceFile:0)
	at java.lang.Thread.run(Thread.java:1563)
	Suppressed: java.lang.Exception: Called by:
		at com.termux.api.util.ResultReturner.returnData(SourceFile:239)
		at com.termux.api.apis.ClipboardAPI.onReceive(SourceFile:64)
		at com.termux.api.TermuxApiReceiver.doWork(SourceFile:119)
		at com.termux.api.TermuxApiReceiver.onReceive(SourceFile:65)
		at android.app.ActivityThread.handleReceiver(ActivityThread.java:4894)
		at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)
		at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2420)
		at android.os.Handler.dispatchMessage(Handler.java:106)
		at android.os.Looper.loopOnce(Looper.java:226)
		at android.os.Looper.loop(Looper.java:313)
		at android.app.ActivityThread.main(ActivityThread.java:8762)
		at java.lang.reflect.Method.invoke(Native Method)
		at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
		at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

Termux:API App Info (Current)

APP_NAME: Termux:API
PACKAGE_NAME: com.termux.api
VERSION_NAME: 0.53.0
VERSION_CODE: 1002
UID: 10266
TARGET_SDK: 28
IS_DEBUGGABLE_BUILD: false
SE_PROCESS_CONTEXT: u:r:untrusted_app_27:s0:c10,c257,c512,c768
SE_FILE_CONTEXT: u:object_r:app_data_file:s0:c10,c257,c512,c768
SE_INFO: default:targetSdkVersion=28:complete
APK_RELEASE: F-Droid
SIGNING_CERTIFICATE_SHA256_DIGEST: 228FB2CFE90831C1499EC3CCAF61E96E8E1CE70766B9474672CE427334D41C42

Termux App Info

APP_NAME: Termux
PACKAGE_NAME: com.termux
VERSION_NAME: 0.119.0-beta.3
VERSION_CODE: 1022
UID: 10266
TARGET_SDK: 28
IS_DEBUGGABLE_BUILD: false
SE_PROCESS_CONTEXT: u:r:untrusted_app_27:s0:c10,c257,c512,c768
SE_FILE_CONTEXT: u:object_r:app_data_file:s0:c10,c257,c512,c768
SE_INFO: default:targetSdkVersion=28:complete
TERMUX_APP_PACKAGE_MANAGER: -
TERMUX_APP_PACKAGE_VARIANT: -
APK_RELEASE: F-Droid
SIGNING_CERTIFICATE_SHA256_DIGEST: 228FB2CFE90831C1499EC3CCAF61E96E8E1CE70766B9474672CE427334D41C42

Device Info

Software

OS_VERSION: 4.14.199-27193134-abA035FXXS8CYA3
SDK_INT: 33
RELEASE: 13
ID: TP1A.220624.014
DISPLAY: TP1A.220624.014.A035FXXS8CYA3
INCREMENTAL: A035FXXS8CYA3
SECURITY_PATCH: 2025-02-01
IS_DEBUGGABLE: 0
IS_TREBLE_ENABLED: true
TYPE: user
TAGS: release-keys
MAX_PHANTOM_PROCESSES: - (Requires DUMP and PACKAGE_USAGE_STATS permission)
MONITOR_PHANTOM_PROCS: false
DEVICE_CONFIG_SYNC_DISABLED: -

Hardware

MANUFACTURER: samsung
BRAND: samsung
MODEL: SM-A035F
PRODUCT: a03nnxx
BOARD: ums9230_25c10
HARDWARE: ums9230_25c10
DEVICE: a03
SUPPORTED_ABIS: arm64-v8a, armeabi-v7a, armeabi

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ResultReturner.returnData and ClipboardAPI.onReceive, the entry points named in the stack trace, and reproduce the plugin execution command on the reported Android 13 setup. Trace why the LocalSocket connection is refused; done means ClipboardAPI execution returns its result without the reported IOException.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
api, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.