Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23971] Hyperloop: iOS not working in 2.0.0 (regression)

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-10-07T11:54:37.000+0000
Affected Version/sRelease 6.0.0, Hyperloop 2.0.0
Fix Version/sRelease 6.0.0, Hyperloop 2.0.0
ComponentsHyperloop, iOS
Labelshyperloop, qe-6.0.0, regression
ReporterJan Vennemann
AssigneeChristopher Williams
Created2016-10-01T18:03:12.000+0000
Updated2016-10-12T19:57:55.000+0000

Description

Building the hyperloop-examples app with the current hyperloop 2.0.0 from master results in various errors regarding constructor functions in iOS. For example: * Auto Layout: CallbackObject is not a constructor (evaluating 'new UILabel()') at autolayout.js (line 57) * Apple Touch ID: CallbackObject is not a constructor (evaluating 'new LAContext()') at touchid.js (line 64) * View Animation: CallbackObject is not a constructor (evaluating 'new UIView()') at animateview.js (line 66) *Steps to reproduce* - Build the Hyperloop Examples project with Hyperloop 2.0.0 - Open one of the above Views *Expected behaviour* The examples run without any error *Actual behaviour* Exception is thrown

Comments

  1. Hans Knöchel 2016-10-03

    More errors (using the latest 2.0.0 build from Jan):
       -[HyperloopModule jsobject]: unrecognized selected sent to instance xxxx at collectionviewdatasourcedelegate.js
       
    The same is occurring for every other Hyperloop-based class as well. It must be some commit that has not been pushed to master but 1_2_X. It tried to access [this propery](https://github.com/appcelerator/hyperloop.next/blob/master/iphone/titanium/HyperloopModule.m#L38) from [here](https://github.com/appcelerator/hyperloop.next/blob/master/iphone/titanium/HyperloopModule.m#L318). *EDIT*: HyperloopModule.m is in sync, see [master](https://github.com/appcelerator/hyperloop.next/commits/master/iphone/titanium/HyperloopModule.m) and [1_2_X](https://github.com/appcelerator/hyperloop.next/commits/1_2_X/iphone/titanium/HyperloopModule.m). *EDIT2*: The only notable change between the iOS-part of the repos (diff'd) is [this commit](https://github.com/appcelerator/hyperloop.next/commit/dec27e658567368eac21710fe6edc4de2d08869d).
  2. Christopher Williams 2016-10-06

    Diffing the two branches, it seems pretty clear to me that the bulk of the iOS changes have actually been to the metabase folder. If I were to guess at what might be related it'd be: - https://github.com/appcelerator/hyperloop.next/compare/master...1_2_X?expand=1#diff-046d6eb9ae3b93ed6ce43ec97615921fR372 - https://github.com/appcelerator/hyperloop.next/compare/master...1_2_X?expand=1#diff-90680d080481b4bc4e5c23fcdf677533R116 Looks like those links don't work well. They are metabase/ios/lib/generate/block.js#L116, and metabase/ios/lib/generate/util.js#L372
  3. Christopher Williams 2016-10-06

    Hmm, reverting those changes locally in the plugins of hyperloop-examples with the new module didn't work either. The generated hyperloop js files are identical for UIKit/uilabel.js with both versions of the module. Not sure what would be causing this...
  4. Christopher Williams 2016-10-06

    So, if I use 1.2.8 against 5.5.0.GA, hyperloop-examples works. If I use it against a 6.1.0 build of the SDK, it fails. I think this may be an SDK issue, not hyperloop module. (Specifically, I tried 6.1.0.v20161003125638 and 6.0.0.v20160929031439 - both fail)
  5. Christopher Williams 2016-10-06

    Ok, so I think the only change that could possibly have affected this is the changes to require behavior in 6+. I'm going to test that theory out now locally.
  6. Christopher Williams 2016-10-06

    https://github.com/appcelerator/hyperloop.next/pull/83
  7. Jan Vennemann 2016-10-07

    Just for the record and as a conclusion of what Chris wrote in the PR: Since Hyperloop is a native module the new require logic tries to load the module instead of the actual hyperloop js files when doing a require('hyperloop/uikit/uilabel'). Relevant code: https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/KrollBridge.m#L1122 https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/KrollBridge.m#L816 The first path part matches Hyperloop's module id so it will load the module. For now this is solved by adding a forward slash to the hyperloop requires so it will skip trying to load the hyperloop module and instead load the actual Hyperloop JS files.
  8. Harry Bryant 2016-10-07

    [~jvennemann] Where is the fix for this? Downloaded the latest SDK (6.0.0.v20161007121506), removed my hyperloop module (2.0.0) and re downloaded the module from preprod. Ran the Hyperloop example from the master branch on an iOS10 & iOS9 device and still experience the reported errors. Tested On: iPhone 6 Plus 10.0.2 Device & Simulator iPhone 5S 9.3.5 Device Mac OSX El Capitan 10.11.6 Ti SDK: 6.0.0.v20161007121506 Appc Studio: 4.8.0.201610060953 Appc NPM: 4.2.8-7 App CLI: 6.0.0-57 Xcode 8.0 Node v4.4.7
  9. Jan Vennemann 2016-10-10

    [~htbryant], the latest beta is now on preprod which includes this fix.
  10. Harry Bryant 2016-10-12

    Verified as fixed, using the 2.0.0-dev branch of the hyperloop example app and the latest 2.0.0 (Beta 3) Hyperloop module from preprod, the example app now launches and functions correctly without issue. Tested On: iPhone 6 Plus 10.0.2 Device & Simulator iPhone 5S 9.3.5 Device Hyperloop Module 2.0.0 Mac OS Sierra (10.12) Ti SDK: 6.0.0.v20161012041242 Appc Studio: 4.8.0.201610060953 Appc NPM: 4.2.8-7 App CLI: 6.0.0-57 Xcode 8.0 Node v4.4.7 *Closing ticket.*

JSON Source