Skip to content

Instantly share code, notes, and snippets.

@AlexNodex
Created July 11, 2016 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexNodex/d073477a0c8ffd197aa26ed969f970c4 to your computer and use it in GitHub Desktop.
Save AlexNodex/d073477a0c8ffd197aa26ed969f970c4 to your computer and use it in GitHub Desktop.
I have found a very very strange bug in Safari and Chrome on iPad, iPhone and Simulator (Xcode)
On certain photo's (in my case it was photo's from an older iOS pre-update) the uploader will not let me choose a file. By this I mean that it will open the "choose files from "Take photo" and "Photo Library" but as soon as I choose (certain) photo's it fails.
This is where it gets strange. On the same devices it will allow me quite easily to upload other photos that are in the same "Photo library" - the difference being that they're newer images and not pre iOS update.
I have reproduced this on the Xcode simulator and it raises some interesting logs.
`Marker - 11 Jul 2016, 12:32:52
Jul 11 12:33:03 Alexs-MacBook-Pro MobileSafari[1313]: the behavior of the UICollectionViewFlowLayout is not defined because:
Jul 11 12:33:03 Alexs-MacBook-Pro MobileSafari[1313]: the item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right values.
Jul 11 12:33:03 Alexs-MacBook-Pro MobileSafari[1313]: The relevant UICollectionViewFlowLayout instance is <_UIAlertControllerCollectionViewFlowLayout: 0x7fcc4ecf27a0>, and it is attached to <UICollectionView: 0x7fcc4d921600; frame = (0 44; 10 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x7fcc4ec6fdb0>; animations = { bounds.origin=<CASpringAnimation: 0x7fcc4ecc1fb0>; bounds.size=<CASpringAnimation: 0x7fcc4ecc6f80>; position=<CASpringAnimation: 0x7fcc4ecc7100>; }; layer = <CALayer: 0x7fcc4ecd70d0>; contentOffset: {0, 0}; contentSize: {0, 0}> collection view layout: <_UIAlertControllerCollectionViewFlowLayout: 0x7fcc4ecf27a0>.
Jul 11 12:33:03 Alexs-MacBook-Pro MobileSafari[1313]: Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
Jul 11 12:33:03 Alexs-MacBook-Pro com.apple.UIKit.fileprovider.default[1319]: Failed to inherit CoreMedia permissions from 1313: (null)
Jul 11 12:33:03 Alexs-MacBook-Pro assertiond[1267]: assertion failed: 15F34 13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Jul 11 12:33:03 --- last message repeated 1 time ---
Jul 11 12:33:03 Alexs-MacBook-Pro com.apple.UIKit.fileprovider.default[1319]: 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.
(
"<NSLayoutConstraint:0x7fac1aca4560 H:[UITableViewLabel:0x7fac1acd0790'Photo Library']-(15)-[UIImageView:0x7fac1accb940]>",
"<NSLayoutConstraint:0x7fac1acd7310 H:[UIImageView:0x7fac1accb940(32)]>",
"<NSLayoutConstraint:0x7fac1acac480 H:[UIImageView:0x7fac1accb940]-(15)-| (Names: '|':UITableViewCellContentView:0x7fac1acb3100 )>",
"<NSLayoutConstraint:0x7fac1accc6b0 H:|-(15)-[UITableViewLabel:0x7fac1acd0790'Photo Library'] (Names: '|':UITableViewCellContentView:0x7fac1acb3100 )>",
"<NSLayoutConstraint:0x7fac1d400450 'fittingSizeHTarget' H:[UITableViewCellContentView:0x7fac1acb3100(10)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fac1acd7310 H:[UIImageView:0x7fac1accb940(32)]>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Jul 11 12:33:03 Alexs-MacBook-Pro com.apple.UIKit.fileprovider.default[1319]: 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.
(
"<NSLayoutConstraint:0x7fac1aca4560 H:[UITableViewLabel:0x7fac1acd0790'Photo Library']-(15)-[UIImageView:0x7fac1accb940]>",
"<NSLayoutConstraint:0x7fac1acac480 H:[UIImageView:0x7fac1accb940]-(15)-| (Names: '|':UITableViewCellContentView:0x7fac1acb3100 )>",
"<NSLayoutConstraint:0x7fac1accc6b0 H:|-(15)-[UITableViewLabel:0x7fac1acd0790'Photo Library'] (Names: '|':UITableViewCellContentView:0x7fac1acb3100 )>",
"<NSLayoutConstraint:0x7fac1d400450 'fittingSizeHTarget' H:[UITableViewCellContentView:0x7fac1acb3100(10)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fac1aca4560 H:[UITableViewLabel:0x7fac1acd0790'Photo Library']-(15)-[UIImageView:0x7fac1accb940]>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Jul 11 12:33:03 Alexs-MacBook-Pro com.apple.UIKit.fileprovider.default[1319]: 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.
(
"<NSLayoutConstraint:0x7fac1acc96b0 H:[UITableViewLabel:0x7fac1acc8d40'iCloud']-(15)-[UIImageView:0x7fac1acb9020]>",
"<NSLayoutConstraint:0x7fac1acb1ce0 H:[UIImageView:0x7fac1acb9020(32)]>",
"<NSLayoutConstraint:0x7fac1acb1d80 H:[UIImageView:0x7fac1acb9020]-(15)-| (Names: '|':UITableViewCellContentView:0x7fac1acc8800 )>",
"<NSLayoutConstraint:0x7fac1acd77e0 H:|-(15)-[UITableViewLabel:0x7fac1acc8d40'iCloud'] (Names: '|':UITableViewCellContentView:0x7fac1acc8800 )>",
"<NSLayoutConstraint:0x7fac1ad79c10 'fittingSizeHTarget' H:[UITableViewCellContentView:0x7fac1acc8800(10)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fac1acb1ce0 H:[UIImageView:0x7fac1acb9020(32)]>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Jul 11 12:33:03 Alexs-MacBook-Pro com.apple.UIKit.fileprovider.default[1319]: 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.
(
"<NSLayoutConstraint:0x7fac1acc96b0 H:[UITableViewLabel:0x7fac1acc8d40'iCloud']-(15)-[UIImageView:0x7fac1acb9020]>",
"<NSLayoutConstraint:0x7fac1acb1d80 H:[UIImageView:0x7fac1acb9020]-(15)-| (Names: '|':UITableViewCellContentView:0x7fac1acc8800 )>",
"<NSLayoutConstraint:0x7fac1acd77e0 H:|-(15)-[UITableViewLabel:0x7fac1acc8d40'iCloud'] (Names: '|':UITableViewCellContentView:0x7fac1acc8800 )>",
"<NSLayoutConstraint:0x7fac1ad79c10 'fittingSizeHTarget' H:[UITableViewCellContentView:0x7fac1acc8800(10)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fac1acc96b0 H:[UITableViewLabel:0x7fac1acc8d40'iCloud']-(15)-[UIImageView:0x7fac1acb9020]>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Jul 11 12:33:03 Alexs-MacBook-Pro assertiond[1267]: assertion failed: 15F34 13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
`
What's the most interesting is the following line
`Jul 11 12:33:03 Alexs-MacBook-Pro com.apple.UIKit.fileprovider.default[1319]: Failed to inherit CoreMedia permissions from 1313: (null)`
Which talks about permissions. I am perpelxed at what would cause this and how to go about fixing it. I have tried showing (removing the opacity of the button) and other fixes but nothing works.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment