mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #342] CLI on Termux (Android) fails to connect #267
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#267
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @goodevilgenius on GitHub (Jun 24, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/342
I compiled the cli under Termux (the precompiled binaries didn't work). Compilation worked, but pub/sub doesn't work.
Here's compilation output:
Here's output of a pub command:
Similar output for
subcommand. Adding-dand--tracedidn't add any extra output.curlworks fine, however.@wunter8 commented on GitHub (Jun 29, 2022):
I just compiled ntfy-client on my phone inside Termux, and it worked just fine. This is what I did:
What version of golang are you using? I have
go1.18.3@goodevilgenius commented on GitHub (Jun 29, 2022):
Looks like this is somehow a limitation of my device, although I'm not really sure how.
I updated go to 1.18.3, and tried everything again. I even deleted all the packages from ~/go/pkg first, and did it all again. Same result.
This was on my tablet: an Amazon Fire.
I switched to my phone, a Samsung Galaxy, and tried there. Worked first time, no problem.
I then tried copying the binary from my phone to my tablet. That binary that worked fine on my phone failed in the same way on my tablet.
It seems weird, since other programs, like curl, work fine.
@wunter8 commented on GitHub (Jun 29, 2022):
Hmm, that does seem strange. Unfortunately, I don't have an Amazon Fire I could test with myself
@steff75 commented on GitHub (Jul 3, 2022):
The same for me. I compiled ntfy in Termux on a OnePlus 7 (Android 11). On the device itself I get the same error message as described above.
However, if I copy the binary into Termux on my Galaxy Tab S3 (Android 8), it works flawlessly there.
@binwiederhier commented on GitHub (Jul 3, 2022):
Dumb question: Why are so many people using the ntfy CLI on a phone? What use case am I missing?
@steff75 commented on GitHub (Jul 3, 2022):
Because you can ;-)
Actually, I tested it only out of curiosity. Normally I get along with Tasker http requests to publish something.
@goodevilgenius commented on GitHub (Jul 5, 2022):
@binwiederhier I had an idea to automate some stuff on my home computer, by subscribing to a specific topic. I send commands to my computer from my phone. I send them via Tasker, no problem, but I want to be able to get feedback back from my computer to my phone.
So, before I send the notification, I subscribe to a custom channel that I wait for feedback on within Termux. A custom script that runs on my computer will read the command sent through ntfy via Tasker, do something on my computer, and then send a new notification with output from the command. Having subscribed to this notification in Termux, a script is run that writes the output to a file on my phone, and/or creates a new notification.
It looks like this
I haven't actually implemented all of this. I'm not sure I have a definite use case for it yet. It's just an idea I had.
@binwiederhier commented on GitHub (Jul 5, 2022):
I feeel like I understand what you are doing there (you want to execute commands on your computer and get output/feedback), and I believe you can do that without the ntfy CLI on the phone.
(Side note: super cool diagram. Didn't know GitHub can do that!)
@wunter8 commented on GitHub (Jul 5, 2022):
I have something set up similar to what binwiederhier described, and it's working great! I didn't know that messages are still broadcast even if the subscription is muted, though! That's cool
@lilithium-hydride commented on GitHub (Jul 15, 2022):
I believe this is Mermaid. I didn't know GitHub supported it, but it's really powerful.
@goodevilgenius commented on GitHub (Jul 15, 2022):
It is Mermaid. GitHub has supported it since February.
Although, I really should've used a Sequence Diagram instead of a flowchart.
@binwiederhier commented on GitHub (Nov 19, 2022):
Closed due to inactivity. Happy to reopen if people still have issues.