Commit f7207117 authored by Lisa (AI Assistant)'s avatar Lisa (AI Assistant)

Fix: Use deviceId for client.id (not nodeId)

parent e165f2b6
...@@ -3,25 +3,30 @@ ...@@ -3,25 +3,30 @@
## 2026-03-11 ## 2026-03-11
### Issue: Build failing due to corrupted Android SDK ### Issue: Build failing due to corrupted Android SDK
- The SDK at /opt/android-sdk is corrupted (duplicate platform directories) - The SDK at /opt/android-sdk is corrupted (duplicate platform directories: android-34, android-34-2, android-34-6, etc.)
- Cannot clean up without sudo access on the laptop - Each build attempt creates a new duplicate directory
- Need to either: (1) have Stefy run cleanup, or (2) find alternative build method - The platform files show wrong version (Platform 14 inside android-34 folder)
- **CANNOT fix without sudo access** on the laptop
- Need: `sudo rm -rf /opt/android-sdk/platforms/* && sudo sdkmanager "platforms;android-34" "build-tools;34.0.0"`
### Error: Client ID format for pairing ### Error: Client ID format for pairing
- Original log showed: `invalid connect params: at /client/id: must be equal to constant` - Original log showed: `invalid connect params: at /client/id: must be equal to constant`
- **MISTAKE**: Changed client.id from device hash to "android-node" constant - Protocol docs show `id: "ios-node"` for iOS - so "android-node" SHOULD be valid
- **CORRECTION**: Reverted back to using deviceId hash - the constant was WRONG - **MISTAKE**: Tried changing to "android-node" but user confirmed original device hash was correct
- The real issue is likely something else in the connect params - **REVERTED**: Changed back to using deviceId hash
- Real issue is likely something else in the connect params
### Code Changes Made ### Code Changes Made
1. **Hardcoded gateway config** (temporary for testing): 1. **Hardcoded gateway config** (TEMPORARY for testing):
- File: `NodeService.kt` - File: `NodeService.kt`
- Added fallback config: IP=192.168.11.46, port=18789, token=<gateway token> - Added fallback config: IP=192.168.11.46, port=18789, token=<gateway token>
- This is TEMPORARY - should be removed after pairing works - **MUST REMOVE** after pairing works
2. **Client ID**: Kept as deviceId hash (not constant) 2. **Client ID**: Kept as deviceId hash (not constant)
### Next Steps ### Next Steps
1. Need to fix SDK issue to build 1. **BLOCKED**: Need SDK cleanup on laptop before can build - cannot fix without sudo
2. Need to debug actual pairing flow error - Each build creates a new duplicate (android-34-7 now)
- Gradle/SDK manager is confused by the duplicates
2. After build: test pairing flow
3. After pairing works: remove hardcoded config, test on real phone 3. After pairing works: remove hardcoded config, test on real phone
...@@ -295,8 +295,8 @@ class NodeClient() { ...@@ -295,8 +295,8 @@ class NodeClient() {
put("minProtocol", 3) put("minProtocol", 3)
put("maxProtocol", 3) put("maxProtocol", 3)
put("client", JSONObject().apply { put("client", JSONObject().apply {
put("id", nodeId.ifBlank { "android-node" }) put("id", deviceId) // Use device fingerprint as client ID
put("displayName", nodeId) put("displayName", nodeId.ifBlank { "Android Node" })
put("version", "1.0.0") put("version", "1.0.0")
put("platform", "android") put("platform", "android")
put("mode", "node") put("mode", "node")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment