tinode / ios

Tinodios: Tinode Messaging Client for iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash on login failure

or-else opened this issue · comments

commented

@aforge

The app crashes on try! in https://github.com/tinode/ios/blob/master/Tinodios/Supporting%20Files/AppDelegate.swift#L34
when loginToken call fails

2019-05-07 17:30:03.604089+0300 Tinodios[60196:14284458] [default] onMessage error: (
        (
                (
            "illegalStateError(\"Promise already resolved/rejected\")"
        )
    )
)
Fatal error: 'try!' expression unexpectedly raised an error: authentication failed (401): file /Users/gene/ventures/tinode/ios/Tinodios/Supporting Files/AppDelegate.swift, line 34
2019-05-07 17:30:03.616957+0300 Tinodios[60196:14284333] Fatal error: 'try!' expression unexpectedly raised an error: authentication failed (401): file /Users/gene/ventures/tinode/ios/Tinodios/Supporting Files/AppDelegate.swift, line 34

It should not crash, it should just go to the login screen.

Ah, yes. That exclamation mark is inappropriate there.

3dcc8e0
should address it.

Re

"illegalStateError("Promise already resolved/rejected")"

It's a known problem and has been sitting for some time on my plate. It shouldn't cause too much trouble though. I'll take care of it soon.