Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26551] iOS: "Cannot read property 'code' of undefined" error thrown if log server connection times out

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2018-11-13T15:00:28.000+0000
Affected Version/sRelease 7.5.0
Fix Version/sRelease 8.0.0
ComponentsCLI, iOS
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2018-11-13T13:19:02.000+0000
Updated2018-11-26T21:42:27.000+0000

Description

Description

When checking the log server connection in the iOS build if the check times out then the following error is thrown. I'm unsure as to the actual reasons for why I ran into this, but you can easily reproduce by reducing the logserver wait time

/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20181109074008/iphone/cli/commands/_build.js:2506
                                if (error.code === 'ENOTFOUND') {
              ^
TypeError: Cannot read property 'code' of undefined
    at Socket.die (/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20181109074008/iphone/cli/commands/_build.js:2506:15)

Steps to reproduce

1. Reduce the logserver wait time using appc ti config ios.logServerTestTimeout 1 2. Build an iOS app for simulator or device

Actual

Error thrown like the above

Expected

Error thrown should inform the user the real reason it errored

Comments

  1. Christopher Williams 2018-11-13

    https://github.com/appcelerator/titanium_mobile/pull/10459
  2. Samir Mohammed 2018-11-21

    *Closing ticket* Verified fix in SDK Version 8.0.0.v20181120024406 Above error is no longer seen when using the steps mentioned in the comments (also checked while app was running).

JSON Source