shayaantx / botdarr

Slack/Discord/Telegram/Matrix bot for accessing radarr, sonarr, and lidarr
GNU General Public License v3.0
157 stars 12 forks source link

Exception in thread "main" java.lang.RuntimeException: Password login not supported on homeserver #119

Closed y0da822 closed 5 months ago

y0da822 commented 5 months ago

Hi - this project looks great. Been prepping to use it as I switch to Matrix (saved me the stress of making my own!)

I am getting this message from my matrix server- I login with just a username and password -what am I missing?

Exception in thread "main" java.lang.RuntimeException: Password login not supported on homeserver

shayaantx commented 5 months ago

hmmm

thats driven by this https://github.com/shayaantx/botdarr/blob/0ea239a146be667c962c5d5120634a13dcc592cf/src/main/java/com/botdarr/clients/matrix/MatrixChatClient.java#L256

it seems like if you goto https:///login a json is returned with a flow called "m.login.password"

I can add more logging here to see whats being returned in your case? @y0da822

y0da822 commented 5 months ago

Thanks - anything I can do before making you do more work? Maybe something on my server side?

FYI - running in docker

shayaantx commented 5 months ago

its not more work or anything, I'll get you a curl to run to test this, probably won't be till sunday morning or sunday night tho

y0da822 commented 5 months ago

Ok - no rush at all - this isnt critical its just a hobby - whenever.

shayaantx commented 5 months ago

@y0da822 sorry for late response

$ curl https://<home-server-url>/_matrix/client/r0/login
{"flows":[{"type":"m.login.password"},{"type":"m.login.application_service"}]}[

is basically what https://github.com/shayaantx/botdarr/blob/0ea239a146be667c962c5d5120634a13dcc592cf/src/main/java/com/botdarr/clients/matrix/MatrixChatClient.java#L256 is doing

what do you have set in MATRIX_HOME_SERVER_URL (if you're using docker)? Also if you run same curl (replacing home server hostname) what do you get back?

y0da822 commented 5 months ago

Thank you - not a problem at all. I am using this ansible project to create the server. https://github.com/spantaleev/matrix-docker-ansible-deploy/

When I curl my matrix.domain.com I get {"flows":[{"type":"m.login.password"},{"type":"m.login.application_service"}]}.

In the docker-compose file, I have matrix.domain.com as the MATRIX_HOME_SERVER

shayaantx commented 5 months ago

Thank you - not a problem at all. I am using this ansible project to create the server. https://github.com/spantaleev/matrix-docker-ansible-deploy/

When I curl my matrix.domain.com I get {"flows":[{"type":"m.login.password"},{"type":"m.login.application_service"}]}.

In the docker-compose file, I have matrix.domain.com as the MATRIX_HOME_SERVER

Is it a url or hostname as the value of MATRIX_HOME_SERVER?

y0da822 commented 5 months ago

hostname - should it be url?

shayaantx commented 5 months ago

hostname - should it be url?

lemme check

y0da822 commented 5 months ago

no rush - thank you

shayaantx commented 5 months ago

@y0da822 looks like it should be url, try changing it and see if it works

(cause I changed mine to hostname and it fails same way)

If it works after using url, I'll make a small change to prevent using hostnames so its more obvious

y0da822 commented 5 months ago

That worked - I really need to learn how to read better.

y0da822 commented 5 months ago

Thank you - have to make sure you use the URL - I didnt read thanks!!!