Giter Site home page Giter Site logo

termux-tasker's Issues

termux-services cant be called via termux-tasker

Problem description
When I use termux services to start or stop a service i.e. sv up httpd it works fine in termux but in termux-tasker it errors 'unable to change to service directory'

I call this via a simple one line script in /termux/taskser. Works in termux directly

I am sure it must be something I am doing, maybe working directory? but I cant figure it out, could be permissions?

I've tried running in tasker directly with tasker function, having set termux properties to allow external. Same issue

Steps to reproduce

Expected behavior
Calling termux-services should work from tasker the same as directly in termux

Additional information

  • Termux application version: 0.118.0
  • Android OS version: 12
  • Device model: s22 ultra

Yeecli non functional from tasker

Problem description
I have Python installed and installed a program that allows me to control my lights but the command does not function when called from tasker. I have every permission allowed for termux, tasker, termux:tasker, etc and everything set correctly in termux.properties as well as ran termux-reload-settings afterwards.
Steps to reproduce

pkg i python
pip install yeecli
echo "allow-external-apps=true" >> ~/.termux/termux.properties
termux-reload-settings

See:
Screenshot_20210331-155005_Termux_Tasker

Expected behavior
The command should run etc my light should toggle.

Additional information

  • Termux application version: 0.108
  • Android OS version: 11 (crDroid)
  • Device model: OnePlus 7 Pro

Task script with `termux-notification` hangs

Hello, any idea how can i debug this? i've tried pretty much everything i could think of, like with the tasker plugin action option to "execute in a terminal session" or not, setting termux/tasker/termux:tasker/termux:api to be able to run in the background without battery optimization. The process just hangs. Also testing the tasker action through tasker has the same behavior.
Running the script manually through termux works as expected.

Get error when trying to use it in Tasker

When I try to select the plugin in Tasker I get the following error:
Error: plugin error: missing, disabled, not exported or no permission receiver, or too many receivers.

Termux:Tasker MacroDroid

Problem description
MacroDroid
termux: tasker 0.4, 0.5 does not work. only the previous version is recognized

Additional information

  • Termux application version: 0.106
  • Android OS version: 10
  • Device model: SM-J400F

Can you please add the 3 Returning Variables: %stdout, %stderr, %err, like the "Run Shell" action has?

Hi

May I suggest to add 3 Returning Variables, that will be filled by the Termux Task plugin, after returning from the execution?

The needed 3 variables are:
%stdout
%stderr
%err (the returning error code from the program that was run)

Please see this screenshot:
https://i.postimg.cc/QdwwXNVX/Screenshot-20190417-144859-resize.png

(the first 2 appear, and the 3rd one does not appear, but Tasker fills it into a variable named %err)

That way we can easily get the Result from the program we ran.

Thank you very much

Run scripts from the location they are saved in, instead of the destination of the softlink.

Feature description

When I run python, I use a virtual environment located inside the Tasker folder. However, the Python binaries there are actually softlinks to the system Python. Running them from inside the folder adds the virtual environment's packages to the python path, but running it from outside doesn't give you access to those packages.

Right now, when I need to run from inside a virtual environment, I import sys and add the library path to it. It happened so often that I just made a task that does that and pastes in the rest of the code into an empty file that I then run.

Task executes asynchronously if runInTerminal == true

For tasks where runInTerminal == false, Tasker waits for the task to end (or for the timeout to elapse) before going on to the next action. This is also what I expected with runInTerminal == true, but what happens instead is that the task continues immediately. See attached video where Flash "Outside" happens as soon as the terminal is launched.

Not sure whether this is a bug report or feature request. If this behavior is unintended, then it's a bug report. I think, however, that the most user-friendly (and least surprising) thing to do, would be to add an option to wait (or not) for the termux task to finish before running the next action, regardless of runInTerminal.

Also pinging #16 which is related.

Passing arguments to tasker

Is it possible to run sctipt with arguments? For example --tasker. It can be a default argument for all scripts

Allow setting standard input

Feature description

I think it would be useful to be set stdin for the command. This would allow a bit more data to be passed to the command, with less concern about escaping.

Where is the latest version?

Apologies for the silly question but the documentation refers to version 0.6.0. The latest release I see is 0.5. Am I not looking at the right place? Thank you.

Tasker variables in the arguments field?

Is it possible to put Tasker variables into the arguments field?

It would cut out so many steps; To get around it, I first write the variables to a file, then have a script parse the data from said file and then finally run the intended script with the actual arguments I needed.

Just plopping a buncha %VARs into the Termux:Task argument field would make life somuch easier.

Tasker:Task crashes when choosing the plugin from within Tasker

I created the /data/data/com.termux/files/home/.termux/tasker folder and placed a shell script in it. The crash happens whether there is anything in that folder or not.

Nexus 5X
Android 7.1.1

Logcat:

---- Feb 12, 2017 11:20:17 AM ----

02-12 11:15:48.823  2234 28829 I ActivityManager: START u0 {act=com.twofortyfouram.locale.intent.action.EDIT_SETTING cmp=com.termux.tasker/.EditConfigurationActivity (has extras)} from uid 10130 on display 0

02-12 11:15:48.929  2234  2253 I ActivityManager: Start proc 1062:com.termux.tasker/u0a239 for activity com.termux.tasker/.EditConfigurationActivity

02-12 11:15:49.180  1062  1062 E AndroidRuntime: Process: com.termux.tasker, PID: 1062

02-12 11:15:49.180  1062  1062 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.termux.tasker/com.termux.tasker.EditConfigurationActivity}: java.lang.NullPointerException: Attempt to get length of null array

02-12 11:15:49.180  1062  1062 E AndroidRuntime: 	at com.termux.tasker.EditConfigurationActivity.onCreate(Unknown Source)

02-12 11:15:49.183  2234  9747 W ActivityManager:   Force finishing activity com.termux.tasker/.EditConfigurationActivity

02-12 11:15:49.696  2234  2266 W ActivityManager: Activity pause timeout for ActivityRecord{fb4f60e u0 com.termux.tasker/.EditConfigurationActivity t2776 f}

02-12 11:15:50.195  2234  5122 I ActivityManager: Process com.termux.tasker (pid 1062) has died

02-12 11:15:50.198  2234  9747 W ActivityManager: Ignoring remove of inactive process: ProcessRecord{762dfc4 0:com.termux.tasker/u0a239}

02-12 11:16:06.399  2234  6107 I ActivityManager: START u0 {act=com.twofortyfouram.locale.intent.action.EDIT_SETTING cmp=com.termux.tasker/.EditConfigurationActivity (has extras)} from uid 10130 on display 0

02-12 11:16:06.420  2234 25764 I ActivityManager: Start proc 1511:com.termux.tasker/u0a239 for activity com.termux.tasker/.EditConfigurationActivity

02-12 11:16:06.625  1511  1511 E AndroidRuntime: Process: com.termux.tasker, PID: 1511

02-12 11:16:06.625  1511  1511 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.termux.tasker/com.termux.tasker.EditConfigurationActivity}: java.lang.NullPointerException: Attempt to get length of null array

02-12 11:16:06.625  1511  1511 E AndroidRuntime: 	at com.termux.tasker.EditConfigurationActivity.onCreate(Unknown Source)

02-12 11:16:06.630  2234  2252 W ActivityManager:   Force finishing activity com.termux.tasker/.EditConfigurationActivity

02-12 11:16:07.135  2234  2266 W ActivityManager: Activity pause timeout for ActivityRecord{5f84d0c u0 com.termux.tasker/.EditConfigurationActivity t2776 f}

02-12 11:16:07.594  2234 22499 I ActivityManager: Process com.termux.tasker (pid 1511) has died

02-12 11:16:07.598  2234  2252 W ActivityManager: Ignoring remove of inactive process: ProcessRecord{bb7711b 0:com.termux.tasker/u0a239}

02-12 11:16:19.717  2234  6111 I ActivityManager: START u0 {act=com.twofortyfouram.locale.intent.action.EDIT_SETTING cmp=com.termux.tasker/.EditConfigurationActivity (has extras)} from uid 10130 on display 0

02-12 11:16:19.753  2234 28829 I ActivityManager: Start proc 1742:com.termux.tasker/u0a239 for activity com.termux.tasker/.EditConfigurationActivity

02-12 11:16:19.916  1742  1742 E AndroidRuntime: Process: com.termux.tasker, PID: 1742

02-12 11:16:19.916  1742  1742 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.termux.tasker/com.termux.tasker.EditConfigurationActivity}: java.lang.NullPointerException: Attempt to get length of null array

02-12 11:16:19.916  1742  1742 E AndroidRuntime: 	at com.termux.tasker.EditConfigurationActivity.onCreate(Unknown Source)

02-12 11:16:19.918  2234  5122 W ActivityManager:   Force finishing activity com.termux.tasker/.EditConfigurationActivity

02-12 11:16:20.426  2234  2266 W ActivityManager: Activity pause timeout for ActivityRecord{a012eaf u0 com.termux.tasker/.EditConfigurationActivity t2776 f}

02-12 11:16:20.723  2234  9749 I ActivityManager: Process com.termux.tasker (pid 1742) has died

02-12 11:18:27.966  2234  4662 I ActivityManager: START u0 {act=com.twofortyfouram.locale.intent.action.EDIT_SETTING cmp=com.termux.tasker/.EditConfigurationActivity (has extras)} from uid 10130 on display 0

02-12 11:18:28.074  2234 25765 I ActivityManager: Start proc 5345:com.termux.tasker/u0a239 for activity com.termux.tasker/.EditConfigurationActivity

02-12 11:18:28.159  5345  5345 W System  : ClassLoader referenced unknown path: /data/app/com.termux.tasker-1/lib/arm64

02-12 11:18:28.342  5345  5345 E AndroidRuntime: Process: com.termux.tasker, PID: 5345

02-12 11:18:28.342  5345  5345 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.termux.tasker/com.termux.tasker.EditConfigurationActivity}: java.lang.NullPointerException: Attempt to get length of null array

02-12 11:18:28.342  5345  5345 E AndroidRuntime: 	at com.termux.tasker.EditConfigurationActivity.onCreate(Unknown Source)

02-12 11:18:28.344  2234  2253 W ActivityManager:   Force finishing activity com.termux.tasker/.EditConfigurationActivity

02-12 11:18:28.852  2234  2266 W ActivityManager: Activity pause timeout for ActivityRecord{dfe94 u0 com.termux.tasker/.EditConfigurationActivity t2776 f}

02-12 11:18:32.027  2234 28830 I ActivityManager: Process com.termux.tasker (pid 5345) has died

02-12 11:18:32.031  2234  2253 W ActivityManager: Ignoring remove of inactive process: ProcessRecord{2126603 0:com.termux.tasker/u0a239}

---- Feb 12, 2017 11:20:17 AM ----

configurable stdout size

As a user I use a lot of commands in which list many many values, and I need to pass them on for processing, as Termux Tasker cannot execute multiple commands via pipe char I need to pass the data via %stdout, the problem is it is limited to very small size, I have a list of more than 10k items and only about 3199 is within the %stdout when the variable is available in Tasker. While I understand that keeping the var size is for my own good, I would like a way to configure it so it will serve my purposes perhaps via the termux.properties file?

Make it possible to access Tasker variables from scripts

From https://www.reddit.com/r/tasker/comments/5mq7rc/psa_you_can_install_and_automate_things_like_curl/:

OK, so I'll just go with my own use-case as an example. I'm using Tasker to automatically write metadata to pictures as soon as I've taken them and exited the camera app. I do this by calling a Termux script from my Tasker task that runs perl exiftool [commands] /path/to/file.
In order for this to work, I obviously have to get the image file paths first of all. This is done by having Tasker read the camera folder and checking to see if there are image files that have been created since I last opened the camera app. The paths to these files are then stored in a local Tasker variable—let's say %paths.
Now I would like to pass this variable to the Termux script that I call at the end of my task in order to do something like perl exiftool [commands] $paths. What I have to do instead is write a text file in Tasker with the %paths variable and then have my Termux script read the information in that file to its own variable, which works but is kind of clunky.
I know I could rework my script to get the file paths directly in Termux, but it would be a lot more simple and versatile for a whole bunch of other use cases if it were possible to pass variables directly from Tasker.

The argument not support file paths

What I've set as pointer to a file

I've pointed a file to work with node in the arguments field. But the results comes out as nothing. Is it not working! Or the argument is taking the string as normal letters or am I missing something!

Commands that function when manually entered and not when executed in script

The following functions perfectly when manually entered into a Termux session:

rsync -avz -e ssh [email protected]:/home/XXX/Pictures/Snapshots /data/data/com.termux/files/home/downloads/Snapshots

The same command has been copied into an executable (chmod +x) script, but when I attempt to execute via the command line (./SyncSnapshots) or via the Tasker plugin, the following is returned:

via command line: bash: ./SyncSnapshots: Permission Denied

via Tasker plugin: exec("data/data.com.termux/files/home/.termux/tasker/SyncSnapshots"): Permission Denied

After rebooting the phone, Termux: Tasker settings are returned to Battery saver.

The add-on does not work in the background. constantly have to restore the "Background settings" in "No restrictions". After reboot, "Background settings" automatically switches to "Battery saver"

Problem description

Steps to reproduce

Expected behavior

Additional information

  • Termux application version: 0.4
  • Android OS version: 7.0 MIUI Global 10.2
  • Device model:Redmi Note 4

Tasker says plugin error

Problem description
When i try to select termux tasker plugin from tasker it says plugin error Screenshot_20201212-071916818.jpg

Steps to reproduce
Just select termux tasker plugin from tasker.
Screenshot_20201212-071909596.jpg
Expected behavior
It should work as it was before updating.

Additional information

  • Termux application version: 0.103
  • Android OS version: 10
  • Device model: One plus 7 pro

Inline script support?

I have just used termux-tasker plugin recently and I could not find options where I can set termux to execute script inline. There is only option to create file on sdcard and set path to the plugin. Most of the time, I want everything is inside tasker so it's much easier to back up and manage. If there are multiple tasks, I may need to create multiple file for termux which is hard to manage when time passed. If we could execute script inline and output is return to specific variable name it would be great.

Can't execute tasks if tasks are within a mount

This is a bit of a weird one, and very specific to a certain kind of setup, so I would understand if this is a wontfix.

Problem description
If your ~/.termux/tasker folder is inside a mount, Termux:Tasker only executes the files that exist in the unmounted state as well.

Steps to reproduce

Setup test scripts 1 2 3

  1. Setup script 1 and 2 inside ~/.termux/tasker normally.
  • script1 prints 1 normal to log
  • script2 prints 2 normal to log
  1. Mount a new folder to ~/.termux
  2. Create another 2 scripts
  • script2 prints 2 mounted to log
    * has the same name as one of the normal scripts
  • script 3 print 3 mounted to log
  1. Run all 3 script with Tasker

Step by step:

$ mkdir -p ~/.termux/tasker 
$ echo "echo 1 normal > ~/log" >> ~/.termux/tasker/script1
$ echo "echo 2 normal > ~/log" >> ~/.termux/tasker/script2
$ chmod +x ~/.termux/tasker/*
$ mkdir ~/test
$ sudo mount --bind ~/test ~/.termux
$ mkdir -p ~/.termux/tasker
$ echo "echo 2 mounted > ~/log" >> ~/.termux/tasker/script2
$ echo "echo 3 mounted > ~/log" >> ~/.termux/tasker/script3
$ chmod +x ~/.termux/tasker/*

Create a test task running script 1 2 and 3

Screenshot_20210512-023647_Tasker_small

Enable Continue Task After Error for all of them.

Run this task.

Check the ~/log file. It shows:

$ cat ~/log
2 mounted
$

Expected behavior
Since at the time of the execution only script2 and script3 are in ~/.termux/tasker, these two should run and produce this logfile:

$ cat ~/log
2 mounted
3 mounted
$

But the only script that is able to run correctly is script2 since it exists in both the mounted and normal state. It does execute the mounted version (otherwise the log would show 2 normal).

Additional information

Workaround

Things work as expected when you create empty executable files in the normal (not mounted) folder that have the same name as the scripts you wan to run (that's why script2 worked).

Speculation

Termux:Tasker doesn't seem to be aware of the mount at all. The completion will show script1 and script2 (instead of script2 and script3). When executing it seems to check if the files are executable within Termux:Tasker before running it via Termux. Probably here:

if (!file.isFile()) {
errmsg = context.getString(R.string.no_regular_file_found);
}
// If path is not is TASKER_PATH or if read and execute errors must not be ignored for files in TASKER_PATH
else if (!isPathInTaskerDir || !ignoreErrorsForTaskerDir) {
// If file is not readable
if (!file.canRead()) {
errmsg = context.getString(R.string.no_readable_file_found);
}
// If file is not executable
// This check will give "avc: granted { execute }" warnings for target sdk 29
else if (!file.canExecute()) {
errmsg = context.getString(R.string.no_executable_file_found);
}
}

It will fail in a weird way for script1 (this task takes noticeably longer), which Termux:Tasker thinks is executable but actually is not. Script2 works as expected, because script2 is executable in the unmounted folder so Termux:Tasker lets it execute, which then executes script2 in the mounted folder. Termux:Tasker just refuses to execute script3 because it isn't in the unmounted folder, even though it would work.
I think it's a really interesting bug. I have no idea how to best solve it. Maybe have a force execution option in Termux:Tasker that skips the checks? I'd be interesting to see if there is a way to make Termux:Tasker aware of the mount, or to know why it isn't in the first place.

WHY?!

Mounting a folder to ~/.termux is pretty weird. This procedure is only the minimum required for the bug to occur. What I actually did and lead me to this bug is that I encrypted the whole /data/data/com.termux/files using a LUKS encrypted ext4 image, for which I wrote a neat tutorial here: https://glow.li/posts/encrypt-termux-fs/

  • Termux application version: 0.112
  • Android OS version: 9
  • Device model: FP3 (Fairphone)

Timeout Issue with Automate

Problem description
I have an issue using the Termux Tasker plugin with Automate around timeouts. If the Termux command completes in less than 10 seconds it is fine, but if not it fails.

Error log:
01-21 11:30:13.290 I 58@1: Flow beginning 01-21 11:30:13.291 I 58@2: Plug-in action 01-21 11:30:13.368 D 58@2: PlugInSetting ACTION_FIRE_SETTING: resultCode=3 01-21 11:30:13.369 D 58@2: Starting 10000 ms timeout, as requested 01-21 11:30:23.388 F 58@2: java.util.concurrent.TimeoutException: Plug-in didn't respond within requested timeout 01-21 11:30:23.390 I 58@2: Stopped by failure

Steps to reproduce
Create a new Automate flow, add a termux task that takes longer than 10 seconds to execute.

Expected behaviour
The ability to set, or remove the timeout

Additional information

  • Termux application version: 1.22.1
  • Android OS version: 10
  • Device model: Samsung Galaxy S10+

See comments from Automate author here:

https://old.reddit.com/r/AutomateUser/comments/erthy2/automate_termux_timeout_issue/

Unable to install

Unable to install ... tried both download apk and via F-droid.
I get "App not installed."

  • Termux application version: 0.101
  • Android OS version: 10
  • Device model: galaxy s9

Termux:Float Checkbox?

Can you add a checkbox (that would only be visible if the Termux:Float package was installed) to run the script in a Termux Float window? I've tried to figure out a way to do this but failed.

Run scripts in sdcard

Could you please add support to run scripts in sdcard? It is much easier to edit and backup scripts in sdcard. Thanks!

Scripts launched from Macrodroid

Hi,
I'm a new user of Termux (and Termux Tasker) and I'd like to copy files from /sdcard to /data/user/0/ using Macrodroid.

Macrodroid tells me that I need to create this directory:

No ~/.termux/tasker/ directory
You need to create a ~/.termux/tasker/ directory containing scripts to be executed.

AFAIK /home of Termux is /data/data/com.termux/files/home/ so I tried to create it using mkdir ~/.termux/tasker. Result
So I've created it manually.

I still have this same message on Macrodroid.
I installed Termux app and this one (installed from F-Droid). I own a OnePlus 3T running an Oreo 8.1 AOSP based ROM.

Thank you for your help.

PS: the script I created is very and I think it should work:
#!/data/data/com.termux/files/usr/bin/sh
cp /sdcard/Download/test.xml /data/data/user/0/...../test.xml

Not able to run scripts from termux tasker plugin

I created the /data/data/com.termux/files/home/.termux/tasker folder and placed a shell script in it
I can run scripts same from directory but not from my termux tasker plugin

from termux app

$ sh /data/data/com.termux/files/home/.termux/tasker/script1.sh

$ sh ./data/data/com.termux/files/home/.termux/tasker/script1.sh

sh: 0: Can't open ./data/data/com.termux/files/home/.termux/tasker/script1.sh

$ bash /data/data/com.termux/files/home/.termux/tasker/script1.sh

$ bash ./data/data/com.termux/files/home/.termux/tasker/script1.sh

bash: ./data/data/com.termux/files/home/.termux/tasker/script1.sh: No such file or directory

$ cd /data/data/com.termux/files/home/.termux/tasker

$ ls

num.py script.sh script1.sh

$ sh script1.sh

num.py script.sh script1.sh
from termux-tasker plugin

exec("/data/data/com.termux/files/home/.termux/tasker/script1.sh"): No such file or directory

Interpreter/shebang bug

The shebang path to /usr/bin/env works fine when running youtube-dl straight from termux, but when using the tasker plugin it caused the program to fail. When the binary was edited to /bin/env the program ran as expected. It seems that whatever prefixing/redirecting Termux does for the interpreter was not integrated into the Termux: Task plugin.

Cannot install: Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]

Problem description

I have Android 6. I have got older version of termux (v 0.118.0+605dd6c) that still runs well and I downloaded termux:tasker v 0.4 for Android 5. The APK did not install in phone, so I tried ADB install and got error

Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]

Is there any other method how to install?

Steps to reproduce

Expected behavior

Additional information

  • Termux application version:
  • Android OS version:
  • Device model:

Any way to get the stdout / stderr of python scripts?

Hello!

     Basically what the title says. I can't seem to get python scripts to output anything to the standard output or error, even when using sys.stdout.write() + sys.stdout.flush(); there seem to be constant permission errors to the scripts. I also ran termux-setup-storage, but no luck.

     Any help would be greatly appreciated!

No directory of ~/.termux/tasker

when go to tasker>plugin>configuration
it show message of No directory ~/.termux/tasker
I have try to add in various place still the same
PS: the app i download from F-droid for testing purpose, is it that only the play store version will work?

`allow-external-apps` property not recognized if `~/.termux/termux.properties` is a symlink

Problem description

On my system, ~/.termux/termux.properties is a symlink, and the source file contains allow-external-apps = true.
Termux:Tasker 0.6.0 doesn't seem to see the file or setting. It worked in the previous version, 0.5.

Screenshot_20220225-184843294 (1)
Screenshot_20220225-184946444 (1)

Steps to reproduce

Move ~/.termux/termux.properties elsewhere and create a symlink in its place:

mv ~/.termux/termux.properties ~/
ln -s ~/termux.properties ~/.termux/termux.properties

Create a Tasker task that calls an executable outside of ~/.termux/tasker, for example /data/data/com.termux/files/usr/bin/nano

It won't work, Tasker will show an error.

Expected behavior

The executable should be called.

Additional information

  • Termux application version: 0.118.0
  • Termux:Tasker application version: 0.6.0
  • Android OS version: 11
  • Device model: OnePlus 8

Last update borked

After last play store update of this app, none of the tasker tasks containing the termux plugin works until you reenter the script files name. And the scripts seems to run start slower too

executing script from ./ubuntu_directory/ not ".termux/tasker"

i want to first run Ubuntu chroot for Termux by executing this script: ./ubuntu_directory/start-ubuntu.sh and then execute hollywood command

what i did was using VI command creating a script (for example: script1.sh) and in vi editor tried writing ./ubuntu_directory/start-ubuntu.sh and /ubuntu_directory/start-ubuntu.sh and start-ubuntu.sh hoping it run the start-ubuntu.sh script from ./ubuntu_directory/ but didn't work so far, so i am stock and not figured it up how to execute hollywood after that

to sum it up i want to execute "./ubuntu_directory/start-ubuntu.sh" and then "hollywood" and i want to use Termux:Task, all i know is Termux Tasker will run scripts in ".termux/tasker" so maybe there is a way to make a script in .termux/tasker to run script or as shortcut of the start-ubuntu.sh
in ./ubuntu_directory/ ? and then how to execute "hollywood" command? maybe with argument field?! do i make sense?

Session/task remains open after the executable is finished

Problem description
After running an executable from Tasker, the notification with the running session (if run in terminal) or task (if run as a task) remains active indefinitely. Clicking on the exit button does nothing. The only way to dismiss the notification is to open termux-app and exit out of it. Then the zombie session/task is closed and the notification finally disappears.

Steps to reproduce
Run anything with Termux:Tasker from Tasker. Any script, with or without terminal.

Expected behavior
Task finishes, notification disappears.

Additional information
It happened the first time after I upgraded to v0.5. However, downgrading to v0.4 did not solve the problem.

  • Termux application version: v0.105
  • Android OS version: 10
  • Device model: Xiaomi Redmi Note 7

Termux:Task action executed asynchronously (i.e. doesn't make Tasker wait for it to finish)

I created a shell script in Termux that has the command "sleep 10" inside, and placed this in the ~/.termux/tasker directory. In Tasker, I created a Task with 2 actions. The first one is Termux:Task that executes the shell script. The second is a Flash action that simply pops up a window with an "Awake" message.

When I run the task, the second action immediately gets executed, without waiting for the first to finish.

I'm not sure if Termux:Task is meant to execute asynchronously or synchronously, i.e. whether this is a feature or a bug. I saw this Tasker guide on how to create plugins, and tried to read the source code to find out whether the synchronous settings are there or not. Unfortunately, things went way over my head very quickly, so I decided to open this issue instead.

I currently have a way around this asynchronous behaviour. In Tasker, I add an action right after the Termux:Task action that will make Tasker wait until a Tasker variable is set, before proceeding to the next action. Then on the Termux script level, I add a line at the end of my script which sets this Tasker variable using the technique I learned from glow's blog. It's a bit kludgy though, and I would rather do things natively in Termux, if I could only make Termux behave synchronously.

For all I know, asynchronicity is what other users want. I myself can imagine scenarios where that could be handy. Perhaps it would be nice to have a way, for example via a termux.properties global setting or a checkbox within the Termux:Task action, where the user can set whether Termux:Task should make Tasker wait for it to finish or not?

Help

Hi can someone please help me, i had used termux boot to setup a script to run at boot

python sstvProxy.py -hl

hower, it is causing conflicts on my setup as the script is starting before other apps, can someone explain how i could use termux task to start the script a few mins after boot

Stdin still expects a file/path

Problem description
I am trying to run a shell-command only using stdin, without creating a shell script file. The docs say "use stdin", but after entering my command into stdin, it still expects an executable (file path).
When going back (and ignoring the message), it says "Error: no plugin configuration data.".

Steps to reproduce

  1. Create a task and use termux plugin
  2. Enter a command in stdin, e.g. ping -c 1 google.com
  3. Leave "Executable" field empty
  4. Click done and go back

Expected behavior
Should not expect an executable file, when std in is used.
Ideally, the user should be able to choose, wether to use an executable or stdin.

Additional information

  • Termux application version: 0.118.0
  • Android OS version: 12
  • Device model: Pixel 3 XL

termux-tasker not working

thx

  • android 9.0 tasker 5.6
  • termux-tasker src compile
  • termux-app src compile
  • ~/.termux/tasker/aa.py
  • chmod +x ~/.termux/tasker/aa.py
  • $python ~/.termux/tasker/aa.py is ok
  • $~/.termux/tasker/aa.py is ok

but
tasker plugins not working

  • adb logcat |grep error nothing
  • adb logcat|grep termux nothing
  • adb logcat|grep tasker
2019-01-26 21:09:09.129 1120-1817/? I/AlarmManager: remove alarm:Alarm{972d1b6 type 0 when 1548508202913 PendingIntent{52b2b1d: PendingIntentRecord{ff26192 net.dinglisch.android.taskerm broadcastIntent}}net.dinglisch.android.taskerm} according to operation:a8ceeb7
2019-01-26 21:09:09.146 26680-26680/? D/HwAppInnerBoostImpl: asyncReportData net.dinglisch.android.taskerm,2,1,1,0 interval=144

Installation failure, I am not even sure what caused it

Had both termux (FDroid) and other plugins installed, only Tasker won't install. Checked the logs, I am not even sure how to explain this. I need help.

12-24 01:44:00.576  1472  1549 E SELinux : SELinux:  setxattr failed: /data/app/com.termux.tasker-wmP69HJO5FGf_f0bLMbQvQ==:  Operation not permitted
12-24 01:44:00.576  1472  1549 E SELinux : SELinux:  setxattr failed: /data/app/com.termux.tasker-wmP69HJO5FGf_f0bLMbQvQ==/lib:  Operation not permitted
12-24 01:44:00.578  1472  1549 E PackageManager: Adding duplicate user id: 10163 name=com.termux.tasker
12-24 01:44:00.606  1472  1549 E Installer: Calling thread PackageManager is holding 0xce0ae85
12-24 01:44:00.606  1472  1549 E Installer: java.lang.Throwable
12-24 01:44:00.606  1472  1549 E Installer:     at com.android.server.pm.Installer.checkBeforeRemote(Installer.java:156)
12-24 01:44:00.606  1472  1549 E Installer:     at com.android.server.pm.Installer.destroyAppData(Installer.java:209)
12-24 01:44:00.606  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService.destroyAppDataLeafLIF(PackageManagerService.java:9971)
12-24 01:44:00.606  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService.destroyAppDataLIF(PackageManagerService.java:9956)
12-24 01:44:00.606  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService.scanPackageNewLI(PackageManagerService.java:10488)
12-24 01:44:00.606  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService.scanPackageTracedLI(PackageManagerService.java:10255)
12-24 01:44:00.606  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService.installNewPackageLIF(PackageManagerService.java:16892)
12-24 01:44:00.606  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:18135)
12-24 01:44:00.606  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService.installPackageTracedLI(PackageManagerService.java:17606)
12-24 01:44:00.606  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService.access$3300(PackageManagerService.java:407)
12-24 01:44:00.606  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService$10.run(PackageManagerService.java:15436)
12-24 01:44:00.606  1472  1549 E Installer:     at android.os.Handler.handleCallback(Handler.java:873)
12-24 01:44:00.606  1472  1549 E Installer:     at android.os.Handler.dispatchMessage(Handler.java:99)
12-24 01:44:00.606  1472  1549 E Installer:     at android.os.Looper.loop(Looper.java:201)
12-24 01:44:00.606  1472  1549 E Installer:     at android.os.HandlerThread.run(HandlerThread.java:65)
12-24 01:44:00.606  1472  1549 E Installer:     at com.android.server.ServiceThread.run(ServiceThread.java:44)
12-24 01:44:00.608   680  1650 E         : Couldn't opendir /data/data/com.termux.tasker: No such file or directory
12-24 01:44:00.608   680  1650 E installd: Failed to delete /data/data/com.termux.tasker: No such file or directory
12-24 01:44:00.608   680  1650 E         : Couldn't opendir /data/user_de/0/com.termux.tasker: No such file or directory
12-24 01:44:00.608   680  1650 E installd: Failed to delete /data/user_de/0/com.termux.tasker: No such file or directory
12-24 01:44:00.634  1472  1549 W PackageManager: com.android.server.pm.Installer$InstallerException: android.os.ServiceSpecificException: Failed to delete /data/user_de/0/com.termux.tasker (code 2)
12-24 01:44:00.635  1472  1549 E Installer: Calling thread PackageManager is holding 0xce0ae85
12-24 01:44:00.635  1472  1549 E Installer: java.lang.Throwable
12-24 01:44:00.635  1472  1549 E Installer:     at com.android.server.pm.Installer.checkBeforeRemote(Installer.java:156)
12-24 01:44:00.635  1472  1549 E Installer:     at com.android.server.pm.Installer.destroyAppProfiles(Installer.java:387)
12-24 01:44:00.635  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService.destroyAppProfilesLeafLIF(PackageManagerService.java:9994)
12-24 01:44:00.635  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService.destroyAppProfilesLIF(PackageManagerService.java:9985)
12-24 01:44:00.635  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService.scanPackageNewLI(PackageManagerService.java:10490)
12-24 01:44:00.635  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService.scanPackageTracedLI(PackageManagerService.java:10255)
12-24 01:44:00.635  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService.installNewPackageLIF(PackageManagerService.java:16892)
12-24 01:44:00.635  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:18135)
12-24 01:44:00.635  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService.installPackageTracedLI(PackageManagerService.java:17606)
12-24 01:44:00.635  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService.access$3300(PackageManagerService.java:407)
12-24 01:44:00.635  1472  1549 E Installer:     at com.android.server.pm.PackageManagerService$10.run(PackageManagerService.java:15436)
12-24 01:44:00.635  1472  1549 E Installer:     at android.os.Handler.handleCallback(Handler.java:873)
12-24 01:44:00.635  1472  1549 E Installer:     at android.os.Handler.dispatchMessage(Handler.java:99)
12-24 01:44:00.635  1472  1549 E Installer:     at android.os.Looper.loop(Looper.java:201)
12-24 01:44:00.635  1472  1549 E Installer:     at android.os.HandlerThread.run(HandlerThread.java:65)
12-24 01:44:00.635  1472  1549 E Installer:     at com.android.server.ServiceThread.run(ServiceThread.java:44)
12-24 01:44:00.637  1472  1549 W PackageManager: Package couldn't be installed in /data/app/com.termux.tasker-wmP69HJO5FGf_f0bLMbQvQ==
12-24 01:44:00.637  1472  1549 W PackageManager: com.android.server.pm.PackageManagerException: Package com.termux.tasker has no signatures that match those in shared user com.termux; ignoring!
12-24 01:44:00.637  1472  1549 W PackageManager:        at com.android.server.pm.PackageManagerServiceUtils.verifySignatures(PackageManagerServiceUtils.java:629)
12-24 01:44:00.637  1472  1549 W PackageManager:        at com.android.server.pm.PackageManagerService.commitScanResultsLocked(PackageManagerService.java:10596)
12-24 01:44:00.637  1472  1549 W PackageManager:        at com.android.server.pm.PackageManagerService.scanPackageNewLI(PackageManagerService.java:10482)
12-24 01:44:00.637  1472  1549 W PackageManager:        at com.android.server.pm.PackageManagerService.scanPackageTracedLI(PackageManagerService.java:10255)
12-24 01:44:00.637  1472  1549 W PackageManager:        at com.android.server.pm.PackageManagerService.installNewPackageLIF(PackageManagerService.java:16892)
12-24 01:44:00.637  1472  1549 W PackageManager:        at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:18135)
12-24 01:44:00.637  1472  1549 W PackageManager:        at com.android.server.pm.PackageManagerService.installPackageTracedLI(PackageManagerService.java:17606)
12-24 01:44:00.637  1472  1549 W PackageManager:        at com.android.server.pm.PackageManagerService.access$3300(PackageManagerService.java:407)
12-24 01:44:00.637  1472  1549 W PackageManager:        at com.android.server.pm.PackageManagerService$10.run(PackageManagerService.java:15436)
12-24 01:44:00.637  1472  1549 W PackageManager:        at android.os.Handler.handleCallback(Handler.java:873)
12-24 01:44:00.637  1472  1549 W PackageManager:        at android.os.Handler.dispatchMessage(Handler.java:99)
12-24 01:44:00.637  1472  1549 W PackageManager:        at android.os.Looper.loop(Looper.java:201)
12-24 01:44:00.637  1472  1549 W PackageManager:        at android.os.HandlerThread.run(HandlerThread.java:65)
12-24 01:44:00.637  1472  1549 W PackageManager:        at com.android.server.ServiceThread.run(ServiceThread.java:44)
12-24 01:44:00.640   680  1650 E cutils  : Failed to open(/data/misc/profiles/cur/0/com.termux.tasker/primary.prof): No such file or directory
12-24 01:44:00.640   680  1650 E installed: Failed to prepare /data/misc/profiles/cur/0/com.termux.tasker/primary.prof: No such file or directory
12-24 01:44:00.641  1472  1549 E ArtManagerService: Failed to prepare profile for com.termux.tasker:/data/app/com.termux.tasker-wmP69HJO5FGf_f0bLMbQvQ==/base.apk
12-24 01:44:00.646  1472  1549 I InstallationStatistic: com.termux.tasker|com.google.android.packageinstaller|1794|170|197|94|1057|0

Termux Task not working

Termux:Task isn't working for me for some reason...the task gets executed but script never runs
the script is in "~/.termux/tasker" folder, I have tried with both "Execute in a terminal session" checked and unchecked and simply nothing happens, it doesn't even show a blank terminal window
Tasker Run log here http://paste.ubuntu.com/23863288/
I have installed Termux and all it's plugin's from f-droid
Termux version : 0.46
Termux:Task version : 0.1
Android version : 5.1.1 lollipop
Device : VivoV3Max
ty

Script called from Tasker doesn't work correctly.

Hello,

first please bare with my low skills I am rather a user than developer..

In Tasker I have a task that creates a playlist with few videos from my subs.

In termux I wrote a small script that downloads that playlist and converts to mp3 with youtube-dl.
(the sh script for reference: https://pastebin.com/Wsqnvx1B , I use the files in the /variables dir as variables from tasker)

The script works flawlessly launched from within Termux with "./" but from Tasker it won't recognize the URL. When launching the script with terminal window I get this result:


ERROR: '' is not a valid URL. Set --default-search "ytsearch" (or run youtube-dl "ytsearch:" ) to search YouTube

[Process completed (code 1) - press Enter]


It looks like the script won't read the file with the link when launched from Tasker..

Logcat: https://pastebin.com/guHXqMTx

I noticed "12.47.08#ActionArgBundle: error: Termux: replace specified for null or non-string extra: com.termux.tasker.extra.TERMINAL" in the first line but unfortunately I don't know what that means.

Any help would be much appreciated and I'm willing to provide any info. Thanks in advance.

Regards,

ionlyaskforeden

Erro de Instalação

Screenshot_20210411-083233_NetHunter Store

Problem description

Steps to reproduce

Expected behavior

Additional information

  • Termux application version: Termux Task 0.4
  • Android OS version: 10
  • Device model: Samsung Galaxy A10 - SM-205G/DS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.