Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26267] LiveView: Calling "liveview server stop" causes exception, but stops connections

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2020-06-11T14:11:39.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.1.0
ComponentsLiveView
Labelsn/a
ReporterHans Knöchel
AssigneeEwan Harris
Created2018-08-04T14:20:45.000+0000
Updated2020-06-11T14:11:39.000+0000

Description

When using liveview server stop to stop all connections, the following error occurs:
[LiveView]  Closing file/event server process id: 39542
 [LiveView]  Error closing server { Error: kill ESRCH
    at Object._errnoException (util.js:992:11)
    at process.kill (internal/process.js:183:18)
    at /Users/hknoechel/Documents/dev/liveview/lib/fserver.js:97:12
    at Array.forEach (<anonymous>)
    at Object.FServer.stop (/Users/hknoechel/Documents/dev/liveview/lib/fserver.js:92:7)
    at Object.<anonymous> (/Users/hknoechel/Documents/dev/liveview/bin/liveview-server:45:25)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12) code: 'ESRCH', errno: 'ESRCH', syscall: 'kill' }
It seems to error out, but after checking with liveview server status, they have been killed properly.

Comments

  1. Ewan Harris 2018-08-04

    Liveview doesn't always clean up after itself properly, so the liveview process will be killed but the pid file will not be removed which causes an ESRCH error (no such process). We should squash those errors so they don't get logged. I'd love to do a refactor on the liveview command line before it sees any proper usage, it's kinda crufty right now. Personally I wouldn't view changing the commands as a breaking change we've never advertised them for usage (due to shipping in Studio), with shipping in the appc cli/as a separate module they will be part of our "API contract" so we should do it before the transition happens.
  2. Ewan Harris 2018-08-07

    PR: https://github.com/appcelerator/liveview/pull/115
  3. Samir Mohammed 2020-06-11

JSON Source