Code Monkey home page Code Monkey logo

Comments (5)

adis-io avatar adis-io commented on May 12, 2024

It works with demo.rocket.chat, but not working with custom hosted server.

from rocket.chat.android.

adis-io avatar adis-io commented on May 12, 2024

I think I found out.

Look at this line:
https://github.com/RocketChat/Rocket.Chat.Android.Lily/blob/0e2c2ccf1c96b23bffcf9d5835cec455aa8b7dd0/app/src/main/java/chat/rocket/android/api/ws/RocketChatWSAPI.java#L51

It tries to connect to SSL

from rocket.chat.android.

bhuvinay avatar bhuvinay commented on May 12, 2024

yes , I am also getting same error "websocket: failed to connect."
Had any one able to connect with custom server?

error logs:
9892-21260/chat.rocket.android E/Rocket.Chat.Android: websocket: failed to connect.
java.lang.Exception: [Failure]
at chat.rocket.android_ddp.DDPClientImpl.lambda$addErrorCallback$34(DDPClientImpl.java:331)
at chat.rocket.android_ddp.DDPClientImpl.access$lambda$39(DDPClientImpl.java)
at chat.rocket.android_ddp.DDPClientImpl$$Lambda$42.call(Unknown Source)
at rx.Observable$27.onNext(Observable. java:8144)
at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:139)
at rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter. java:54)
at rx.observers.Subscribers$5.onNext(Subscribers.java:229)
at rx.internal.operators.OperatorPublish$PublishSubscriber.dispatch(OperatorPublish.java:587)
at rx.internal.operators.OperatorPublish$PublishSubscriber.onNext(OperatorPublish.java:285)
at chat.rocket.android_ddp.rx.RxWebSocket$1$1.onFailure(RxWebSocket.java:43)
at okhttp3.ws.WebSocketCall$1.onFailure(WebSocketCall.java:104)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:140)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)

from rocket.chat.android.

adis-io avatar adis-io commented on May 12, 2024

I suppose most of users who stumbled into this issue are using non-SSL server.

So as I pointed earlier you need to change wss to ws here:
https://github.com/RocketChat/Rocket.Chat.Android.Lily/blob/0e2c2ccf1c96b23bffcf9d5835cec455aa8b7dd0/app/src/main/java/chat/rocket/android/api/ws/RocketChatWSAPI.java#L51

Update:
make sure you setup correctly nginx.

telnet im.example.com 80

from rocket.chat.android.

pesektomas avatar pesektomas commented on May 12, 2024

Hello, I had same problem, but it reason was, that I added on begin address https://.

So I setup server address https://chat.company.cz, but setup is chat.company.cz and application works correct.

from rocket.chat.android.

Related Issues (20)

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.