Skip to content

Commit cd65d9e

Browse files
committed
fix: resolve SSH tunnel relay deadlock and provisioning conflicts
- Make SSH relay queue concurrent to prevent forwarding loop from blocking data relay - Clear PROVISIONING_PROFILE_SPECIFIER from pbxproj for local automatic signing - Pass provisioning profile as CLI override in build-release.sh for CI - Include libssh2 error detail in public key auth failure messages
1 parent fe19e77 commit cd65d9e

6 files changed

Lines changed: 17 additions & 7 deletions

File tree

TablePro.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,7 @@
17041704
);
17051705
PRODUCT_BUNDLE_IDENTIFIER = com.TablePro;
17061706
PRODUCT_NAME = "$(TARGET_NAME)";
1707-
PROVISIONING_PROFILE_SPECIFIER = "TablePro Developer ID";
1707+
PROVISIONING_PROFILE_SPECIFIER = "";
17081708
REGISTER_APP_GROUPS = YES;
17091709
RUNTIME_EXCEPTION_ALLOW_DYLD_ENVIRONMENT_VARIABLES = NO;
17101710
RUNTIME_EXCEPTION_ALLOW_JIT = NO;
@@ -1735,7 +1735,7 @@
17351735
AUTOMATION_APPLE_EVENTS = NO;
17361736
CODE_SIGN_ENTITLEMENTS = TablePro/TablePro.entitlements;
17371737
CODE_SIGN_IDENTITY = "Apple Development";
1738-
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
1738+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
17391739
CODE_SIGN_STYLE = Automatic;
17401740
COPY_PHASE_STRIP = YES;
17411741
CURRENT_PROJECT_VERSION = 34;
@@ -1777,7 +1777,7 @@
17771777
);
17781778
PRODUCT_BUNDLE_IDENTIFIER = com.TablePro;
17791779
PRODUCT_NAME = "$(TARGET_NAME)";
1780-
PROVISIONING_PROFILE_SPECIFIER = "TablePro Developer ID";
1780+
PROVISIONING_PROFILE_SPECIFIER = "";
17811781
REGISTER_APP_GROUPS = YES;
17821782
RUNTIME_EXCEPTION_ALLOW_DYLD_ENVIRONMENT_VARIABLES = NO;
17831783
RUNTIME_EXCEPTION_ALLOW_JIT = NO;

TablePro.xcodeproj/xcshareddata/xcschemes/TablePro.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
33
LastUpgradeVersion = "2640"
4-
version = "1.7">
4+
version = "1.8">
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES"

TablePro/Core/SSH/Auth/PublicKeyAuthenticator.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ internal struct PublicKeyAuthenticator: SSHAuthenticator {
5050
}
5151

5252
guard rc == 0 else {
53-
throw SSHTunnelError.authenticationFailed
53+
var msgPtr: UnsafeMutablePointer<CChar>?
54+
var msgLen: Int32 = 0
55+
libssh2_session_last_error(session, &msgPtr, &msgLen, 0)
56+
let detail = msgPtr.map { String(cString: $0) } ?? "Unknown error"
57+
throw SSHTunnelError.tunnelCreationFailed(
58+
"Public key authentication failed: \(detail)"
59+
)
5460
}
5561
}
5662
}

TablePro/Core/SSH/LibSSH2Tunnel.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ internal final class LibSSH2Tunnel: @unchecked Sendable {
3434
/// Keeps blocking work off the Swift cooperative thread pool.
3535
private static let relayQueue = DispatchQueue(
3636
label: "com.TablePro.ssh.relay",
37-
qos: .utility
37+
qos: .utility,
38+
attributes: .concurrent
3839
)
3940

4041
/// Callback invoked when the tunnel dies (keep-alive failure, etc.)

TablePro/Resources/Localizable.xcstrings

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5465,6 +5465,9 @@
54655465
}
54665466
}
54675467
}
5468+
},
5469+
"Database Index" : {
5470+
54685471
},
54695472
"Database Index: %lld" : {
54705473
"extractionState" : "stale",
@@ -19042,7 +19045,6 @@
1904219045
}
1904319046
},
1904419047
"Use ~/.pgpass" : {
19045-
"extractionState" : "stale",
1904619048
"localizations" : {
1904719049
"vi" : {
1904819050
"stringUnit" : {

scripts/build-release.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ build_for_arch() {
347347
CODE_SIGN_IDENTITY="$SIGN_IDENTITY" \
348348
CODE_SIGN_STYLE=Manual \
349349
DEVELOPMENT_TEAM="$TEAM_ID" \
350+
PROVISIONING_PROFILE_SPECIFIER="TablePro Developer ID" \
350351
${ANALYTICS_HMAC_SECRET:+ANALYTICS_HMAC_SECRET="$ANALYTICS_HMAC_SECRET"} \
351352
-skipPackagePluginValidation \
352353
-clonedSourcePackagesDirPath "$SPM_CACHE_DIR" \

0 commit comments

Comments
 (0)