Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20274] Hyperloop: Plugin fails if the source does not contain HL references

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-04-08T08:41:50.000+0000
Affected Version/sn/a
Fix Version/sHyperloop 2.1.0
ComponentsHyperloop
Labelsn/a
ReporterFokke Zandbergen
AssigneeJan Vennemann
Created2016-01-26T21:39:19.000+0000
Updated2017-05-05T13:05:30.000+0000

Description

As found by [~developer82] and reported on [Stack Overflow](http://stackoverflow.com/questions/34999704/hyperloop-compilation-error) the Hyperloop plugin fails when the source of the app does not actually use Hyperloop. It will crash with:
[INFO]  Skipping Hyperloop compile, no usage found …
[TRACE] Symbol references up-to-date
[DEBUG] Skipping stub generation

/Users/fokkezb/dev/tests/nohl/plugins/hyperloop/hooks/ios/hyperloop.js:581
		return callback();
         ^
ReferenceError: callback is not defined
PR incoming

Comments

  1. Fokke Zandbergen 2016-01-26

    PR on master: https://github.com/appcelerator/hyperloop.next/pull/3
  2. Hans Knöchel 2016-02-28

    Reopening this issue, since it would break default hyperloop-based projects using hyperloop.next master. Please validate [~fokkezb], it might be related to leaving out [this](https://github.com/appcelerator/hyperloop.next/pull/3/files#diff-885c43ae7ca7944399f2103332eb9419L669) line.
  3. Fokke Zandbergen 2016-02-29

    Thanks [~hansknoechel], my fix mixed up async and async style Fix: https://github.com/appcelerator/hyperloop.next/pull/5
  4. Hans Knöchel 2016-02-29

    Approved, now working as expected! [~cng] The fix-version is 5.2.1, does this relate to the SDK or just for the QE to test?
  5. Chee Kiat Ng 2016-02-29

    A bit of both actually. but since hyper loop hasn't graduated from labs, I don't think QE has a test plan for this. So I'll remove the fixVersion for now til hyper loop becomes GA.
  6. Wilson Luu 2016-07-14

    Closing ticket as fixed. Verified that you can build a mobile project without any reference to Hyperloop, even though it's enabled for your project. Tested on: Appcelerator Studio, build: 4.7.0.201607130543 Appc CLI NPM: 4.2.7 Appc CLI Core: 5.4.0-33 Arrow: 1.8.2 SDK: 5.4.0.v20160713141635 Hyperloop: 1.2.3 Node: v4.4.7 OS: Mac OS X (10.11.5) Xcode: 7.3.1 Devices: iphone 6 plus (9.1)
  7. Brenton House 2017-03-28

    [~hansknoechel] -- I know this is marked as closed but we started seeing this 2.0.1 for a few different apps. The same apps did not have any problems when running 2.0.0. Unfortunately, it seems to happen randomly with no changes to the app. The only way to be sure it doesn't crash is to comment out the hyperloop references in tiapp.xml. {noformat} [DEBUG] Removing empty directories [INFO] Starting Hyperloop assembly [INFO] Skipping Hyperloop compile, no usage found ... [TRACE] Forcing regeneration of wrappers [DEBUG] Generating stubs 2017-03-28T21:45:09.325Z | ERROR | An uncaught exception was thrown! Cannot convert undefined or null to object 2017-03-28T21:45:09.326Z | ERROR | Cannot convert undefined or null to object Brentons-MacBook-Pro:titanium-template brenton$ clear && npm run build:ios {noformat}
  8. Eric Wieber 2017-03-29

    [~brentonhouse] I also encounter this with Hyperloop 2.0.1 and will be investigating it further. The error better matches AC-703, which was marked as a duplicate of this issue.
  9. Eric Wieber 2017-04-05

    Encountered this again during smoke tests. As mentioned, adding Hyperloop references or removing the module allows the project to build. [~hansknoechel], have you encountered this since its closing?
  10. Jan Vennemann 2017-04-07

    [~ewieber], this is indeed a regression in 2.0.1. This PR will prevent the error by stopping the Hyperloop compile process early if no usage found, so that the following steps won't be run with incomplete data which caused the error in this case. PR (master): https://github.com/appcelerator/hyperloop.next/pull/145 PR (2_0_X): https://github.com/appcelerator/hyperloop.next/pull/146
  11. Abir Mukherjee 2017-04-17

    Verified fix with the following environment: Node Version: 6.10.1 NPM Version: 3.10.10 Mac OS: 10.12.4 Appc CLI: 6.2.0 Appc CLI NPM: 4.2.9 Titanium SDK version: 6.0.3.GA Appcelerator Studio, build: 4.8.1.201612050850 Xcode 8.2.1 Hyperloop 2.1.0 iOS 10, and Android 6.0 Built to simulator/emulator and device, and found no errors for hyperloop-enabled apps with no hyperloop references.

JSON Source