termux / termux/termux-api

run termux-job-scheduler error

Open
#573 5 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

Problem description

when i run termux-job-scheduler --script $HOME/job.sh --period-ms 9100000 ,Termux:Api got a Error in ResultReturner

the job.sh content is:

#/system/bin/sh
date >> ~/date.log

Steps to reproduce

Expected behavior

Additional information

  • termux-api application version: 0.50.1+2c6674f
  • termux-api package version (installed through apt): 0.57
  • Android OS version: 12
  • Device model: Redmi K30 Pro

Termux logfile:

Report Info

User Action: plugin execution command
Sender: ResultReturner
Report Timestamp: 2023-01-14 02:40:55.682 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:148)
	at com.termux.api.util.ResultReturner.lambda$returnData$0(ResultReturner.java:161)
	at com.termux.api.util.-$$Lambda$ResultReturner$1wMz46asegPELp1xyZuz-rva9E4.run(Unknown Source:8)
	at java.lang.Thread.run(Thread.java:920)

Termux:API App Info (Current)

APP_NAME: Termux:API
PACKAGE_NAME: com.termux.api
VERSION_NAME: 0.50.1+2c6674f
VERSION_CODE: 51
UID: 10293
TARGET_SDK: 28
IS_DEBUGGABLE_BUILD: true
SE_PROCESS_CONTEXT: u:r:untrusted_app_27:s0:c37,c257,c512,c768
SE_FILE_CONTEXT: u:object_r:app_data_file:s0:c37,c257,c512,c768
SE_INFO: default:targetSdkVersion=28:complete
APK_RELEASE: Github
SIGNING_CERTIFICATE_SHA256_DIGEST: B6DA01480EEFD5FBF2CD3771B8D1021EC791304BDD6C4BF41D3FAABAD48EE5E1

Termux App Info

APP_NAME: Termux
PACKAGE_NAME: com.termux
VERSION_NAME: 0.118.0
VERSION_CODE: 118
UID: 10293
TARGET_SDK: 28
IS_DEBUGGABLE_BUILD: true
SE_PROCESS_CONTEXT: u:r:untrusted_app_27:s0:c37,c257,c512,c768
SE_FILE_CONTEXT: u:object_r:app_data_file:s0:c37,c257,c512,c768
SE_INFO: default:targetSdkVersion=28:complete
TERMUX_APP_PACKAGE_MANAGER: -
TERMUX_APP_PACKAGE_VARIANT: -
APK_RELEASE: Github
SIGNING_CERTIFICATE_SHA256_DIGEST: B6DA01480EEFD5FBF2CD3771B8D1021EC791304BDD6C4BF41D3FAABAD48EE5E1

Device Info

Software

OS_VERSION: 4.19.157-perf-gb16f2a3bb6af
SDK_INT: 31
RELEASE: 12
ID: SKQ1.220303.001
DISPLAY: SKQ1.220303.001 test-keys
INCREMENTAL: 22.7.19
SECURITY_PATCH: 2022-07-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: <unsupported>
DEVICE_CONFIG_SYNC_DISABLED: -

Hardware

MANUFACTURER: Xiaomi
BRAND: Redmi
MODEL: Redmi K30 Pro
PRODUCT: lmi
BOARD: lmi
HARDWARE: qcom
DEVICE: lmi
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 by reproducing the termux-job-scheduler command on the reported Android 12 setup and inspect ResultReturner.java at the failing socket connection. Confirm whether the scheduled job.sh can complete and create date.log without the Connection refused error; the issue does not identify a test or expected behavior beyond that.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.