badoo / badoo/Chatto

NSLayoutConstraint error when using expandable input and switching input

Open
#577 0 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
Swift
Stars
4.6k
Forks
588
PR merge metrics
No merged PRs in 30d

Description

Reproducible with the demo app, using the "Chat with expandable input" example.

**Steps to reproduce:**
1. Press the keyboard chat input icon.
2. Press the camera chat input icon.

The console will show the following error:
```
2019-05-22 10:55:34.230615-0400 ChattoApp[3658:2922342] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<_UILayoutSupportConstraint:0x2814a9f90 _UILayoutSpacer:0x2808e9e00'UIVC-topLayoutGuide'.height == 64 (active)>",
"<_UILayoutSupportConstraint:0x2814a9810 V:|-(0)-[_UILayoutSpacer:0x2808e9e00'UIVC-topLayoutGuide'] (active, names: '|':Chatto.BaseChatViewControllerView:0x101c64670 )>",
"",
"",
"",
"",
"",
"",
"=0)-[UIView:0x101ca67e0] (active)>",
""
)

Will attempt to recover by breaking constraint

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in may also be helpful.
2019-05-22 10:55:34.243398-0400 ChattoApp[3658:2922342] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<_UILayoutSupportConstraint:0x2814a9f90 _UILayoutSpacer:0x2808e9e00'UIVC-topLayoutGuide'.height == 64 (active)>",
"<_UILayoutSupportConstraint:0x2814a9810 V:|-(0)-[_UILayoutSpacer:0x2808e9e00'UIVC-topLayoutGuide'] (active, names: '|':Chatto.BaseChatViewControllerView:0x101c64670 )>",
"=0)-[UIView:0x101ca67e0] (active)>",
"",
""
)

Will attempt to recover by breaking constraint
=0)-[UIView:0x101ca67e0] (active)>
```

Contributor guide

Open the contributing guide

Research direction

Run the demo app and open the “Chat with expandable input” example. Reproduce the issue by pressing the keyboard chat input icon and then the camera chat input icon, then inspect the reported NSLayoutConstraint warnings. Done means switching inputs no longer produces unsatisfiable-constraint errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.