Rocket.Chat.iOS icon indicating copy to clipboard operation
Rocket.Chat.iOS copied to clipboard

can't connect to domain who contains dash

Open lmopi opened this issue 6 years ago • 23 comments

  • Your Rocket.Chat app version: 3.5.0
  • Your Rocket.Chat server version: 1.3.2
  • Device (or Simulator) you're running with: iPhone X

Hello everyone,

I noticed a problem connecting to my rocketchat server from the app. The url of my server is rocketchat.my-domain.com but it generates me a message indicating that the url is invalid. By removing the dash, the error message is different. Can you change the url check to allow the " - " character?

Thank you

lmopi avatar Sep 09 '19 12:09 lmopi

Same problem here. iOS Client unable to connect. Domain: rocketchat.my-domain.de

himpierre avatar Sep 09 '19 13:09 himpierre

I'm not so sure anymore the connection problem is caused by a dash in the domain name. I restored a backup and used a domain name without a dash and experiencing the same difficulties. Maybe my problem comes from server version 2.0.0-rc2? All connections are doing fine but connecting an iOS client for the first time gives the common "oops can't connect to server" error.

himpierre avatar Sep 09 '19 16:09 himpierre

@himpierre in 2.0.0, there has been an API change for the info request from api/v1/info to api/info

This has been fixed and merged into develop - https://github.com/RocketChat/Rocket.Chat.iOS/pull/2753

But not yet in master.

rudrankriyam avatar Sep 09 '19 16:09 rudrankriyam

@rudrankriyam Thanks for the heads-up. I wonder if a nginx redirect will be sufficiant for the time being.

himpierre avatar Sep 09 '19 19:09 himpierre

@rudrankriyam Just checked. It seems with 2.0.0-rc2 both endpoints are still available.

himpierre avatar Sep 10 '19 06:09 himpierre

@himpierre changes with api/v1/info appears in 2.0.0-rc.3

lmopi avatar Sep 10 '19 07:09 lmopi

@lmopi Good to know. So my problem has another origin.

himpierre avatar Sep 10 '19 07:09 himpierre

Apparently they reverted the removal? I don't get it. :-) https://github.com/RocketChat/Rocket.Chat/pull/15332

himpierre avatar Sep 10 '19 07:09 himpierre

Ok, my problem is gone with 2.0.0-rc3.

himpierre avatar Sep 10 '19 07:09 himpierre

Note that the url problem does not appear on android phones

lmopi avatar Sep 11 '19 07:09 lmopi

No news ? I really need this

lmopi avatar Sep 18 '19 07:09 lmopi

up

lmopi avatar Oct 25 '19 08:10 lmopi

up

Note this

Ok, my problem is gone with 2.0.0-rc3.

You probably need to upgrade your server to 2.x +

reetp avatar Oct 25 '19 08:10 reetp

My server is up to date. This is not a problem with the server but with the client application that refuses any domain that contains a dash without checking if there is a server behind.

lmopi avatar Oct 27 '19 09:10 lmopi

Please note that this is unlikely to get fixed in native iOS (Swift)

All the mobile apps are moving to React Native.

https://rocket.chat/2019/10/11/moving-mobile-apps-to-react/

reetp avatar Oct 30 '19 16:10 reetp

@lmopi I have the latest version of rocket Chat installed (both server and iOS app) and I do also use a domain with a dash within (chat.my-domain.de). Everything works as expected. Maybe your issue has a different origin?

DahlitzFlorian avatar Nov 12 '19 08:11 DahlitzFlorian

When I want to connect to my server I do "Connect to a server" then what format to use ?

  • chat.my-domain.com -> Invalid url
  • www.chat.my-domain.com -> No server found
  • https://www.chat.my-domain.com -> No server found
  • https://chat.my-domain.com -> Invalid url

lmopi avatar Nov 21 '19 13:11 lmopi

Have you guys tried Rocket.Chat Experimental? Does it work for you?

diegolmello avatar Nov 21 '19 13:11 diegolmello

Not yet, where can I find the documentation ?

lmopi avatar Nov 25 '19 09:11 lmopi

For info : i use a popup authentication with oauth

lmopi avatar Nov 25 '19 10:11 lmopi

Not yet, where can I find the documentation ?

https://github.com/RocketChat/Rocket.Chat.ReactNative

For info : i use a popup authentication with oauth

Not going to get fixed here - see my earlier link.

reetp avatar Nov 25 '19 12:11 reetp

When I want to connect to my server I do "Connect to a server" then what format to use ?

  • chat.my-domain.com -> Invalid url
  • www.chat.my-domain.com -> No server found
  • https://www.chat.my-domain.com -> No server found
  • https://chat.my-domain.com -> Invalid url

Had the same issue and noticed, that my HTTPS routing configuration was wrong. Again, I'm using a domain with a dash, too and it works perfectly well. Maybe you should have a look at your HTTPS side? Do you force Rocket.Chat to use HTTPS? Do you have a redirect to HTTPS?

DahlitzFlorian avatar Nov 25 '19 13:11 DahlitzFlorian

Works on rocket chat reactnative, don't understand why not on rocket chat IOS

lmopi avatar Dec 10 '19 08:12 lmopi