mozilla / uniffi-rs

a multi-language bindings generator for rust
https://mozilla.github.io/uniffi-rs/
Mozilla Public License 2.0
2.77k stars 230 forks source link

Uniffi logins component: Update iOS repo #695

Closed data-sync-user closed 3 years ago

data-sync-user commented 3 years ago

Get PR up for iOS to be inline with the API changes so that we can pushed the changes all together rather than any one side lagging in picking up the latest

data-sync-user commented 3 years ago

➤ Janet Dragojevic commented:

[~skhamis@mozilla.com] 2 things with the lastest from your branch:

When I was checking logins in the emulator - I got a crash when I would search in the logins views and then go back to the main view.  I was not able to reproduce in the emulator on the main branch of firefox iOS.  Expected behavior is that when I go back from searching the list of passwords is displayed in the view.{quote}2021-06-11 09:27:58.619 [Debug] [TabManagerStore.swift:95] preserveTabs(_:selectedTab:) > PreserveTabs write ok: true, bytes: 1175 2021-06-11 09:27:58.660043-0400 Client[94688:25922981] WF: === Starting WebFilter logging for process Client 2021-06-11 09:27:58.660393-0400 Client[94688:25922981] WF: _WebFilterIsActive returning: NO 2021-06-11 09:27:58.836046-0400 Client[94688:25922981] [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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) ( "<NSAutoresizingMaskLayoutConstraint:0x6000016b1ea0 h=-&- v=-&- _UIVisualEffectContentView:0x7fe434b27f70.minX == 0 (active, names: '|':UIVisualEffectView:0x7fe432c46360 )>", "<NSAutoresizingMaskLayoutConstraint:0x6000016b1ef0 h=-&- v=-&- H:[_UIVisualEffectContentView:0x7fe434b27f70]-(0)-| (active, names: '|':UIVisualEffectView:0x7fe432c46360 )>", "<NSAutoresizingMaskLayoutConstraint:0x6000016b2120 h=--& v=--& UIView:0x7fe432e342c0.width == 0 (active)>", "<SnapKit.LayoutConstraint:0x6000011c7a80@GridTabViewController.swift#719 UIVisualEffectView:0x7fe432c46360.left == UIView:0x7fe432e342c0.left>", "<SnapKit.LayoutConstraint:0x6000011c7c00@GridTabViewController.swift#719 UIVisualEffectView:0x7fe432c46360.right == UIView:0x7fe432e342c0.right>", "<SnapKit.LayoutConstraint:0x6000011bbcc0@GridTabViewController.swift#724 UIImageView:0x7fe432e34c70.leading == _UIVisualEffectContentView:0x7fe434b27f70.leading + 6.0>", "<SnapKit.LayoutConstraint:0x6000011bbf00@GridTabViewController.swift#736 UIButton:0x7fe432e3f420.width == 32.0>", "<SnapKit.LayoutConstraint:0x6000011ba040@GridTabViewController.swift#726 UIImageView:0x7fe432e34c70.width == 20.0>", "<SnapKit.LayoutConstraint:0x6000011ba0a0@GridTabViewController.swift#731 UILabel:0x7fe432e31f30.trailing == UIButton:0x7fe432e3f420.leading - 6.0>", "<SnapKit.LayoutConstraint:0x6000011bbde0@GridTabViewController.swift#730 UILabel:0x7fe432e31f30.leading == UIImageView:0x7fe432e34c70.trailing + 6.0>", "<SnapKit.LayoutConstraint:0x6000011ca880@GridTabViewController.swift#737 UIButton:0x7fe432e3f420.trailing == _UIVisualEffectContentView:0x7fe434b27f70.trailing>" )

Will attempt to recover by breaking constraint <SnapKit.LayoutConstraint:0x6000011bbf00@GridTabViewController.swift#736 UIButton:0x7fe432e3f420.width == 32.0>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful. 2021-06-11 09:27:58.837028-0400 Client[94688:25922981] [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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) ( "<NSAutoresizingMaskLayoutConstraint:0x6000016b1ea0 h=-&- v=-&- _UIVisualEffectContentView:0x7fe434b27f70.minX == 0 (active, names: '|':UIVisualEffectView:0x7fe432c46360 )>", "<NSAutoresizingMaskLayoutConstraint:0x6000016b1ef0 h=-&- v=-&- H:[_UIVisualEffectContentView:0x7fe434b27f70]-(0)-| (active, names: '|':UIVisualEffectView:0x7fe432c46360 )>", "<NSAutoresizingMaskLayoutConstraint:0x6000016b2120 h=--& v=--& UIView:0x7fe432e342c0.width == 0 (active)>", "<SnapKit.LayoutConstraint:0x6000011c7a80@GridTabViewController.swift#719 UIVisualEffectView:0x7fe432c46360.left == UIView:0x7fe432e342c0.left>", "<SnapKit.LayoutConstraint:0x6000011c7c00@GridTabViewController.swift#719 UIVisualEffectView:0x7fe432c46360.right == UIView:0x7fe432e342c0.right>", "<SnapKit.LayoutConstraint:0x6000011bbcc0@GridTabViewController.swift#724 UIImageView:0x7fe432e34c70.leading == _UIVisualEffectContentView:0x7fe434b27f70.leading + 6.0>", "<SnapKit.LayoutConstraint:0x6000011ba040@GridTabViewController.swift#726 UIImageView:0x7fe432e34c70.width == 20.0>", "<SnapKit.LayoutConstraint:0x6000011ba0a0@GridTabViewController.swift#731 UILabel:0x7fe432e31f30.trailing == UIButton:0x7fe432e3f420.leading - 6.0>", "<SnapKit.LayoutConstraint:0x6000011bbde0@GridTabViewController.swift#730 UILabel:0x7fe432e31f30.leading == UIImageView:0x7fe432e34c70.trailing + 6.0>", "<SnapKit.LayoutConstraint:0x6000011ca880@GridTabViewController.swift#737 UIButton:0x7fe432e3f420.trailing == _UIVisualEffectContentView:0x7fe434b27f70.trailing>" ) {quote}

The Bitrise run showed a test failure https://app.bitrise.io/build/db762e591ba1d86d#?tab=log ( https://app.bitrise.io/build/db762e591ba1d86d#?tab=log ):Last lines of the build log: {{ StorageTests:}} {{ Client (9030) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Crash: Client (9030) static RustLogins.setupPlaintextHeaderAndGetSalt(databasePath:encryptionKey:): Namespace SIGNAL, Code 0x4. MozillaAppServices/LoginsStorage.swift:84: Fatal error: 'try!' expression unexpectedly raised an error: MozillaAppServices.LoginsStorageError.InvalidKey(message: "InvalidKey error: SqlError")}}

CoreSimulator 757.5 - Device: iPhone 8 (3B8931C1-5722-470B-BC54-4E49D9CAB67E) - Runtime: iOS 14.5 (18E182) - DeviceType: iPhone 8. If you believe this error represents a bug, please attach the result bundle at /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/XCUITestOutput939396450/Test.xcresult)) {{ ClientTests:}} {{ Client (9033) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Crash: Client (9033) static RustLogins.setupPlaintextHeaderAndGetSalt(databasePath:encryptionKey:): Namespace SIGNAL, Code 0x4. MozillaAppServices/LoginsStorage.swift:84: Fatal error: 'try!' expression unexpectedly raised an error: MozillaAppServices.LoginsStorageError.InvalidKey(message: "InvalidKey error: SqlError")}}

CoreSimulator 757.5 - Device: iPhone 8 (3B8931C1-5722-470B-BC54-4E49D9CAB67E) - Runtime: iOS 14.5 (18E182) - DeviceType: iPhone 8. If you believe this error represents a bug, please attach the result bundle at /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/XCUITestOutput939396450/Test.xcresult)) {{ SharedTests:}} {{ Client (9035) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Crash: Client (9035) static RustLogins.setupPlaintextHeaderAndGetSalt(databasePath:encryptionKey:): Namespace SIGNAL, Code 0x4. MozillaAppServices/LoginsStorage.swift:84: Fatal error: 'try!' expression unexpectedly raised an error: MozillaAppServices.LoginsStorageError.InvalidKey(message: "InvalidKey error: SqlError")}}

CoreSimulator 757.5 - Device: iPhone 8 (3B8931C1-5722-470B-BC54-4E49D9CAB67E) - Runtime: iOS 14.5 (18E182) - DeviceType: iPhone 8. If you believe this error represents a bug, please attach the result bundle at /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/XCUITestOutput939396450/Test.xcresult)) {{ SyncTests:}} {{ Client (9039) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Crash: Client (9039) static RustLogins.setupPlaintextHeaderAndGetSalt(databasePath:encryptionKey:): Namespace SIGNAL, Code 0x4. MozillaAppServices/LoginsStorage.swift:84: Fatal error: 'try!' expression unexpectedly raised an error: MozillaAppServices.LoginsStorageError.InvalidKey(message: "InvalidKey error: SqlError")}}

CoreSimulator 757.5 - Device: iPhone 8 (3B8931C1-5722-470B-BC54-4E49D9CAB67E) - Runtime: iOS 14.5 (18E182) - DeviceType: iPhone 8. If you believe this error represents a bug, please attach the result bundle at /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/XCUITestOutput939396450/Test.xcresult)) TEST FAILED 2021-06-11 14:41:07.973 xcodebuild[8498:119947] [MT] IDEResultKit: Warning: While writing a result bundle to /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/XCUITestOutput939396450/Test.xcresult, not all contents have been imported, as the Staging directory still contains the following files/directories: ["2_Test"] If you can't find the reason of the error in the log, please check the raw-xcodebuild-output.log.