[TIMOB-24694] LiveView: No errors reported to user if the LiveView server process errors
GitHub Issue | n/a |
Type | Bug |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | LiveView |
Labels | n/a |
Reporter | Ewan Harris |
Assignee | Ewan Harris |
Created | 2017-05-15T12:34:21.000+0000 |
Updated | 2018-12-19T15:11:02.000+0000 |
Description
Description
When passing in a custom IP that does not resolve, LiveView will try to start up and then silently fail with no feedback to the user.
It should not silently fail and let the build continue as the app will go on and launch as normal, giving the user the impression that the server launched fine. At the very least it should log a big nasty error
Steps to reproduce
Build a app with --liveview --liveview-ip 123.4.5.6
Wait for the app to launch
Actual
App starts up and errors out, console gives no impression of any issues with the server other than the absence of the LiveView
Expected
Some sort of representation to the user that the LiveView server failed to start
Comments
JSON Source
Dropping some debug logs in, looks like the console.error call [here](https://github.com/appcelerator/liveview/blob/4de3f39330fcd6de5ca90b406f4b94c4feaf32d1/lib/fserver.js#L31)- is getting clobbered somehow-. Changing it to a .log allows the log from [here](https://github.com/appcelerator/liveview/blob/4de3f39330fcd6de5ca90b406f4b94c4feaf32d1/lib/fserver.js#L480) to get through. Duh, the stderr just isn't coming through the to parent process
This isnt specific to the LiveView server starting but all errors in that spawned process
This may be irrelevant with the changing from spawning the liveview process to using FServer directly
This error is still getting squashed because we're running the startServer function in the liveview hook from within a domain, those are deprecated and I don't really understand why we do that anyways. Would be good to fix this