# Unknown Error when logging in on iOS app

**URL:** https://meta.discourse.org/t/unknown-error-when-logging-in-on-ios-app/89042
**Category:** Support
**Created:** [June 3, 2018, 12:38pm UTC](https://meta.discourse.org/t/unknown-error-when-logging-in-on-ios-app/89042 "2018-06-03T12:38:15Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![chrismalone](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrismalone/32/506946_2.png) [@chrismalone](https://meta.discourse.org/u/chrismalone)
#### Post date: [June 3, 2018, 12:38pm UTC](https://meta.discourse.org/t/unknown-error-when-logging-in-on-ios-app/89042/1 "2018-06-03T12:38:15Z")

</div>

I’m trying to login to a discourse instance on the ios app and get an unknown error. The app seems to be working because I can log into the Meta forum. Any ideas?

---

<div class="post-metadata">

### Author: ![chrismalone](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrismalone/32/506946_2.png) [@chrismalone](https://meta.discourse.org/u/chrismalone)
#### Post date: [June 3, 2018, 12:47pm UTC](https://meta.discourse.org/t/unknown-error-when-logging-in-on-ios-app/89042/2 "2018-06-03T12:47:13Z")

</div>

I added it again to the app. This time I included https in the link. Then it allowed me to log in. Odd. The app opened the site and the login page without the https but would not actually login.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [June 4, 2018, 4:47am UTC](https://meta.discourse.org/t/unknown-error-when-logging-in-on-ios-app/89042/3 "2018-06-04T04:47:46Z")

</div>

I though we had a fix for this @j.jaffeux? Maybe the app should be https only to reduce the chance of this error?

---

<div class="post-metadata">

### Author: ![chrismalone](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrismalone/32/506946_2.png) [@chrismalone](https://meta.discourse.org/u/chrismalone)
#### Post date: [June 4, 2018, 5:06am UTC](https://meta.discourse.org/t/unknown-error-when-logging-in-on-ios-app/89042/4 "2018-06-04T05:06:22Z")

</div>

I should say that I’m on iOS 11.4 and an up to date version of the native app.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [June 4, 2018, 9:51am UTC](https://meta.discourse.org/t/unknown-error-when-logging-in-on-ios-app/89042/5 "2018-06-04T09:51:10Z")

</div>

In fact we are already doing this (clarification: we are using the url returned by the forum site.json so if https we should always be correctly using https even if entered via http), I just found and fix an issue at least concerning [iOS keeps logging users out when HTTPS site added via HTTP link - #14 by j.jaffeux](https://meta.discourse.org/t/ios-keeps-logging-users-out-when-https-site-added-via-http-link/86140/14) not sure yet about the OP error. I will make sure it works and make a release and see if it fixes this error too.

@chrismalone can you give me your forum URL? in private if necessary. And also the exact string you are entering when you see the error please.

---

<div class="post-metadata">

### Author: ![chrismalone](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrismalone/32/506946_2.png) [@chrismalone](https://meta.discourse.org/u/chrismalone)
#### Post date: [June 4, 2018, 10:00am UTC](https://meta.discourse.org/t/unknown-error-when-logging-in-on-ios-app/89042/6 "2018-06-04T10:00:41Z")

</div>

Yes. It was the raw domain I tried many times. [missionmeetup.com](http://missionmeetup.com)

It works as expected if I add https

---

<div class="post-metadata">

### Author: ![chrismalone](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrismalone/32/506946_2.png) [@chrismalone](https://meta.discourse.org/u/chrismalone)
#### Post date: [June 4, 2018, 10:01am UTC](https://meta.discourse.org/t/unknown-error-when-logging-in-on-ios-app/89042/7 "2018-06-04T10:01:27Z")

</div>

It sounds like I need to add https to my config. Is that correct?

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [June 4, 2018, 10:12am UTC](https://meta.discourse.org/t/unknown-error-when-logging-in-on-ios-app/89042/8 "2018-06-04T10:12:13Z")

</div>

Yes I think something is wrong in your config. Maybe something with couldflare?

basically we are doing a call to `HEAD whatyouenter/user-api-key/new` and in the resulting json there’s a url which should be the definitive URL of your forum and with https if correctly configured, for you this URL is returning with http and not https. I could force it to https here for everyone, but I think what we are doing of just using the result of this call is the good solution.

---

<div class="post-metadata">

### Author: ![chrismalone](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrismalone/32/506946_2.png) [@chrismalone](https://meta.discourse.org/u/chrismalone)
#### Post date: [June 4, 2018, 1:31pm UTC](https://meta.discourse.org/t/unknown-error-when-logging-in-on-ios-app/89042/9 "2018-06-04T13:31:34Z")

</div>

I’ll give a look and see if I can figure it out. I can force https on cloudflare, of course. But I’ll look in my app file to see if I can do it there. I’ll report back.

---

<div class="post-metadata">

### Author: ![chrismalone](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrismalone/32/506946_2.png) [@chrismalone](https://meta.discourse.org/u/chrismalone)
#### Post date: [June 5, 2018, 10:24am UTC](https://meta.discourse.org/t/unknown-error-when-logging-in-on-ios-app/89042/11 "2018-06-05T10:24:04Z")

</div>

Thanks for the suggestion. I did try it. It didn’t work, though.

---

<div class="post-metadata">

### Author: ![chrismalone](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrismalone/32/506946_2.png) [@chrismalone](https://meta.discourse.org/u/chrismalone)
#### Post date: [June 5, 2018, 10:26am UTC](https://meta.discourse.org/t/unknown-error-when-logging-in-on-ios-app/89042/12 "2018-06-05T10:26:38Z")

</div>

Here’s what I did:  
I went into the Cloudflare settings and forced https. That may be a workaround, but it fixed it. Thanks for all the suggestions.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [June 5, 2018, 11:24am UTC](https://meta.discourse.org/t/unknown-error-when-logging-in-on-ios-app/89042/13 "2018-06-05T11:24:00Z")

</div>


