# SSO 500 Error: Failed to create or lookup user: no implicit conversion of Array into String

**URL:** <https://meta.discourse.org/t/sso-500-error-failed-to-create-or-lookup-user-no-implicit-conversion-of-array-into-string/51422>\
**Category:** Bug\
**Created:** [11 Ottobre 2016, 7:05pm UTC](https://meta.discourse.org/t/sso-500-error-failed-to-create-or-lookup-user-no-implicit-conversion-of-array-into-string/51422 "2016-10-11T19:05:50Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Michael\_Wransky](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Michael\_Wransky](https://meta.discourse.org/u/Michael_Wransky)\
**Post date:** [11 Ottobre 2016, 7:05pm UTC](https://meta.discourse.org/t/sso-500-error-failed-to-create-or-lookup-user-no-implicit-conversion-of-array-into-string/51422/1 "2016-10-11T19:05:50Z")

</div>

We have been experiencing a persistent but elusive bug for some of our forum users. The bug prevents users from accessing the forums and only gives them the lovely: “There is a problem with your account. Please contact the site’s administrator”. Needless to say, our users get very frustrated with this.

Here is a sample `env`:

```plaintext

hostname	tiefighter32-udacity
process_id	13943
application_version	3af5b19002d921e5d9c8c0ac2b0b2ec01f682703
HTTP_HOST	discussions.udacity.com
REQUEST_URI	/session/sso_login?sso=dXNlcm5hbWU9YW5hXzUzNDExNDYyNzUxNjkxNzYmbm9uY2U9NzYzY2EwNjZkMjQ4MjVhNzk0YTRl%0AM2M1YTkzZDFlYTEmZXh0ZXJuYWxfaWQ9NDM0MTAzNzUxNiZuYW1lPWFuYV81MzQxMTQ2Mjc1MTY5%0AMTc2JmVtYWlsPW1pbnR5c3RhdGUyMDEyJTQwZ21haWwuY29t%0A&sig=17665547f99255a7f3aae98de90eddf54eb4bf5b43da17d482bb441467efa6a6
REQUEST_METHOD	GET
HTTP_USER_AGENT	Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
HTTP_ACCEPT	text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_X_FORWARDED_FOR	23.28.142.9
HTTP_X_REAL_IP	23.28.142.9
params	
sso	dXNlcm5hbWU9YW5hXzUzNDExNDYyNzUxNjkxNzYmbm9uY2U9NzYzY2EwNjZkMjQ4MjVhNzk0YTRl M2M1YTkzZDFlYTEmZXh0ZXJu
sig	17665547f99255a7f3aae98de90eddf54eb4bf5b43da17d482bb441467efa6a6

```

Following the backtrace the issue appears to be here:

```plaintext
/usr/local/lib/ruby/2.3.0/logger.rb:507:in `error'
/var/www/discourse/app/controllers/session_controller.rb:148:in `rescue in sso_login'
/var/www/discourse/app/controllers/session_controller.rb:95:in `sso_login'

```

Looking at those files in the[discourse repos](https://github.com/discourse/discourse/blob/master/app/controllers/session_controller.rb#L95) doesn’t make it clear but I am wondering if the error is being thrown because a `to_s` or `to_url` is being called on an array and if a `.first` needs to be called to avoid the error.

Like I stated above this has been a persistent and annoying error for our users so a fix would be greatly appreciated!

---

_[View the full topic](https://meta.discourse.org/t/sso-500-error-failed-to-create-or-lookup-user-no-implicit-conversion-of-array-into-string/51422)._
