Rails error when using DiscourseConnect and Wordpress

Hey Angus, I am having the same error as OP and I have attached my logs. Can you please have a look?

Welcome @Shubh_Bhalla :slight_smile:

I’ve moved your post to a new topic as it’s not clear to me if there’s any connection with the topic you posted in.

Could you just confirm a few things for me:

  1. Your issue presents as a redirect loop when attempting to use DiscourseConnect with Discourse and Wordpress via the WP Discourse plugin. Is that right? If it is, is WP Discourse the DiscourseConnect provider?
  2. The log you’ve posted seems to be a backtrace from an exception in Discourse. Could you share the exception itself, i.e. not just the backtrace.
  3. Assuming 1 is true, what logs do have in WP Discourse? Please see WP Discourse logs on how to access them.
1 Like

Hey @angus . So, my discourse is hosted on an EC2 instance by following through this tutorial. What happens is when I try to access discourse.mydomain, i get redirect to discourse.mydomain/session/sso and then redirect to https://mydomain/#/discourse/sso?sso=bm9uY2U9MTZlNjVmxNGY2M....mcmV0dXJuX3Nzb191cmw9aHR0cHMlM0ElMkYlMkZkaXNjb3Vyc2UuYmlvLWNvbnZlcnNpb24ub3JnJTJGc2Vzc2lvbiUyRnNzb19sb2dpbg%3D%3D&sig=285c1ccdd0a9e18888....c5d32291880c759b which leads to mydomain
The error that it is giving me is -

Also it is super weird that this only happens when i clear cookies from discourse.mydomain . But this problem fixes itself when i try to login through https://discourse.mydomain/u/admin-login but comes again if we clear cookies for discourse

Your issue is most likely a misconfiguration of DiscourseConnect. Please start from the beginning again and make sure you follow this guide closely. The details you’ve given a bit vague to give you more specific advice than that at this stage.

If you’re still having issues after following that guide closely please ask a question in that topic.

This is happening because by clearing your cookies you are effectively logging yourself out.