diff --git a/desktop/app/src/server/devices/ios/IOSDevice.tsx b/desktop/app/src/server/devices/ios/IOSDevice.tsx index cca79b00b..3b816fd13 100644 --- a/desktop/app/src/server/devices/ios/IOSDevice.tsx +++ b/desktop/app/src/server/devices/ios/IOSDevice.tsx @@ -12,7 +12,6 @@ import child_process, {ChildProcess} from 'child_process'; import BaseDevice from '../BaseDevice'; import JSONStream from 'JSONStream'; import {Transform} from 'stream'; -import {exec} from 'promisify-child-process'; import {ERR_PHYSICAL_DEVICE_LOGS_WITHOUT_IDB, IOSBridge} from './IOSBridge'; import split2 from 'split2'; diff --git a/desktop/app/src/server/devices/ios/iOSDeviceManager.tsx b/desktop/app/src/server/devices/ios/iOSDeviceManager.tsx index dd5a421f1..728e48f66 100644 --- a/desktop/app/src/server/devices/ios/iOSDeviceManager.tsx +++ b/desktop/app/src/server/devices/ios/iOSDeviceManager.tsx @@ -112,6 +112,7 @@ export function getAllPromisesForQueryingDevices( store.getState().settingsState.idbPath, store.getState().settingsState.enablePhysicalIOS, ).then((devices: IOSDeviceParams[]) => { + console.log('Active iOS devices:', devices); processDevices(store, logger, iosBridge, devices, 'physical'); }), ]; diff --git a/desktop/flipper-plugin/src/data-source/DataSource.tsx b/desktop/flipper-plugin/src/data-source/DataSource.tsx index 182a86a0a..0a8feaa4b 100644 --- a/desktop/flipper-plugin/src/data-source/DataSource.tsx +++ b/desktop/flipper-plugin/src/data-source/DataSource.tsx @@ -212,7 +212,13 @@ export class DataSource { if (this.keyAttribute) { const key = this.getKey(value); if (this._recordsById.has(key)) { - throw new Error(`Duplicate key: '${key}'`); + const existingValue = this._recordsById.get(key); + console.warn( + `Tried to append value with duplicate key: ${key} (key attribute is ${this.keyAttribute}). Old/new values:`, + existingValue, + value, + ); + throw new Error(`Duplicate key`); } this._recordsById.set(key, value); this.storeIndexOfKey(key, this._records.length); diff --git a/desktop/flipper-plugin/src/data-source/__tests__/datasource-basics.node.tsx b/desktop/flipper-plugin/src/data-source/__tests__/datasource-basics.node.tsx index 7f6e4f9fb..d0ad40e6a 100644 --- a/desktop/flipper-plugin/src/data-source/__tests__/datasource-basics.node.tsx +++ b/desktop/flipper-plugin/src/data-source/__tests__/datasource-basics.node.tsx @@ -116,7 +116,7 @@ test('throws on invalid keys', () => { }).toThrow(`Invalid key value: ''`); expect(() => { ds.append({id: 'cookie', title: 'test'}); - }).toThrow(`Duplicate key: 'cookie'`); + }).toThrow(`Duplicate key`); }); test('throws on update causing duplicate key', () => {