[DAEMON-145] Subscribe on /system-info/1.x/info doesn't work
| GitHub Issue | n/a |
| Type | Bug |
| Priority | Critical |
| Status | Resolved |
| Resolution | Fixed |
| Resolution Date | 2017-11-17T16:06:49.000+0000 |
| Affected Version/s | Appc Daemon 1.0.0 |
| Fix Version/s | Appc Daemon 1.0.0 |
| Components | appcd-plugin-system-info |
| Labels | n/a |
| Reporter | Kondal Kolipaka |
| Assignee | Chris Barber |
| Created | 2017-11-15T23:39:01.000+0000 |
| Updated | 2017-12-12T21:24:17.000+0000 |
Description
*Problem Description:*
When we subscribe on /system-info/1.x/info changes - Appcd should publish the changes if any changes in iOS devices, Android devices, Xcode changes, etc.
*To Reproduce:*
appc appcd exec /system-info/1.x/info/ --subscribe
Now connect iOS device
*Actual:*
No changes
*Expected:*
Return system-info with the iOS device
Note: appc appcd exec /system-info/1.x/info/ios/devices --subscribe is working fine
Attachments
I'm unable to reproduce this issue when pointing to a single xcode (i.e I see the output updated everytime), multiple xcodes I do see issues but probably down to the known issue. Tested on Sams machine using appcd@1.0.0-8 and he was unable to reproduce either My device info is
[ { buildVersion: '14G60', cpuArchitecture: 'arm64', deviceClass: 'iPhone', deviceColor: '#e1e4e3', hardwareModel: 'N61AP', modelNumber: 'MG4Q2', name: 'SPAM', productType: 'iPhone7,2', productVersion: '10.3.3', serialNumber: 'F17ND0F9G5MF', udid: '6c52e362235a16580f69c9cb0b0a5586d55e88fc' } ][~eharris] What's the command did you use?
[~kkolipaka] I'm using
appcd exec /system-info/1.x/info/ --subscribe, as well as the below codeconst msgpack = require('msgpack-lite'); const util = require('util'); const WebSocket = require('ws'); const ws = new WebSocket('ws://127.0.0.1:1732', { headers: { 'User-Agent': __filename } }) .on('message', (msg, flags) => { try { console.log(JSON.parse(JSON.stringify(msgpack.decode(msg))).message.ios.devices); } catch (e) { // console.log(msgpack.decode(msg)); } }) .on('close', () => console.log('CLOSED')) .on('open', () => ws.send(JSON.stringify({ version: '1.0', path: '/system-info/1.x/info', id: Date.now(), type: 'subscribe' })));Subscribing to /system-info now works like a champ.