# Ziti-console breaks when tryin to login for first time

**URL:** <https://openziti.discourse.group/t/ziti-console-breaks-when-tryin-to-login-for-first-time/263>\
**Category:** Support\
**Created:** [February 9, 2022, 9:07pm UTC](https://openziti.discourse.group/t/ziti-console-breaks-when-tryin-to-login-for-first-time/263 "2022-02-09T21:07:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ecelis](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/ecelis/32/96_2.png) [@ecelis](https://openziti.discourse.group/u/ecelis)\
**Post date:** [February 9, 2022, 9:07pm UTC](https://openziti.discourse.group/t/ziti-console-breaks-when-tryin-to-login-for-first-time/263/1 "2022-02-09T21:07:19Z")

</div>

Hi! I just installed ziti in Oracle Cloud, the service seems to be running well, but when I run the ziti-console it stops when trying to login for the first time. In the step where asksfor user and password.

Error in the console follows.

```auto
Ziti Server running on port 1408
undefined:1
Client sent an HTTP request to an HTTPS server.
^

SyntaxError: Unexpected token C in JSON at position 0
    at JSON.parse (<anonymous>)
    at Request._callback (/home/opc/.ziti/quickstart/vize/ziti-console/server.js:199:20)
    at Request.self.callback (/home/opc/.ziti/quickstart/vize/ziti-console/node_modules/request/request.js:185:22)
    at Request.emit (events.js:400:28)
    at Request.<anonymous> (/home/opc/.ziti/quickstart/vize/ziti-console/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:400:28)
    at IncomingMessage.<anonymous> (/home/opc/.ziti/quickstart/vize/ziti-console/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:519:28)
    at IncomingMessage.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1334:12)

```

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [February 9, 2022, 10:04pm UTC](https://openziti.discourse.group/t/ziti-console-breaks-when-tryin-to-login-for-first-time/263/2 "2022-02-09T22:04:45Z")

</div>

That does happen when the port that is supplied is actually secure (https) but the login is sending to http. I’ve not seen this myself. I wonder - can you show me the url you configured in your zac?

Does it look like mine here? is it using http or https?  
 ![image](https://global.discourse-cdn.com/free1/uploads/netfoundry/original/1X/28cd2de41bde028467ad5d635a85f5eb564c0598.png)

---

<div class="post-metadata">

**Author:** ![ecelis](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/ecelis/32/96_2.png) [@ecelis](https://openziti.discourse.group/u/ecelis)\
**Post date:** [February 9, 2022, 10:24pm UTC](https://openziti.discourse.group/t/ziti-console-breaks-when-tryin-to-login-for-first-time/263/3 "2022-02-09T22:24:01Z")

</div>

Duh! That was it! However I think the backend shouldn’t simply die. I guess I am not the only one making that mistake.

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [February 9, 2022, 10:45pm UTC](https://openziti.discourse.group/t/ziti-console-breaks-when-tryin-to-login-for-first-time/263/4 "2022-02-09T22:45:15Z")

</div>

I may have made the exact same mistake before… 🙂 i’ll file an issue against ziti-console!

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [February 9, 2022, 10:47pm UTC](https://openziti.discourse.group/t/ziti-console-breaks-when-tryin-to-login-for-first-time/263/5 "2022-02-09T22:47:18Z")

</div>

issue filed:

> <https://github.com/openziti/ziti-console/issues/17>
>
> see discourse at https://openziti.discourse.group/t/ziti-console-breaks-when-try…in-to-login-for-first-time/263
> 
> right now node is crashing when you supply http to an https endpoint. It shouldn't crash :) It should even maybe tell you "you probably screwed it up" somehow? :)

---

<div class="post-metadata">

**Author:** ![ecelis](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/ecelis/32/96_2.png) [@ecelis](https://openziti.discourse.group/u/ecelis)\
**Post date:** [February 9, 2022, 11:00pm UTC](https://openziti.discourse.group/t/ziti-console-breaks-when-tryin-to-login-for-first-time/263/6 "2022-02-09T23:00:58Z")

</div>

Cool! You beat me at it. I added a comment on the issue, since I may be able to fix this.

---

<div class="post-metadata">

**Author:** ![jeremy.tellier](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/jeremy.tellier/32/17_2.png) [@jeremy.tellier](https://openziti.discourse.group/u/jeremy.tellier)\
**Post date:** [February 10, 2022, 2:44pm UTC](https://openziti.discourse.group/t/ziti-console-breaks-when-tryin-to-login-for-first-time/263/7 "2022-02-10T14:44:25Z")

</div>

Pull the latest, I added a validation to make sure the user enters a valid edge controller URL and handle the issue if an invalid one was already added in the past. Thanks!
