I have an adding server issue.
I downloaded application from Android Store and I cannot add an url to my own rocket chat server, which is perfectly working with regular - cordova application. I receive an error "is not a valid rocket chat instance". The only server that is correct is https://open.rocket.chat.
Maybe there is something that as an user I can do? Or maybe it is an issue in this app.
Regards.
hey @gkrauze, which version of rocketchat are you using? can you send me the url to? I found a problem on regexp but I`m not sure if its your problem.
I have the same issue.
The server is running 0.62.2.
Rocket.Chat and Rocket.Chat+ connect to it without any problems.
But using the ReactNative app I get is not a valid Rocket.Chat instance
Same here: Server 0.63.3
Got the same problem but was able to track it down: The testServer function in https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/develop/app/lib/rocketchat.js#L86 checks for x-instance-id header which isn't available in response.headers. Instead there is a X-Instance-ID header.
I replaced it for testing with X-Instance-ID and I was able to connect to our server. Not sure though if this is a problem with my development setup or our chat server setup.
Tested it against v0.63.1, our operators are going to update the server to 0.66.2 tonight
@seasick Weird. Let's add Aaron to discussion.
@geekgonecrazy What do you think about these x-instance-id and X-Instance-ID string cases? Should I add another text case test, it's his server configuration or it's a RC bug?
Thanks.
tested against 0.66.2 without loadbalancer or proxy - header still is X-Instance-ID
@seasick Can you test on x-instance-id-case branch?
@diegolmello, works like expected - i.e. the server is now validating correctly
@diegolmello sorry about the delay. Feel free to DM me for quicker response :grin:
Some reverse proxies actually force all to lower case. But the code base actually uses the upper case version.
So like you concluded both are valid
@geekgonecrazy No problem. It's working now. Thanks 馃憡
Since this issue is fairly recent, I want to add that connection to a server running under a path, e.g. https://example.org/chat, is not possible. It seems this is only due to the Regex.
When issuing the HEAD request to my chat url, it returns the X-Instance-ID correctly, though the app says that it is not a valid Rocket.Chat instance.
Maybe just remove $ from the regex?
Hello.
Ran into the same problem. Just tried with rocketchat 0.68.0-rc0. Header is still upper case. Workaround for my nginx setup:
add_header x-instance-id $upstream_http_x_instance_id;
@himpierre I believe no changes were made at RocketChat itself, only how the ReactNative client is handling the x-instance-id header.