# Perspective App opens Safari on login--cannot get into app, though it runs fine in Safari

**URL:** <https://forum.inductiveautomation.com/t/perspective-app-opens-safari-on-login-cannot-get-into-app-though-it-runs-fine-in-safari/42935>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [February 3, 2021, 2:03am UTC](https://forum.inductiveautomation.com/t/perspective-app-opens-safari-on-login-cannot-get-into-app-though-it-runs-fine-in-safari/42935 "2021-02-03T02:03:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [February 3, 2021, 2:03am UTC](https://forum.inductiveautomation.com/t/perspective-app-opens-safari-on-login-cannot-get-into-app-though-it-runs-fine-in-safari/42935/1 "2021-02-03T02:03:02Z")

</div>

I’ve got an iPhone that we can’t seem to get to login to the native iOS Perspective app. It hands off to Safari and locks up.

- Ignition 8.1.1
- iOS 14.4
- Perspective app 0.97
- Ignition server is using http (not https) and is accessible on corporate network only (not exposed to internet)
- iPhone is connected to corporate network via VPN, and as detailed below, can run the Perspective apps in web browser without any issue,

In any or our Perspective apps, on this phone, when login is required, tapping continue to login opens the login page in Safari. Logging in there (in Safari) works and the app opens and runs fine _in Safari_. But the Perspective native iOS app remains locked up in the state it was in when we first tried to login from app. In apps that require login to open, the Perspective native iOS app ends up stuck with the bubbling login button like this:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/9/f9923a3734d42929226c369852679d95ada6200b.jpeg)  
In apps where we open without login, but later tap a button to login, the app remains locked up on the page where we tapped that button (though we’re redirected to Safari login page–and it goes right into app after tapping continue to login if session is still remembered by iOS from last login in Safari).

Any idea what’s going wrong here?

---

<div class="post-metadata">

**Author:** ![mrojas](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrojas/32/6394_2.png) [@mrojas](https://forum.inductiveautomation.com/u/mrojas)\
**Post date:** [February 3, 2021, 5:55pm UTC](https://forum.inductiveautomation.com/t/perspective-app-opens-safari-on-login-cannot-get-into-app-though-it-runs-fine-in-safari/42935/2 "2021-02-03T17:55:54Z")

</div>

We’ve had a couple users encounter this issue. We’re still trying to narrow down the problem. Is there any way you can send me the logs from Perspective App after attempting a login? You can retrieve the logs from Settings -\> View Logs.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [February 3, 2021, 6:13pm UTC](https://forum.inductiveautomation.com/t/perspective-app-opens-safari-on-login-cannot-get-into-app-though-it-runs-fine-in-safari/42935/3 "2021-02-03T18:13:59Z")

</div>

Sure; I’ll give it a shot now.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [February 3, 2021, 6:27pm UTC](https://forum.inductiveautomation.com/t/perspective-app-opens-safari-on-login-cannot-get-into-app-though-it-runs-fine-in-safari/42935/4 "2021-02-03T18:27:41Z")

</div>

I noticed one more thing that may or may not be relevant–when logging in for the first time (no remembered session) in Safari (after native app kicks us over to Safari), after entering password and tapping to button to complete login, it goes back to the login screen in Safari. At that point, tapping continue to login then goes into the app in Safari (without prompting for username and password again). Apparently login is successful, but maybe not as fast as was expected (VPN connection is over satellite internet).

Here’s logs.txt (server name, project name, and device ID redacted). I was able to swipe left to exit the app from the stuck login screen and then went directly to settings to retrieve the logs.

```auto
2021/02/03 18:14:40:488 View state: loading
2021/02/03 18:14:40:547 Request Started: GET http://serverNameRedacted:8088/system/gwinfo
Body Data: None
2021/02/03 18:14:40:547 Request Started: GET http://serverNameRedacted:8088/system/gwinfo
Body Data: None
2021/02/03 18:14:42:578 PerspectiveClient.load: http://serverNameRedacted:8088/data/perspective/client/ProjectName
2021/02/03 18:14:42:593 Response Received: [Request]: GET http://serverNameRedacted:8088/system/gwinfo
    [Headers]: None
    [Body]: None
[Response]:
    [Status Code]: 200
    [Headers]:
        Access-Control-Allow-Origin: *
        Content-Length: 340
        Date: Wed, 03 Feb 2021 18:14:42 GMT
        Referrer-Policy: strict-origin-when-cross-origin
        X-Content-Type-Options: nosniff
        X-Frame-Options: SAMEORIGIN
        X-XSS-Protection: 1; mode=block
    [Body]: 340 bytes
[Network Duration]: 2.084059000015259s
[Serialization Duration]: 0.00028070833286619745s
[Result]: success(340 bytes)
2021/02/03 18:14:44:328 Response Received: [Request]: GET http://serverNameRedacted:8088/system/gwinfo
    [Headers]: None
    [Body]: None
[Response]: None
[Network Duration]: 4.016852021217346s
[Serialization Duration]: 9.891666559269652e-05s
[Result]: failure(Alamofire.AFError.explicitlyCancelled)
2021/02/03 18:14:50:800 received raw: {"context":{},"config":{"challenge":"AAAAEE8aIb-34AOq6K-xswjK4N9Xr1k1CVGczKbAfCC2jYtbqIsypxgV3BWLBGjK6U3BGG1EWnh6naKATeH1oJcjM4s=","gatewayAddress":"http://serverNameRedacted:8088"},"type":"native/challenge"}
2021/02/03 18:14:50:800 clientAction: Ignition_Perspective.ChallengeAction
2021/02/03 18:14:55:077 received raw: {"type":"LifecycleEvent","payload":{"event":"initializing"}}
2021/02/03 18:14:55:078 clientAction: Ignition_Perspective.ClientLifecycleAction
2021/02/03 18:14:55:079 View state: client
2021/02/03 18:14:55:824 received raw: {"type":"LifecycleEvent","payload":{"event":"authenticating"}}
2021/02/03 18:14:55:824 clientAction: Ignition_Perspective.ClientLifecycleAction
2021/02/03 18:14:59:400 execute: typeof window.__webInterface.submitDeviceConnect === "function", on: []
2021/02/03 18:14:59:411 execute: window.__webInterface.submitDeviceConnect({"challenge":"T2dzV0F1dlFsU2h4S05QUUoyTFExSWtHWUdyNkpSd1A=","deviceId":"########-####-####-####-############","type":"ios","versionCode":72}), on: []
2021/02/03 18:15:05:828 received raw: {"type":"LifecycleEvent","payload":{"event":"authenticating"}}
2021/02/03 18:15:05:828 clientAction: Ignition_Perspective.ClientLifecycleAction
2021/02/03 18:15:15:863 received raw: {"type":"LifecycleEvent","payload":{"event":"authenticating"}}
2021/02/03 18:15:15:863 clientAction: Ignition_Perspective.ClientLifecycleAction
2021/02/03 18:15:25:793 received raw: {"type":"LifecycleEvent","payload":{"event":"authenticating"}}
2021/02/03 18:15:25:793 clientAction: Ignition_Perspective.ClientLifecycleAction
2021/02/03 18:15:35:933 received raw: {"type":"LifecycleEvent","payload":{"event":"authenticating"}}
2021/02/03 18:15:35:934 clientAction: Ignition_Perspective.ClientLifecycleAction
2021/02/03 18:15:45:859 received raw: {"type":"LifecycleEvent","payload":{"event":"authenticating"}}
2021/02/03 18:15:45:859 clientAction: Ignition_Perspective.ClientLifecycleAction
2021/02/03 18:18:21:809 received raw: {"type":"LifecycleEvent","payload":{"event":"authenticating"}}
2021/02/03 18:18:21:810 clientAction: Ignition_Perspective.ClientLifecycleAction
2021/02/03 18:18:28:698 deinit: Ignition_Perspective.PerspectiveClientCoordinator
2021/02/03 18:18:29:316 deinit: <Ignition_Perspective.PerspectiveClientViewController: 0x105025a00>
2021/02/03 18:18:29:317 deinit: Ignition_Perspective.PerspectiveClientViewModelImpl
2021/02/03 18:18:29:317 deinit: <Ignition_Perspective.PerspectiveClientImpl: 0x1041b3530>
2021/02/03 18:18:29:318 deinit: Ignition_Perspective.BluetoothImpl

```

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [February 4, 2021, 3:11pm UTC](https://forum.inductiveautomation.com/t/perspective-app-opens-safari-on-login-cannot-get-into-app-though-it-runs-fine-in-safari/42935/5 "2021-02-04T15:11:26Z")

</div>

I had this happen to me as well. Was told to update OS and browser. I did but haven’t been able to get a chance to check it again since 😕

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [February 4, 2021, 4:28pm UTC](https://forum.inductiveautomation.com/t/perspective-app-opens-safari-on-login-cannot-get-into-app-though-it-runs-fine-in-safari/42935/6 "2021-02-04T16:28:35Z")

</div>

Yes, that’s the first thing we tried. The phone was on some older version of iOS, but is now on the newest [available](https://support.apple.com/en-ca/HT201222) as of now (Jan. 26, 2021 version). Safari is part of iOS, so there’s nothing else to update. I didn’t note the version before updating, but Perspective native app behavior was the same before and after update.

It might be relevant to note this is an iPhone 6S–the oldest supported by current iOS version.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [February 5, 2021, 7:35pm UTC](https://forum.inductiveautomation.com/t/perspective-app-opens-safari-on-login-cannot-get-into-app-though-it-runs-fine-in-safari/42935/7 "2021-02-05T19:35:39Z")

</div>

This fix [in 8.1.3](http://forum.inductiveautomation.com/t/nightly-8-1-changelogs-2021/42410/19) looks like it may be related, though I'm not sure if it should be kicking over to Safari for login (which seems to happen immediately--before any timeout--right now):

> **1754: Increase timeout for native app challenge response**  
> Raised timeout to 15 seconds, which should support the majority of slow connections.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [February 11, 2021, 1:16am UTC](https://forum.inductiveautomation.com/t/perspective-app-opens-safari-on-login-cannot-get-into-app-though-it-runs-fine-in-safari/42935/8 "2021-02-11T01:16:05Z")

</div>

These two threads look like they may be related:

> [@\[BUG\] 8.1.0 Perspective mobile app login doesn't work](http://forum.inductiveautomation.com/t/bug-8-1-0-perspective-mobile-app-login-doesnt-work/42156):
>
> I put a button on a View which uses the Login action with default settings. When I launch the project in the Perspective app for mobile (android) and press the button, i’m swapped over to my browser app (chromium) to log in. I log in, and then the Perspective project launches within the browser. Swapping back manually to the Perspective app, I still see that i’m not logged in.

> [@\[BUG-13715,13982\] Perspective App](http://forum.inductiveautomation.com/t/bug-13715-13982-perspective-app/24648):
>
> In IOS and android when you click login using the default login page it re-directs to the browser.
