[TIMOB-26720] iOS: Log-server does not release port when using app-extensions
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2020-01-30T23:06:59.000+0000 |
Affected Version/s | Release 7.4.0, Release 7.5.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Hans Knöchel |
Assignee | Chris Barber |
Created | 2019-01-13T12:50:40.000+0000 |
Updated | 2020-01-30T23:07:06.000+0000 |
Description
When using iOS app extensions, the log server seem to have issues releasing the assigned port. This can be reproduced by using an extension and then simply trying to rebuild the app (incremental build). Full error output:
[DEBUG] Checking if log server port 1337 is available
[DEBUG] Log server port 1337 is in use, testing if it's the app we're building
[LiveView] TypeError: Cannot read property 'code' of undefined
at Socket.die (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/iphone/cli/commands/_build.js:2558:15)
at Socket.emit (events.js:182:13)
at Socket._onTimeout (net.js:449:8)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
---------------------------------------------
at Socket.Readable.on (_stream_readable.js:799:35)
at /Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/iphone/cli/commands/_build.js:2600:6
at Server.close (net.js:1565:9)
at Server.emit (events.js:182:13)
at emitCloseNT (net.js:1618:8)
at process._tickCallback (internal/process/next_tick.js:63:19)
---------------------------------------------
at Server.once (events.js:290:8)
at Server.close (net.js:1564:12)
at Server.<anonymous> (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/iphone/cli/commands/_build.js:2551:10)
at Server.emit (events.js:182:13)
at emitErrorNT (net.js:1313:8)
at process._tickCallback (internal/process/next_tick.js:63:19)
---------------------------------------------
at iOSBuilder.determineLogServerPort (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/iphone/cli/commands/_build.js:2549:9)
at /Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/async/dist/async.js:3880:24
at replenish (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/async/dist/async.js:1011:17)
at /Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/async/dist/async.js:1016:9
at eachOfLimit (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/async/dist/async.js:1041:24)
at /Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/async/dist/async.js:1046:16
at _parallel (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/async/dist/async.js:3879:5)
at Object.series (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/async/dist/async.js:4735:5)
at series (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/node-appc/lib/async.js:73:8)
---------------------------------------------
at magik (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/ioslib/lib/utilities.js:51:13)
at detect (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/ioslib/lib/simulator.js:101:9)
at /Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/ioslib/lib/simulator.js:437:3
at fireCallbacks (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/ioslib/lib/xcode.js:140:5)
at /Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/ioslib/lib/xcode.js:146:11
at /Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/ioslib/lib/utilities.js:66:17
at process._tickCallback (internal/process/next_tick.js:61:11)
---------------------------------------------
at magik (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/ioslib/lib/utilities.js:51:13)
at Object.detect (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/ioslib/lib/xcode.js:133:27)
at Object.findSimulators (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/ioslib/lib/simulator.js:431:8)
at iOSBuilder.selectDevice (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/iphone/cli/commands/_build.js:2013:22)
at /Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/async/dist/async.js:3880:24
at replenish (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/async/dist/async.js:1011:17)
at /Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/async/dist/async.js:1016:9
at eachOfLimit (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/async/dist/async.js:1041:24)
at /Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/async/dist/async.js:1046:16
---------------------------------------------
at Object.execFile (child_process.js:368:9)
at exec (child_process.js:147:18)
at /usr/local/lib/node_modules/titanium/node_modules/node-appc/lib/environ.js:274:3
at /usr/local/lib/node_modules/titanium/node_modules/async/dist/async.js:3888:9
at /usr/local/lib/node_modules/titanium/node_modules/async/dist/async.js:473:16
at replenish (/usr/local/lib/node_modules/titanium/node_modules/async/dist/async.js:1006:25)
at iterateeCallback (/usr/local/lib/node_modules/titanium/node_modules/async/dist/async.js:995:17)
at /usr/local/lib/node_modules/titanium/node_modules/async/dist/async.js:969:16
at /usr/local/lib/node_modules/titanium/node_modules/async/dist/async.js:3885:13
---------------------------------------------
at Object.execFile (child_process.js:368:9)
at exec (child_process.js:147:18)
at /usr/local/lib/node_modules/titanium/node_modules/node-appc/lib/environ.js:234:6
at /usr/local/lib/node_modules/titanium/node_modules/async/dist/async.js:3880:24
at replenish (/usr/local/lib/node_modules/titanium/node_modules/async/dist/async.js:1011:17)
at /usr/local/lib/node_modules/titanium/node_modules/async/dist/async.js:1016:9
at eachOfLimit (/usr/local/lib/node_modules/titanium/node_modules/async/dist/async.js:1041:24)
at /usr/local/lib/node_modules/titanium/node_modules/async/dist/async.js:1046:16
at _parallel (/usr/local/lib/node_modules/titanium/node_modules/async/dist/async.js:3879:5)
---------------------------------------------
at Object.run (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/ioslib/node_modules/node-appc/lib/subprocess.js:60:8)
at /Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/ioslib/lib/simctl.js:604:20
at Object.whilst (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/async/dist/async.js:5227:5)
at trySimctl (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/ioslib/lib/simctl.js:598:8)
at /Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/ioslib/lib/simctl.js:200:4
at Object.whilst (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/async/dist/async.js:5227:5)
at Object.list (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/ioslib/lib/simctl.js:195:8)
at /Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/ioslib/lib/simulator.js:179:11
at fireCallbacks (/Users/hans/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190108052418/node_modules/ioslib/lib/xcode.js:140:5)
A workaround is to change the port manually, which forces a new rebuild everytime (so not really a good workaround). Please fix this!
P.S.: This does not only happen for extensions but for normal app builds as well, although very randomly. We can see this using different networks and we are not behind any VPN.
Dupe of TIMOB-27074.