-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Second webhook : 404 Not Found #7
Comments
Hmm, I really don't know what's going wrong here, but it looks like something is going wrong with maubot internally, since maubot-webhook simply calls Lines 135 to 138 in 703d720
But it's good that you were able to reproduce the issue after a maubot reboot, maybe we can finally get to the bottom of this issue. As a first step, can you tell me which version of maubot you're using? |
For starters, you can use the following version that has a few debug prints around |
I was using v0.2.0 and I am well familiar with python, so add debugs or try some fix isn't a problem. I tried with your version, and after a restart of maubot, here is the complete footprint (I included both instances, as it might be relevant). I also called both instance. I voluntarily don't follow the expected format for the "webhook", to not flood the room (so the 500 error is expected on that line) [2024-02-01 00:17:57,987] [[email protected]] Loaded and imported plugin me.jkhsjdhjs.maubot.webhook from /data/plugins/me.jkhsjdhjs.maubot.webhook-v0.2.0-ts1706746620078.mbp
[2024-02-01 00:17:57,992] [[email protected]_homelab] Webapp _resources: []
[2024-02-01 00:17:57,992] [[email protected]_homelab] Webapp _named_resources: {}
[2024-02-01 00:17:57,992] [[email protected]_homelab] Webapp _resources: [<PlainResource /send>]
[2024-02-01 00:17:57,993] [[email protected]_homelab] Webapp _named_resources: {}
[2024-02-01 00:17:57,993] [[email protected]_homelab] Webhook available at: https://maubot.xxxx.com/_matrix/maubot/plugin/webhook_homelab/send
[2024-02-01 00:17:57,993] [[email protected]_homelab] Started instance of me.jkhsjdhjs.maubot.webhook v0.2.0 with user @xxxx:xxxx.com
[2024-02-01 00:17:57,998] [[email protected]] Webapp _resources: []
[2024-02-01 00:17:57,998] [[email protected]] Webapp _named_resources: {}
[2024-02-01 00:17:57,998] [[email protected]] Webapp _resources: [<PlainResource /send>]
[2024-02-01 00:17:57,998] [[email protected]] Webapp _named_resources: {}
[2024-02-01 00:17:57,999] [[email protected]] Webhook available at: https://maubot.xxxx.com/_matrix/maubot/plugin/webhook/send
[2024-02-01 00:17:57,999] [[email protected]] Started instance of me.jkhsjdhjs.maubot.webhook v0.2.0 with user @xxxx:xxxx.com
[2024-02-01 00:17:58,071] [[email protected]] Plugin instance dependencies loaded
[2024-02-01 00:17:58,071] [[email protected]] Plugin instance dependencies loaded
[2024-02-01 00:17:58,071] [[email protected]_homelab] Plugin instance dependencies loaded
[2024-02-01 00:17:58,072] [[email protected]] Listening on http://0.0.0.0:29316
[2024-02-01 00:17:58,072] [[email protected]] Startup actions complete in 0.35 seconds, now running forever
[2024-02-01 00:18:01,935] [[email protected]] Connection from 172.22.0.7 opened
[2024-02-01 00:18:01,979] [[email protected]] Connection from 172.22.0.7 authenticated
[2024-02-01 00:18:29,062] [[email protected]] 172.22.0.7 "POST /_matrix/maubot/plugin/webhook_homelab/send 404 173 in 0.0008s"
[2024-02-01 00:20:14,064] [[email protected]] Got request <Request POST /send >
[2024-02-01 00:20:14,065] [[email protected]] Auth token is valid
[2024-02-01 00:20:14,081] [[email protected]] 172.22.0.7 "POST /_matrix/maubot/plugin/webhook/send 500 217 in 0.0178s"
|
Interesting, thanks for your reply! We can see that the resource is indeed successfully added to Can you add a few debug prints to the I think it would be helpful to know what exactly the variable EDIT: |
Here is the output for the not working instance: <MatchInfoError 404: Not Found>
<bound method SystemRoute._handle of <SystemRoute 404: Not Found>> And here for the working one: <MatchInfo {}: <ResourceRoute [POST] <PlainResource /send> -> <bound method WebhookPlugin.handle_request of <plugin.WebhookPlugin object at 0x7f4b2e06d950>>>
<bound method WebhookPlugin.handle_request of <plugin.WebhookPlugin object at 0x7f4b2e06d950>> As i'm not really familiar with maubot codebase, I cannot really push forward the investigation. |
Thanks! So it seems that indeed the aiohttp |
I'm not very familiar with maubot codebase for this one. Where is the |
I just found out why: The Anyway, I just had a look at the pre-3.9 It seems to just iterate through |
Hey, is this still an issue for you? Not a problem if you don't have much time currently, just asking because I'd really like to get to the bottom of this issue. |
Hi, yes this is still an issue, but I don't really have time for it now. But it's still (somewhere) on my todo list. |
I noticed some issues when trying to create an instance with non-alphabetic characters in the name. |
Could somebody confirm, if instances with names containing underscore are working? |
I can confirm that, in my case it isn't. In the initial issue was related to two webhooks, |
In your initial issue I can only see errors from an instance containing underscore (webhook_instance). |
Hmm, instance names containing underscores work fine for me:
path: /send
method: POST
room: '!someroom:my.domain'
message: Hello world!
message_format: plaintext
auth_type: Basic
auth_token: abc:123
force_json: false
ignore_empty_messages: false $ curl -X POST -u abc:123 'https://maubot.my.domain/_matrix/maubot/plugin/webhook_test/send'
$ echo $?
0 Which maubot and aiohttp versions do you have? Also I think it would be cool if you could create a new issue for this. I tested this using the most recent commits, so you can try building the most recent version by yourself and checking whether this makes a difference. Instructions for this can be found in the readme. |
maubot version: 0.4.2 I've just noticed that you added some changes since the last version (0.2.0) which already solved several issues I had. |
Yes, I was just in the process of publishing a new release when this issue was created. I decided to wait with the release until this one is resolved, but maybe I'll just publish a new release in the next days, since I'm not sure when this will be done. Do you still have issues with underscores? Your versions are the same I also have. |
Would be great! Yes, those are the versions I encountered the issues with underscores. |
@veso0308 I just published a new release |
@jkhsjdhjs : Many thanks! |
Hello, I've got the same problem with latest version (0.3), it return 404 on second instances. Same result with underscore and simple letters Edit : I think I found the problem. I have two instances of Radarr in my homelab, the first instance is called "radarr" and the second instance is called "radar_animes". I just renamed the second one to just "animes" and it works. It seems that there is a path to explore in this direction. |
@fabiencharrasse Thank you for this information! Now I can reproduce the issue. I guess it's an aiohttp bug, but I'll investigate. |
The order in which the instances are added seems to be an issue. E.g. if you create |
I found the cause and reported it to the maubot repo: maubot/maubot#239 |
Using the version 0.2.0, I faced the same issue than #2 . I already have a working instance, using ID "webhook", but failed to create another one, under "webhook_homelab". Here is the content of the releavents log during the creation of the second instance :
But I got 404 not found error, with no debug line from the
webhook_instance
.I tried to restart maubot, with the same result.
any idea of the source of the issue since #2 ? Can I provide something else that could help debug this ?
My first webook, with id "webhook" is still working.
The text was updated successfully, but these errors were encountered: