Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25072] Windows: Liveview not working for windows application

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionNeeds more info
Resolution Date2019-03-18T02:26:01.000+0000
Affected Version/sRelease 8.0.0
Fix Version/sn/a
ComponentsWindows
Labelsn/a
ReporterNeeraj Mishra
AssigneeKota Iguchi
Created2017-08-08T00:00:18.000+0000
Updated2019-08-07T23:46:32.000+0000

Description

Problem Description:

When we run windows application in LiveView, the application shows the splash screen and then crashes with no error log.

Steps to Reproduce:

Run the attached project in LiveView - ti build -p windows -T ws-local --liveview

Actual Result:

App crashes without logging anything on Console.

Expected Result:

App should continue working on LiveView mode wiothout crashing.

Attachments

FileDateSize
index.js2017-08-07T23:57:47.000+000063
index.tss2017-08-07T23:58:10.000+0000155
index.xml2017-08-07T23:58:25.000+0000114
log.txt2017-08-08T00:02:24.000+0000105298
LogsOCT.txt2017-10-25T21:04:18.000+0000342396
tiapp.xml2017-08-07T23:59:40.000+00002022
TiinfoOCT.txt2017-10-25T21:04:18.000+00008334

Comments

  1. Kota Iguchi 2017-08-14

    I am suspecting that this has to be something to with TIMOB-24893. In short, Titanium's network operation on Windows Store has to be done with async way but LiveView does not implement it like that, it waits for the network reply in while loop and it's blocking the network operations. I am thinking that waiting for server reply in while loop in LiveView is a bad idea and we need to consider implement it based on async callback.
  2. Kota Iguchi 2017-08-15

    https://github.com/appcelerator/liveview/pull/106 https://github.com/appcelerator/titanium_mobile_windows/pull/1075
  3. Feon Sua Xin Miao 2017-09-06

    Fixed in liveview@1.2.1.
  4. Kondal Kolipaka 2017-09-15

    That's right. It will be part of the studio 4.10.0. [~fmiao] [~nmishra]
  5. Victor Vazquez Montero 2017-10-25

    [~fmiao] Customer is reporting that they are getting continuous crashes with LiveView on 1.2.1 on Windows. [^TiinfoOCT.txt] [^LogsOCT.txt]
  6. Victor Vazquez Montero 2017-11-03

    [~fmiao]is there any update on this?
  7. Victor Vazquez Montero 2017-11-10

    [~fmiao][~kiguchi] I have a customer who cannot use liveview on windows projects and just verified that it is not working on our end. Can we please reopen this ticket?
  8. Kota Iguchi 2017-11-13

    Re-opening, [~vvazquezmontero] Can you provide details about the errors? Also please refer to [troubleshooting section in the doc](http://docs.appcelerator.com/platform/latest/#!/guide/LiveView-section-src-43298669_LiveView-ConfiguringLiveView).
  9. Victor Vazquez Montero 2017-11-16

    I uploaded their ti info and logs to the ticket from October and they currently have CLI 5.0.14 and the LiveView is not working in CLI app crashes right after it launches
  10. Kota Iguchi 2017-11-20

    Titanium SDK 7.0.0 beta released recently. Would you give this a try? [Beta Release of Titanium SDK 7.0.0 (includes Hyperloop 3.0.0) & CLI 7.0.0](https://www.appcelerator.com/blog/2017/11/beta-release-of-titanium-sdk-7-0-0-includes-hyperloop-3-0-0-cli-7-0-0/)
  11. Shuo Liang 2017-12-06

    Customer updated: I check with SDK 7.0.0 RC and it seems to be working for a newly created application. when an existing application is run with live view, app crashes right after launch. I'm testing with CLI.
  12. Kota Iguchi 2017-12-06

    Thanks for the info. Hmm for me liveview works on an exiting app too. For me following code worked:
        > appc ti clean
        > appc run -p windows --wp-sdk 10.0 --target ws-local -l trace --liveview
        
    I would wonder if old build cache is remaining, or old liveview being used. Which version of liveview do you use? For me it is 1.2.0
        > liveview --version
        
    You might want to update Appc Studio too in order to update liveview if that's the case.
  13. Kota Iguchi 2017-12-08

    [~mrahman] Thanks for the info, which version of liveview did you use? (liveview --version) Do you still get the error even on Titanium Android too?
  14. Mostafizur Rahman 2017-12-21

    Hello, Is there any update on this issue? The customer is using LiveView version 1.2.1 and LiveView is not launching. Here is the Customers latest log:
        $ appc ti build -p windows -T ws-local --liveview
        Appcelerator Command-Line Interface, version 7.0.0
        Copyright (c) 2014-2017, Appcelerator, Inc.  All Rights Reserved.
        
        2017-12-21 17:09:17
        
        Operating System
          Name                        = Microsoft Windows 10 Enterprise 2015 LTSB
          Version                     = 10.0.10240
          Architecture                = 64bit
          # CPUs                      = 4
          Memory                      = 17038667776
        
        Node.js
          Node.js Version             = 8.0.0
          npm Version                 = 5.0.0
        
        Titanium CLI
          CLI Version                 = 5.0.14
        
        Titanium SDK
          SDK Version                 = 7.0.0.GA
          SDK Path                    = C:\ProgramData\Titanium\mobilesdk\win32\7.0.0.GA
          Target Platform             = windows
        
        Command
          C:\Program Files\nodejs\node.exe C:\Users\Propelics\.appcelerator\install\7.0.0\package\node_modules\titanium\lib\titanium.js build -p windows -T ws-local --liveview --config-file C:\Users\PROPEL~1\AppData\Local\Temp\build-1513876155379.json --log-level info --no-banner --project-dir C:\Users\Propelics\Desktop\TestLiveView
        
        [INFO]  Found Titanium plugin id=ti.alloy version=1.0
        [INFO]  Building local Windows machine
        [INFO]  Deploy type: development
        [INFO]  Debugging disabled
        [INFO]  Profiler disabled
        [INFO]  Found Alloy app in C:\Users\Propelics\Desktop\TestLiveView\app
        [INFO]  Executing Alloy compile: C:\Program Files\nodejs\node.exe C:\Users\Propelics\.appcelerator\install\7.0.0\package\node_modules\alloy\bin\alloy compile C:\Users\Propelics\Desktop\TestLiveView\app --config platform=windows,version=0,simtype=none,devicefamily=none,deploytype=development,target=ws-local
        [INFO]   [config.json] config.json unchanged, using cached config.json...
        [INFO]  ----- MVC GENERATION -----
        [INFO]  [global style] loading from cache...
        [INFO]  [index.xml] view processing...
        [INFO]    style:      "index.tss"
        [INFO]    view:       "index.xml"
        [INFO]    controller: "index.js"
        [INFO]    created:    "Resources\windows\alloy\controllers\index.js"
        [INFO]    created:     "Resources\windows\alloy\styles\index.js"
        [INFO]
        [INFO]  [app.js] Titanium entry point processing...
        [INFO]    created:    "Resources\windows\app.js"
        [INFO]
        [INFO]  ----- OPTIMIZING -----
        [INFO]  - windows/alloy.js
        [INFO]  - windows/alloy/backbone.js
        [INFO]  - windows/alloy/constants.js
        [INFO]  - windows/alloy/controllers/BaseController.js
        [INFO]  - windows/alloy/controllers/index.js
        [INFO]  - windows/alloy/styles/index.js
        [INFO]  - windows/alloy/sync/localStorage.js
        [INFO]  - windows/alloy/sync/properties.js
        [INFO]  - windows/alloy/sync/sql.js
        [INFO]  - windows/alloy/underscore.js
        [INFO]  - windows/alloy/widget.js
        [INFO]  - windows/app.js
        [INFO]
        [INFO]  Alloy compiled in 0.83468s
        [INFO]  Alloy compiler completed successfully
        [INFO]  Using existing temporary pfx
        [INFO]  Missing 7 app icons, generating missing icons
        [INFO]    Square24x24Logo.png - Used for badge - size: 24x24
        [INFO]    Square44x44Logo.png - Used for logo - size: 44x44
        [INFO]    Square71x71Logo.png - Used for logo - size: 71x71
        [INFO]    Square150x150Logo.png - Used for logo - size: 150x150
        [INFO]    Logo.png - Used for logo - size: 150x150
        [INFO]    StoreLogo.png - Used for logo - size: 50x50
        [INFO]    SmallLogo.png - Used for logo - size: 30x30
        [INFO]  Processing JavaScript files
        [INFO]  Generating i18n files
        [INFO]  Writing appxmanifest C:\Users\Propelics\.titanium\vsbuild\TestLiveView\Package.store.appxmanifest.in
        [INFO]  Writing appxmanifest C:\Users\Propelics\.titanium\vsbuild\TestLiveView\Package.phone.appxmanifest.in
        [INFO]  Writing appxmanifest C:\Users\Propelics\.titanium\vsbuild\TestLiveView\Package.win10.appxmanifest.in
        [INFO]  Generating Native Types
        [INFO]  Setting up native modules for CMakeLists.txt...
        [INFO]  Writing CMakeLists.txt: C:\Users\Propelics\.titanium\vsbuild\TestLiveView\CMakeLists.txt
        [INFO]  CmakeLists.txt contents unchanged, retaining existing file.
        [INFO]  Running cmake at C:\ProgramData\Titanium\mobilesdk\win32\7.0.0.GA\windows\cli\vendor\cmake\bin\cmake.exe in directory C:\Users\Propelics\.titanium\vsbuild\TestLiveView\win10.x86
        [INFO]  -- Could NOT find GTest (missing:  GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
        [INFO]  -- Could NOT find PythonInterp (missing:  PYTHON_EXECUTABLE)
        [INFO]  -- Configuring done
        [INFO]  -- Generating done
        [INFO]  -- Build files have been written to: C:/Users/Propelics/.titanium/vsbuild/TestLiveView/win10.x86ium/vsbuild/TestLiveView/win10.x86
        [INFO]  Targeting Windows SDK: 10.0.14393.0                           ild\TestLiveView\win10.x86\TestLiveView.sln
        [INFO]  Running MSBuild on solution: C:\Users\Propelics\.titanium\vsbuild\TestLiveView\win10.x86\TestLiveView.sln[INFO]  Writing build manifest: C:\Users\Propelics\.titanium\vsbuild\TestLiveView\build-manifest.json
        [INFO]  Copying results back to project build directory[INFO]  Finished building the application in 23s 996ms
        [INFO]  Uninstalling old versions of the application
        [INFO]  Project built successfully in 24s 3ms
        
        [INFO]  Installing the application
        [INFO]  Making the application exempt from loopback IP restrictions for logging
        [INFO]  Launching the application
        [INFO]  Connected to app-- Start application log -----------------------------------------------------
        [INFO]  Finished launching the application
        [INFO]  Waiting for app to connect to log relay
        
  15. Kota Iguchi 2018-01-04

    I can see that IP address that LiveView is using is not configured (defaults to 0.0.0.0). Would you explicitly specify your ip address? Check out http://docs.appcelerator.com/platform/latest/#!/guide/LiveView-section-src-43298669_LiveView-ConfiguringLiveView if you're using Studio, or pass in --liveview-ip <your_ip_addr> if using CLI. If you are uncertain where to connect, following might help to know your network interfaces.
        (Launch your Windows PowerShell)
        > node
        > var os = require('os'); os.networkInterfaces();
        
  16. Victor Vazquez Montero 2018-01-19

    [~kiguchi] Propelics tested with setting up their IP address and are still not seeing LiveView launch at all. Do we have any other suggestions for this?
  17. Kota Iguchi 2018-01-23

    I am still unable to reproduce this particular issue, but I found different potential issue around networking codes that causes app crash without any error log, which looks similar to this LiveView issue. I started looking into it.
  18. Kota Iguchi 2018-01-29

    Status Update: I'm pushing a new PR: https://github.com/appcelerator/titanium_mobile_windows/pull/1173 which potentially fix the crash issue in liveview. I'll let you guys know when it's merged so that you can try the nightly build out.
  19. Victor Vazquez Montero 2018-01-30

    [~kiguchi] Thank you
  20. Kota Iguchi 2018-02-26

    [~vvazquezmontero] Would you try our nightly build 7.1.0.v20180223174212? It should contain potential fix for the crash issue. It may be logging error messages when something wrong happens on liveview instead.
        appc ti sdk install --branch 7_1_X 7.1.0.v20180223174212
        
  21. Kota Iguchi 2018-03-05

    [~vvazquezmontero] Would you try our 7.1.0.RC to see how liveview works for you? It should have included a potential fix for the crash issue around liveview.
  22. Kota Iguchi 2018-05-15

    Closing, I believe this has been addressed with Titanium SDK 7.1.1.GA and [Hyperloop 3.0.5](https://github.com/appcelerator-modules/hyperloop-builds/releases/tag/v3.0.5). Feel free to re-open if that's not the case.
  23. Samir Mohammed 2018-06-27

    [~kiguchi] Using 7.2.0.GA and the Hyperloop build from Hyperloop 3.0.5 (https://github.com/appcelerator-modules/hyperloop-builds/releases/tag/v3.0.5) the application just closes when trying to run and the console keeps outputting.
        Address in use, retrying...
        
    I also see:
        [ERROR] :  Message: Uncaught Error: require: Could not load module localeStrings
        
  24. Ewan Harris 2018-06-27

    [~smohammed] the Address in use, retrying... will be because there is a server running, liveview can be very iffy on Windows when you kill a build process and the server can be left lying around sometimes (TIMOB-25821). You can try killing all running node processes using taskkill /im node.exe /f. The second error might be related to the first
  25. Samir Mohammed 2018-06-27

    [~eharris] After killing all node process i no longer get the Address in use, retrying... message but I still get:
        [ERROR] :  Message: Uncaught Error: require: Could not load module localeStrings
        
  26. Kota Iguchi 2018-06-28

    [~smohammed] The localStrings error message sounds familiar to me...I found it once happened on an old liveview (TISTUD-7747) Maybe it could happen on old Appcelerator Studio? I'm using Appcelerator Studio 5.0.0.201712081732 and liveview --version prints 1.2.0 for me.
  27. Ewan Harris 2018-06-28

    I'm trying to remember that one, if I remember right if the app cannot load the file from the liveview server it will try and load it as a native module which fails with that error. I _think_ that the liveview app may not be able to connect to the server, on Windows you may need to [configure the ip](https://docs.appcelerator.com/platform/latest/#!/guide/LiveView-section-src-43298669_LiveView-ConfiguringLiveView), I can't remember what the right settings are though :/
  28. Samir Mohammed 2018-06-28

    [~kiguchi] I'm currently using Appc studio version 5.1.0.201806130735 (RC- Candidate) and according to Appc studio when running an application the version is:
        [LiveView] version 1.2.2
        
    As of right now the application just launches and then closes without showing an error on the emulators same is happening on the windows device. [~eharris] When configuring the IP for windows - Android devices. I use the File Server and Event Server ports mentioned in preferences with the ipv4 address from my Ethernet adapter Ethernet and this works. But if I remember correctly this should also work for Windows devices?
  29. Kota Iguchi 2018-06-28

    [~smohammed] Just to be clear, do you mean you tested it on emulator and windows 10 mobile device? Did you test it on Windows desktop (ws-local)? If not, would you try it on Windows desktop?
        appc run -p windows --wp-sdk 10.0 --target ws-local -l trace --liveview
        
  30. Kota Iguchi 2018-06-29

    I was able to reproduce this on my Windows 10 mobile device. So like Ewan described it happens when Windows 10 mobile device can't connect to the liveview server and it worked for me when I specify correct host ip address by using --liveview-ip xx.xx.xx.xx. {quote}When configuring the IP for windows - Android devices. I use the File Server and Event Server ports mentioned in preferences with the ipv4 address from my Ethernet adapter Ethernet and this works. But if I remember correctly this should also work for Windows devices? {quote} For me my PC has several interfaces for Ethernet adapter vEthernet and I chose the same network that Windows 10 mobile device is using. For the emulators I would guess we want to choose the interface named "Windows Emulator" or something. I hope this helps.
  31. Samir Mohammed 2018-06-29

    [~kiguchi], Still no luck getting LiveView to work (ws-local, windows emulators, windows devices) even with trying a range of ip address (either from ipconfig or by getting the address from the emulator it self). Depending on which address I use the application either launches and closes or the following error is shown:
         [LiveView]  version 1.2.2
         [LiveView]  Alloy project monitor started
         [LiveView]  File Server Started on  172.17.35.49:8324
         [LiveView]  Event Server Started on  172.17.35.49:8323
        [TRACE] updating tiapp metadata with Appcelerator Platform...
        [TRACE] Uploaded tiapp metadata with Appcelerator Platform!
        [INFO]  Installing the application...
        [INFO]  Finished installing the application
        [INFO]  Waiting for app to connect to log relay
        [INFO]  Connected to app
        -- Start application log -----------------------------------------------------
        [ERROR] Message: Uncaught Error: Runtime Exception: In app.js require: Could not load module localeStrings
        [ERROR] require@[native code]
        [INFO]  _compile
        [INFO]  require
        [INFO]  patch
        [INFO]
        [INFO]  global code
        [INFO]  require@[native code]
        [INFO]  global code
        [ERROR] 1  JSExportClass<class Titanium::GlobalObject>::require
        [ERROR] 2  JSExportClass<class Titanium::GlobalObject>::require
        [DEBUG] Start posting initial Ti.Analytics events
        [INFO]  Finished launching the application
        
    *Test Environment*
        APPC Studio: 5.1.0.201806130735
        APPC CLI version 7.0.4
        LiveView 1.2.2
        Noka lumia 550 (Win 10)
        Operating System:
        Name = Microsoft Windows 10 Pro
        Version = 10.0.15063
        Architecture = 32bit
        CPUs = 4
        Memory = 16.0GB
        Node.js:
        Node.js Version = 8.9.1
        
  32. Josh Longton 2019-01-30

    [~kiguchi] I am also experiencing issues with liveview on windows, with the error Samir has seen in the past and this error below on SDK; 8.0.0.v20190129200738 {noformat} [LiveView] { Error: read ECONNRESET at TCP.onread (net.js:622:25) --------------------------------------------- at _destroy (internal/streams/destroy.js:34:15) at Socket._destroy (net.js:568:3) at Socket.destroy (internal/streams/destroy.js:32:8) at TCP.onread (net.js:622:17) errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' } {noformat}
  33. Kota Iguchi 2019-01-31

    [~jlongton] For me LiveView did not work at all for the first time & rebooting my PC makes LiveView work. I'm not quite sure what's happening there but probably relates to TIMOB-26725? Then LiveView works but as soon as I exit the app I got similar error:
        [INFO]  Disconnected from app
        -- End application log -------------------------------------------------------
        
        2019-01-31T07:12:35.322Z | ERROR  | An uncaught exception was thrown!
        read ECONNRESET
        2019-01-31T07:12:35.322Z | ERROR  | read ECONNRESET
        
  34. Kota Iguchi 2019-02-05

    [~jlongton] For me I saw error messages that only happens at the end of applicaitoin exit like I stated before. I'm trying to narrow down the issue, would you give us more details? Which error do you see?

    LiveView does not work at all, or it causes application shutdown at startup

    LiveView launches but causes error at reloading app (Classic? Alloy?)

    LiveView works but causes error at application exit

    For me only 3) happens locally. I created TIMOB-26796 to track down the issue.
  35. Kota Iguchi 2019-03-18

    Closing this as "Needs more info" for now. Feel free to create new ticket if this still happens & then reproducible test case would be much appreciated.

JSON Source