termux / termux/termux-api

termux-dialog does not appear and hangs when run from termux shortcuts

Open
#557 1 comment 1 reaction 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

Steps to reproduce:

  1. Create a script with just "termux-dialog" in it.
  2. Put it in the shortcuts folder and run from shortcuts app.
  3. The script then hangs. No dialog appears.

The script runs fine when run from within termux.

Output of termux-info:

Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=14642
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://grimler.se/termux/termux-main stable main
# x11-repo (sources.list.d/x11.list)
deb https://grimler.se/termux/termux-x11 x11 main
Updatable packages:
bash/stable 5.2.2-1 aarch64 [upgradable from: 5.2.2]
termux-tools version:
1.29.3
Android version:
11
Kernel build information:
Linux localhost 4.14.186-g7c18952d3c68 #1 SMP PREEMPT Tue May 17 19:30:48 WIB 2022 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
Redmi Note 8 Pro

Logcat:

10-07 12:08:16.828 17070 17070 I Toast   : Show toast from OpPackageName:com.termux, PackageName:com.termux                         10-07 12:08:17.802 17070 17070 E libc    : Access denied finding property "ro.vendor.pref_scale_resolution"
10-07 12:08:17.802 17070 17070 E libc    : Access denied finding property "ro.vendor.pref_scale_resolution"                         10-07 12:08:18.802 17070 17070 D View    : [Warning] assignParent to null: this = android.widget.LinearLayout{c8a323d V.E...... ......ID 0,0-386,316}                                                 10-07 12:08:18.809 17070 17070 I InputTransport: Destroy ARC handle: 0x7bb32d20c0                                                   10-07 12:08:19.986 17070 17070 V ViewRootImpl[TermuxActivity]: [ANR Warning]Input routeing takes more than 6000ms since 1970-01-01 01:00:00.000, this = com.mediatek.view.impl.ViewDebugManagerImpl@7085ea9
10-07 12:08:19.987 17070 17070 V ViewRootImpl[TermuxActivity]: Input event delivered to android.view.ViewRootImpl$SyntheticInputStage@decb539 at 2022-10-07 12:08:19.985                              10-07 12:08:19.987 17070 17070 V ViewRootImpl[TermuxActivity]: Input event delivered to android.view.ViewRootImpl$EarlyPostImeInputStage@a542a32 at 2022-10-07 12:08:19.984
10-07 12:08:19.987 17070 17070 V ViewRoo

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

Reproduce the issue using a script containing termux-dialog in the shortcuts folder, then compare it with running the command inside Termux. Start by tracing the termux-dialog shortcut invocation and the related Android logcat output. Done means the dialog appears and the shortcut script no longer hangs.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
cli, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.