Description
The synchronizer fails to establish a connection to the lightwalletd server with gRPC error code 14 (UNAVAILABLE) on both iOS (physical device) and Android (emulator). This appears to be a TLS/certificate validation issue affecting the gRPC client in both platforms.
Environment
- react-native-zcash version: 0.10.2
- zcash-android-sdk version: 2.4.0 (from package dependencies)
- React Native version: 0.83.0
- Platform: Both iOS (physical device) and Android (emulator API 35)
- Network: testnet
- Server:
lightwalletd.testnet.electriccoin.co:9067
Steps to Reproduce
- Initialize synchronizer with testnet configuration:
const config = {
networkName: "testnet",
defaultHost: "lightwalletd.testnet.electriccoin.co",
defaultPort: 9067,
mnemonicSeed: "<24-word-seed>",
alias: "test-wallet",
birthdayHeight: 2800000,
newWallet: true
};
await RNZcash.initialize(config);
- Observe synchronizer status events
- Synchronizer immediately transitions to
DISCONNECTED state
Expected Behavior
Synchronizer should connect to lightwalletd server and begin syncing blocks.
Actual Behavior
Synchronizer fails with gRPC error 14 (UNAVAILABLE). Status changes:
DISCONNECTED → INITIALIZING → DISCONNECTED
Logs (Android)
Key error messages:
W Twig: CompactBlockDownloader.invokeSuspend(): WARNING: reconnecting to server in response to failure (retry #1)
W Twig: cash.z.ecc.android.sdk.exception.LightWalletException$GetServerInfoException:
Failed to get data about currently connected lightwalletd server with code: 14 due to: -
Caused by: java.lang.Throwable: Communication failure with details: 14.
Network connectivity verification (from Android emulator):
# Ping test - SUCCESS
PING lightwalletd.testnet.electriccoin.co (34.149.161.34) 56(84) bytes of data.
64 bytes from 34.161.149.34.bc.googleusercontent.com (34.149.161.34): icmp_seq=1 ttl=255 time=27.2 ms
3 packets transmitted, 3 received, 0% packet loss
# Port connectivity test - SUCCESS
Port 9067 open
The network layer works perfectly - DNS resolves, ping succeeds, and port 9067 is reachable. This strongly suggests a TLS/certificate validation issue at the gRPC layer.
Additional Context
-
Cross-platform issue: Both iOS (physical device) and Android (emulator) exhibit identical behavior, suggesting this is not platform-specific but related to the underlying gRPC client configuration.
-
Network security config (Android): Attempted to add explicit trust for lightwalletd servers and system certificates:
<network-security-config>
<base-config cleartextTrafficPermitted="false">
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</base-config>
</network-security-config>
This did not resolve the issue.
- Endpoint configuration: The
LightWalletEndpoint is created with secure: true (line 62 in RNZcashModule.kt):
val endpoint = LightWalletEndpoint(defaultHost, defaultPort, true)
Questions
- Are there known TLS/certificate issues with zcash-android-sdk 2.4.0?
- Does the gRPC client require additional configuration for certificate validation?
- Has the lightwalletd server certificate chain changed recently?
- Are there any alternative lightwalletd servers recommended for testing?
Potential Root Causes
Based on investigation:
- gRPC TLS handshake failure: The gRPC client can reach the server but cannot complete the TLS handshake
- Certificate chain validation: The client may not trust the server's certificate or intermediate CA
- Missing TLS configuration: The SDK might need explicit TLS configuration that's not being set
Any guidance on debugging or resolving this would be greatly appreciated! I am still unsure if it is just from myself not undserstanding exactly our to initalize the syncronizer or what.
Appreciate it
Description
The synchronizer fails to establish a connection to the lightwalletd server with gRPC error code 14 (UNAVAILABLE) on both iOS (physical device) and Android (emulator). This appears to be a TLS/certificate validation issue affecting the gRPC client in both platforms.
Environment
lightwalletd.testnet.electriccoin.co:9067Steps to Reproduce
DISCONNECTEDstateExpected Behavior
Synchronizer should connect to lightwalletd server and begin syncing blocks.
Actual Behavior
Synchronizer fails with gRPC error 14 (UNAVAILABLE). Status changes:
DISCONNECTED→INITIALIZING→DISCONNECTEDLogs (Android)
Key error messages:
Network connectivity verification (from Android emulator):
The network layer works perfectly - DNS resolves, ping succeeds, and port 9067 is reachable. This strongly suggests a TLS/certificate validation issue at the gRPC layer.
Additional Context
Cross-platform issue: Both iOS (physical device) and Android (emulator) exhibit identical behavior, suggesting this is not platform-specific but related to the underlying gRPC client configuration.
Network security config (Android): Attempted to add explicit trust for lightwalletd servers and system certificates:
This did not resolve the issue.
LightWalletEndpointis created withsecure: true(line 62 in RNZcashModule.kt):Questions
Potential Root Causes
Based on investigation:
Any guidance on debugging or resolving this would be greatly appreciated! I am still unsure if it is just from myself not undserstanding exactly our to initalize the syncronizer or what.
Appreciate it