Comments (14)
@Pyker Thanks again, I just created v1.5.2
!
from slacktee.
Hi marcelo321,
How did you set up the token? Did you setup a slack app for slacktee? Or using a bot user?
Also, could you check if test/test.sh
can work?
from slacktee.
Everything else works just fine. echo abc | slacktee.sh
sends the message correctly. I am using a bot for the past months using slacktee.sh
Even if I try to send the line that just failed, like copy-pasting it in a echo, it sends it correctly: echo "string whatever | slacktee.sh
But it fails when I do echo "${var}" | slacktee.sh
with this error slacktee.sh: {"ok":false,"error":"invalid_json"}
from slacktee.
Oh ok. echo abc | slacktee.sh
works, but the test throw me 150 errors. This might be since I updated from a non-supported linux version to last version of ubuntu and everything is failing now haha:
This test posts many messages to your Slack channel?
Are you sure to execute this test? [y/n] :y
-- Setup mode --
/bin/bash: ../slacktee.sh: No such file or directory
-- Buffering (default) --
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Non buffering (-n/--no-buffering) --
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Non buffering (--no-buffering) --
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- File upload (-f) --
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- File upload (--file) --
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Title (-t) --
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Title (--title) --
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Title with non buffering (-t and -n)
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Title with file (-t and -f)
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Link (-l) --
/bin/bash: ../slacktee.sh: No such file or directory
-- Link (--link) --
/bin/bash: ../slacktee.sh: No such file or directory
-- Link with title (-t and -l) --
/bin/bash: ../slacktee.sh: No such file or directory
-- Channel (-c) --
/bin/bash: ../slacktee.sh: No such file or directory
-- Channel (--channel) --
/bin/bash: ../slacktee.sh: No such file or directory
-- Channel (-c) with # --
/bin/bash: ../slacktee.sh: No such file or directory
-- Channel (-c) with @ (Shouldn't happen anything) --
/bin/bash: ../slacktee.sh: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Username (-u) --
/bin/bash: ../slacktee.sh: No such file or directory
-- Username (--username) --
/bin/bash: ../slacktee.sh: No such file or directory
-- Icon (-i) --
/bin/bash: ../slacktee.sh: No such file or directory
-- Icon (--icon) --
/bin/bash: ../slacktee.sh: No such file or directory
-- Icon (-i with URL) --
/bin/bash: ../slacktee.sh: No such file or directory
-- Message formatting (-m) with link_names --
/bin/bash: ../slacktee.sh: No such file or directory
-- Message formatting (--message-formatting) with full --
/bin/bash: ../slacktee.sh: No such file or directory
-- Message formatting (-m) with none --
/bin/bash: ../slacktee.sh: No such file or directory
-- Plain text (-p) --
/bin/bash: ../slacktee.sh: No such file or directory
-- Plain text (--plain-text) --
/bin/bash: ../slacktee.sh: No such file or directory
-- Attachment (-a) with no color --
/bin/bash: ../slacktee.sh: No such file or directory
-- Attachment (--attachment) with 'good' --
/bin/bash: ../slacktee.sh: No such file or directory
-- Attachment (--attachment) with color code --
/bin/bash: ../slacktee.sh: No such file or directory
-- Attachment (-a) with long fiels (-e/--field) --
/bin/bash: ../slacktee.sh: No such file or directory
-- Attachment (-a) with short fiels (-s/--short-field) --
/bin/bash: ../slacktee.sh: No such file or directory
-- Attachment (-a) with long and short fields (-e/-s) --
/bin/bash: ../slacktee.sh: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Conditional Coloring (-o) without default color --
/bin/bash: ../slacktee.sh: No such file or directory
-- Conditional Coloring (--cond-color) without default color --
/bin/bash: ../slacktee.sh: No such file or directory
-- Conditional Coloring (-o) with default color --
/bin/bash: ../slacktee.sh: No such file or directory
-- Conditional Coloring (-o) with default color defined by config file
/bin/bash: ../slacktee.sh: No such file or directory
-- Conditional Coloring (-o) - Simple match in buffering mode
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Conditional Coloring (-o) - Simple match in no-buffering mode
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Conditional Coloring (-o) - Simple match in file mode
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Conditional Coloring (-o) - Multiple matches in buffering mode
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Conditional Coloring (-o) - Multiple matches in no-buffering mode
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Conditional Coloring (-o) - Multiple matches in file mode
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Conditional prefix (-d) in buffering mode --
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Conditional prefix (--cond-prefix) in buffering mode --
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Conditional prefix (-d) in no-buffering mode - Prefix should be added to 2nd line --
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Conditional prefix (-d) in file mode --
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Conditional prefix (-d) with attachment --
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Check exit code : Success 0 --
/bin/bash: ../slacktee.sh: No such file or directory
127
-- Check exit code : Failure 1 --
/bin/bash: ../slacktee.sh: No such file or directory
127
/bin/bash: ../slacktee.sh: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Suppress the standard output (-q) --
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
-- Suppress the standard output (--no-output) --
cat: ./test_data.txt: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
/bin/bash: ../slacktee.sh: No such file or directory
Test is done!
root@localhost:~/slacktee# which slacktee.sh
/usr/local/bin/slacktee.sh
root@localhost:~/slacktee# echo abc | slacktee.sh
abc
from slacktee.
Ah sorry, the test needs to be executed in test
directory. ;p
I'm glad to hear slacktee.sh worked with echo
. So it sounds like there are some special characters in your file/${var} that slacktee cannot handle. Is it possible to scrub sensitive data from your file/${var} and share it with me?
from slacktee.
so I am redirecting the output of a tool to a file tool > file
.
If I do cat file | slacktee.sh
it throws me slacktee.sh: {"ok":false,"error":"invalid_json"}
.
If I do cat file
, then manually copy the output of file to file2
.
and then try cat file2 | slacktee.sh
I get no errors..
If I do cat file
it shows them without empty lines, but doing nano file
shows the file as:
line1
line2
line3
maybe newlines or something like that?
from slacktee.
Ok so I edited it with vim this time, and apparently there was ^M
at the start of every line, removing that allowed me to send the message sucesfully? with nano I couldn't see that
from slacktee.
According to this slack overflow thread, ^M
is the representation of carriage return in Vim.
That might mess up the json structure of the request. Very interesting.
from slacktee.
I am fixing it by adding | tr -d $'\r'|
before slacktee.sh
from slacktee.
Sounds great! I'm also adding the logic filtering it up to slacktee.sh
.
from slacktee.
This issue has been fixed by v1.5.1
from slacktee.
Not sure what happened there, but the mentioned PR was never merged. The only difference between 1.5.0 and 1.5.1 is the README
from slacktee.
@Pyker Thank you so much for pointing it out! My bad, I forgot to merge the PR ;( Let me fix it now!
from slacktee.
You're very welcome! Thanks for the fix.
from slacktee.
Related Issues (20)
- Error: here-document delimited by end-of-file (wanted `EOF') HOT 3
- Add negative color/prefix pattern condition HOT 5
- color doesn't stay HOT 3
- Unable to close with CTRL+C, when running directly HOT 4
- Interactive copies won't work for unattended installs HOT 2
- Using Webhook to run slacktee HOT 2
- Unable to create slacktee as a service HOT 4
- Add ability to skip interactive setup upon installation HOT 2
- "not in channel" error HOT 10
- Different output by same bot? HOT 3
- Globbing HOT 7
- Post to thread HOT 1
- Color in ouput gives json error HOT 4
- Breaking rich format when sending +4000 characters HOT 2
- Add version flag HOT 1
- Send without message
- `parseMode` causes invalid json error
- streaming but without editing
- any kind of logs?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slacktee.