Code Monkey home page Code Monkey logo

matrix-chat-message's People

Contributors

dependabot[bot] avatar fadenb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

matrix-chat-message's Issues

Use it for gitter.im

Hi @fadenb
Thanks a lot for your nice action.
I am currently trying to apply it on a gitter chat (now using matrix).

My params are:

  • homeserver: gitter.im
  • room ID looks like: !nkJduYevFfQSxSMMMP:gitter.im

But the action returns:

message: *****************
messagetype: m.notice
sendEvent of type m.room.message in !XWVzIQpwOMjHkyTsNE:gitter.im with txnId m1704449797402.0
/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:51085
    err = new Error(`Server returned ${httpStatus} error`);
          ^

Error: Server returned 404 error
    at parseErrorResponse (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:51085:11)
    at /home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:51033:17
    at Request._callback (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:50967:9)
    at Request.self.callback (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:71728:22)
    at Request.emit (node:events:513:28)
    at Request.<anonymous> (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:72697:10)
    at Request.emit (node:events:513:28)
    at IncomingMessage.<anonymous> (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:72619:12)
    at Object.onceWrapper (node:events:627:28)
    at IncomingMessage.emit (node:events:525:35) {
  httpStatus: 404
}

Let me know if you see a quick fix, else do not hesitate to close my issue
Cheers

Room id is not recognized

While trying this action, I quickly got an error about an invalid room ID, which I am sure is correct.

The test workflow can be seen at https://github.com/ansible-community/devtools/blob/main/.github/workflows/notify.yml

Any idea about what went wrong? I kinda find it funny that the room id is not displayed in log but there is a very long stacktrace. AFAIK, room id is not really a secret.

Error sending event M_UNRECOGNIZED: Unrecognized request
    at parseErrorResponse (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:51078:13)
homeserver: matrix.org
    at /home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:51033:17
channel: 
    at Request._callback (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:50967:9)
token: ***
    at Request.self.callback (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:71728:22)
message: 
    at Request.emit (events.js:210:5)
messagetype: m.notice
    at Request.<anonymous> (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:72697:10)
sendEvent of type m.room.message in  with txnId m1636115815079.0
    at Request.emit (events.js:210:5)
Error: M_UNRECOGNIZED: Unrecognized request
    at IncomingMessage.<anonymous> (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:72619:12)
    at Object.onceWrapper (events.js:299:28)
    at IncomingMessage.emit (events.js:215:7)
(node:2074) UnhandledPromiseRejectionWarning: M_UNKNOWN:  was not legal room ID or room alias
    at parseErrorResponse (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:51078:13)
    at /home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:51033:17
    at Request._callback (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:50967:9)
    at Request.self.callback (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:71728:22)
    at Request.emit (events.js:210:5)
    at Request.<anonymous> (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:72697:10)
    at Request.emit (events.js:210:5)
    at IncomingMessage.<anonymous> (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:72619:12)
    at Object.onceWrapper (events.js:299:28)
    at IncomingMessage.emit (events.js:215:7)
(node:2074) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2074) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Unclear `M_UNKNOWN_TOKEN: Invalid access token passed.` error

We have the Matrix-Chat-Message deployed with a weekly run of a Github Action to report to a private matrix room. Sometimes it works perfectly as intentended:

Run fadenb/[email protected]
  with:
    homeserver: matrix.org
    token: ***
    channel: !UXNJuMzHTSAnwntbbN:utwente.io
    message: &#x2705; **PASSED**: Release tests
  [iotlab_creds, ] on "*workflow_dispatch*":
  https://github.com/RIOT-OS/RIOT/actions/runs/4091478349
  
    messagetype: m.notice
  env:
    DOCKER_MAKE_ARGS: -j
    SSH_AUTH_SOCK: /tmp/ssh-XXXXXXMx7W7H/agent.1558
    SSH_AGENT_PID: 1559
    pythonLocation: /opt/hostedtoolcache/Python/3.8.16/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.16/x64/lib
homeserver: matrix.org
channel: !UXNJuMzHTSAnwntbbN:utwente.io
token: ***
message: &#x2705; **PASSED**: Release tests
[iotlab_creds, ] on "*workflow_dispatch*":
https://github.com/RIOT-OS/RIOT/actions/runs/4091478349
messagetype: m.notice
sendEvent of type m.room.message in !UXNJuMzHTSAnwntbbN:utwente.io with txnId m1675512560763.0
Joined channel
Event sent to !UXNJuMzHTSAnwntbbN:utwente.io with event id $imxfmHpH-rPlaoBObauMvjAdm9B_hUjuehfuX9hD62I

However, most of the time, we get an M_UNKNOWN_TOKEN: Invalid access token passed. error, even though the token did not change:

Run fadenb/[email protected]
  with:
    homeserver: matrix.org
    token: ***
    channel: !UXNJuMzHTSAnwntbbN:utwente.io
    message: &#x274C; **FAILED**: Release tests
  [iotlab_creds, ] on "*schedule*":
  https://github.com/RIOT-OS/RIOT/actions/runs/4209315115
  
    messagetype: m.notice
  env:
    DOCKER_MAKE_ARGS: -j
    SSH_AUTH_SOCK: /tmp/ssh-XXXXXXutbYub/agent.1559
    SSH_AGENT_PID: 1560
    pythonLocation: /opt/hostedtoolcache/Python/3.8.16/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.16/x64/lib
homeserver: matrix.org
channel: !UXNJuMzHTSAnwntbbN:utwente.io
token: ***
message: &#x274C; **FAILED**: Release tests
[iotlab_creds, ] on "*schedule*":
https://github.com/RIOT-OS/RIOT/actions/runs/4209315115
messagetype: m.notice
sendEvent of type m.room.message in !UXNJuMzHTSAnwntbbN:utwente.io with txnId m1676700716517.0
(node:61474) UnhandledPromiseRejectionWarning: M_UNKNOWN_TOKEN: Invalid access token passed.
    at parseErrorResponse (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:51078:13)
    at /home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:51033:17
    at Request._callback (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:50967:9)
    at Request.self.callback (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:71728:22)
    at Request.emit (events.js:314:20)
    at Request.<anonymous> (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:72697:10)
    at Request.emit (events.js:314:20)
    at IncomingMessage.<anonymous> (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:72619:12)
    at Object.onceWrapper (events.js:420:28)
    at IncomingMessage.emit (events.js:326:22)
(node:61474) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:61474) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Error sending event M_UNKNOWN_TOKEN: Invalid access token passed.
    at parseErrorResponse (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:51078:13)
    at /home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:51033:17
    at Request._callback (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:50967:9)
    at Request.self.callback (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:71728:22)
    at Request.emit (events.js:314:20)
    at Request.<anonymous> (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:72697:10)
    at Request.emit (events.js:314:20)
    at IncomingMessage.<anonymous> (/home/runner/work/_actions/fadenb/matrix-chat-message/v0.0.6/dist/index.js:72619:12)
    at Object.onceWrapper (events.js:420:28)
    at IncomingMessage.emit (events.js:326:22)
Error: M_UNKNOWN_TOKEN: Invalid access token passed.

2nd bot test issue

This is some text
Created via a Matrix room

It even contains newlines ;)
๐Ÿฆ„

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.