RStudio Connect : Invalid Redirect on Login (ERR_INVALID_REDIRECT)

I have set up RStudio Connect to run on port 444 on an AWS EC2 instance. When I hit my rstudio connect adress, https://myaddress.com:444 I get redirected to the RStudio Connect frontpage. Thats great!

I can also press the "sign up" bottom and get redirected without any problems. Here I can create my user as normal.

However when I try to press login, I get "ERR_INVALID_REDIRECT". It was not a problem when I was running on port 443 (standard https). Anyone know what the problem might be?

Welcome to RStudio community! I suspect the problem is your Server.Address value in your /etc/rstudio-connect/rstudio-connect.gcfg file :grinning_face_with_smiling_eyes: For example:

[Server]
Address = https://myaddress.com:444

There are certain parts of Connect that (for security and other reasons) depend on that value being the correct "front door" of your Connect server (where users go to interact with the root of the server).

For instance, we use that address to generate links in emails, etc.

1 Like

Thanks for your reply. I am already having

[Server]
Address = https://myaddress.com:444

on login it jumps to https://myaddress.com:444/__login__?url=https%3A%2F%2Fmyaddresscom%3A444%2Fconnect%2F

The only way to enter Connect is actually to create an account - and then start using it. But as soon as I have to login again, there is this problem

Aww sad. I was so hopeful I could solve the issue quickly!! :grinning_face_with_smiling_eyes:

Have you restarted RStudio Connect since you changed that value? (Never hurts to check! haha)

systemctl restart rstudio-connect

It also might be worth trying in an incognito / private browsing window, to see if there is some redirect cached somewhere?

1 Like

It never hurts to try with a quick fix :wink:

I have already tried restarting and using private browsing window... its the same issue. Everything works when I remove port "444" (so everything runs on https 443), but when I move to 444 the login screen is not working

Do you have email set up on your server? Is it possible to send a test email to yourself (In the Admin screen/ Mail settings) to test that link generation, generally, is working correctly?

It sounds like this may be something worth escalating to our support engineers by reaching out to support@rstudio.com, that way we can give this more careful attention / it doesn't get lost! If you're able to send a diagnostic bundle along with your email and a link to this discussion, that would be great!!

No I have not set up an email. I will try to escalate it.

It should be mentioned that I have RStudio Server running on the same instance - and everything works when i change RStudio Server to run on port 444 (and Connect on port 443). Its a workaround of course and I would like to solve this issue.

A solution for me was to run RStudio Server on port 444 (no problems here) and Rstudio connect on port 443.

I am still waiting for the support team to find out why I cant run Connect on port 444. I will let you know when we have found out

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.