Skip to content

[Bug]: Error in ResultReturner #4575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Efreak opened this issue Jun 1, 2025 · 0 comments
Open

[Bug]: Error in ResultReturner #4575

Efreak opened this issue Jun 1, 2025 · 0 comments

Comments

@Efreak
Copy link

Efreak commented Jun 1, 2025

Problem description

Whenever I use ssh in termux, I get an error notification Error in ResultReturner. It looks like it might be related to using tergent/Android key store for my ssh keys (see the trace under system info). The notification shows up while the Android system is asking for biometric authentication, not afterwards, and if I send the same command again before the the authorization times out (or immediately after unlocking the device) then the error notification doesn't show up.

I'm not sure if this is an error with the termux app, the API app, or the API package, as it seems like it could be an issue with any of these.

Steps to reproduce the behavior.

Connect to an ssh server that uses a key in the system key store (ssh or git or other command)

What is the expected behavior?

Command requests authentication and continues without annoying notifications.

System information

  • Termux application version: 0.119.0-beta3
  • Android OS version: 12
  • Device model: Samsung Galaxy Tab S6
Full error report info from termux

Report Info

User Action: plugin execution command
Sender: ResultReturner
Report Timestamp: 2025-05-31 23:52:34.171 UTC

Termux:API Error

Error in ResultReturner:
android.security.keystore.UserNotAuthenticatedException: User not authenticated
	at android.security.keystore2.KeyStoreCryptoOperationUtils.getInvalidKeyException(KeyStoreCryptoOperationUtils.java:128)
	at android.security.keystore2.AndroidKeyStoreSignatureSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreSignatureSpiBase.java:217)
	at android.security.keystore2.AndroidKeyStoreSignatureSpiBase.engineInitSign(AndroidKeyStoreSignatureSpiBase.java:123)
	at android.security.keystore2.AndroidKeyStoreSignatureSpiBase.engineInitSign(AndroidKeyStoreSignatureSpiBase.java:101)
	at java.security.Signature$Delegate.init(Signature.java:1357)
	at java.security.Signature$Delegate.chooseProvider(Signature.java:1310)
	at java.security.Signature$Delegate.engineInitSign(Signature.java:1385)
	at java.security.Signature.initSign(Signature.java:679)
	at com.termux.api.apis.KeystoreAPI$2.writeResult(SourceFile:257)
	at com.termux.api.util.ResultReturner.lambda$returnData$0(SourceFile:268)
	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:920)
	Suppressed: java.lang.Exception: Called by:
		at com.termux.api.util.ResultReturner.returnData(SourceFile:239)
		at com.termux.api.apis.KeystoreAPI.signData(SourceFile:248)
		at com.termux.api.apis.KeystoreAPI.onReceive(SourceFile:62)
		at com.termux.api.TermuxApiReceiver.doWork(SourceFile:149)
		at com.termux.api.TermuxApiReceiver.onReceive(SourceFile:65)
		at android.app.ActivityThread.handleReceiver(ActivityThread.java:4964)
		at android.app.ActivityThread.access$1900(ActivityThread.java:324)
		at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2347)
		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:8855)
		at java.lang.reflect.Method.invoke(Native Method)
		at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
		at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

Termux:API App Info (Current)

APP_NAME: Termux:API
PACKAGE_NAME: com.termux.api
VERSION_NAME: 0.52.0
VERSION_CODE: 1001
UID: 11429
TARGET_SDK: 28
IS_DEBUGGABLE_BUILD: false
SE_PROCESS_CONTEXT: u:r:untrusted_app_27:s0:c149,c261,c512,c768
SE_FILE_CONTEXT: u:object_r:app_data_file:s0:c149,c261,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: 11429
TARGET_SDK: 28
IS_DEBUGGABLE_BUILD: false
SE_PROCESS_CONTEXT: u:r:untrusted_app_27:s0:c149,c261,c512,c768
SE_FILE_CONTEXT: u:object_r:app_data_file:s0:c149,c261,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.190-26178195-abT860XXS5DWH1
SDK_INT: 32
RELEASE: 12
ID: SP2A.220305.013
DISPLAY: SP2A.220305.013.T860XXS5DWH1
INCREMENTAL: T860XXS5DWH1
SECURITY_PATCH: 2023-08-01
IS_DEBUGGABLE: 0
IS_TREBLE_ENABLED: true
TYPE: user
TAGS: release-keys
MAX_PHANTOM_PROCESSES: 32
MONITOR_PHANTOM_PROCS: true
DEVICE_CONFIG_SYNC_DISABLED: -

Hardware

MANUFACTURER: samsung
BRAND: samsung
MODEL: SM-T860
PRODUCT: gts6lwifixx
BOARD: msmnile
HARDWARE: qcom
DEVICE: gts6lwifi
SUPPORTED_ABIS: arm64-v8a, armeabi-v7a, armeabi

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

No branches or pull requests

1 participant