Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20425] Main Thread: Ti.Stream undefined when enabled and run via LiveView

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionCannot Reproduce
Resolution Date2016-11-06T21:16:39.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
LabelsLiveView, ios, mainthread, studio
ReporterOphir Oren
AssigneeEric Merriman
Created2016-01-28T20:23:12.000+0000
Updated2017-03-31T21:58:15.000+0000

Description

When setting true and running the app in iOS emulator with LiveView turned on, it throws: undefined is not an object (evaluating 'Ti.Stream.pump') at app.js (line 231). [ERROR] : Script Error { [ERROR] : column = 16; [ERROR] : line = 231; [ERROR] : message = "undefined is not an object (evaluating 'Ti.Stream.pump')"; [ERROR] : sourceURL = "file:///Users/ophir/Library/Developer/CoreSimulator/Devices/046ECC44-60EC-4D29-B67E-A3370829EEE7/data/Containers/Bundle/Application/FC02DDCE-6E69-488E-BE43-BCFE5C27F7C3/Memoriez.app/app.js"; [ERROR] : } These are my iOS settings: true true true true If I just set run-on-main-thread to false then it will not show the error message and LiveView will work.

Attachments

FileDateSize
Screen Shot 2016-01-31 at 12.28.12 PM.png2016-01-31T06:36:30.000+0000327777

Comments

  1. Sharif AbuDarda 2016-01-31

    Hello, I tested the issue in iOS 9.1 with SDK 5.1.2.GA. I wasn't able to regenerate the issue. I have true set in my iOS section of tiapp.xml. With liveview enabled the app runs fine. See the attachment.

    My environment

       Operating System
         Name                        = Mac OS X
         Version                     = 10.11.2
         Architecture                = 64bit
         # CPUs                      = 4
         Memory                      = 8589934592
       Node.js
         Node.js Version             = 4.2.2
         npm Version                 = 2.14.7
       Titanium CLI
         CLI Version                 = 5.0.5
       Titanium SDK
         SDK Version                 = 5.1.2.GA
         Target Platform             = ipad 2
       
    The problem seems to be in your javascript code, at app.js (line 231). Can you provide the sample test case which generate the issue. Thanks.
  2. Ophir Oren 2016-01-31

    Hi, I tested against SDK 5.2.0.v201xxxxxxxxx and 6.0.0.v201xxxxxxxxx (which ever one that was the latest at the time).
  3. Sharif AbuDarda 2016-02-01

    The latest stable SDK version is 5.1.2.GA. Mobilesdk-6.0.0.v20160131201421 and Mobilesdk-5.2.0.v20160130151658 are master, beta release.
  4. Ophir Oren 2016-02-01

    I know. But I'm testing future versions of the SDK (mainly because of Hyperloop). Are you not interested in knowing there are bugs in future versions of your product? You need to release a product with bugs in order for community members to report it? and only on next next version fix it? I think it's in Appcelerator's interest that members of the community test future products and report bugs...
  5. Sharif AbuDarda 2016-02-04

    Yes, We are interested in knowing about any bugs in future versions, That is why we release them as beta or test version. We get the community members reported issues in the beta version then we release a stable version after dealing with them. Thanks.
  6. Fokke Zandbergen 2016-02-12

    This is still in an issue in the latest SDK 5.2.0 nightlies so should be considered a blocker for the SDK 5.2.0 release [~cng]
  7. Fokke Zandbergen 2016-02-12

    I've verified that: * Ti.Stream is an object when you disable LiveView and use it somewhere else in my app * The error still occurs even even when I use Ti.Stream elsewhere in my app So it seems _not_ related to the late injection of the API into app.js by LiveView.
  8. Hans Knöchel 2016-03-11

    Just got the same error when developing with Hyperloop ( enabled, using Live View)
  9. Hans Knöchel 2016-03-18

    The related line is [here](https://github.com/appcelerator/liveview/blob/master/lib/platform/socket.js#L62), but I cannot find anything suspicious in both SDK and LiveView. Who is curating that project?
  10. Hans Knöchel 2016-04-21

    Do we have progress here? It blocks 5.4.0 / Hyperloop development.
  11. Chee Kiat Ng 2016-05-09

    I'm having problems trying to reproduce this error. Can someone help so i can work on this? My environment: Xcode 7.3 node 4.2.2 appc cli 5.3.0-43 appc npm 4.2.5-5 Ti SDK: 5.4.0.v20160508201414

    Steps to reproduce

    1. In studio, new titanium project, default classic 2. set liveview 3. check to ensure run-on-main-thread is enabled in tiapp.xml (this should be enabled by default on the latest master) 4. build app 5. make some changes to app.js and save 6. changes are shown with no error [~sdarda] can you please try to reproduce this?
  12. Rodolfo Perottoni 2016-05-09

    Xcode 7.3 Node 0.12.7 appc cli 5.2.1 Ti SDK 5.2.2.GA Liveview: On Run on main thread: true Open the app and... !http://i.imgur.com/ksGaGIh.png?1!
  13. Hans Knöchel 2016-05-09

    [~rdperottoni] That the issue occurs with 5.2.x is known, please test with 5.4.0 and edit your comment, thanks!
  14. Chee Kiat Ng 2016-05-11

    Ok so I am able to reproduce this in older versions of the SDK. But the latest master 5.4.X is working fine for this.
  15. Chee Kiat Ng 2016-05-18

    [~sdarda][~developer82] if possible, can you verify with 5.4.X (latest master)?
  16. Hans Knöchel 2016-11-06

    I can confirm that I cannot reproduce it with recent versions of our SDK anymore. Resolving!
  17. Lee Morris 2017-03-31

    Closing ticket as the issue cannot be reproduced, with reference to the above comment.

JSON Source