Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20210] Hyperloop Android: Requested module not found error

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionInvalid
Resolution Date2016-02-12T17:13:22.000+0000
Affected Version/sRelease 5.1.1
Fix Version/sn/a
ComponentsAndroid, Hyperloop
Labelsandroid, hyperloop
ReporterAndrey Tkachenko
AssigneeChristopher Williams
Created2016-01-01T17:15:31.000+0000
Updated2017-03-20T21:36:00.000+0000

Description

Can’t to use hyperloop module.
var View = require('android.view.View');
I got error:
Error: Requested module not found: android.view.View
https://community.appcelerator.com/topic/4419/i-can-t-use-hyperloop-require-error

Comments

  1. Sharif AbuDarda 2016-01-04

    Hello, I tried to reproduce the issue. I wasn't able to reproduce the issue when I used 'var View = require('android.view.View');'. The statement is working as expected. I tried with the [example project](https://s3-us-west-2.amazonaws.com/appc-labs-server/downloads/hyperloop-examples.zip) provided [here](http://labs.appcelerator.com/project/55f74a9f421c44837717716b/Hyperloop-Module). The project is working fine.

    Tested Environment

    Ti sdk 6.0.0.v20151228134127 hyperloop 1.1.0 beta, appc cli 5.1.0 Android 4.4.2 Please provide a sample code which regenerate the issue. Also, please provide the full error log. Thanks.
  2. Andrey Tkachenko 2016-01-04

    This example project also not work for me. Can you provide to me steps for find source of my problem?
  3. Sharif AbuDarda 2016-01-05

    Hello, Please provide the full code you are trying to run. The Hyperloop Module will now give you direct access to the native APIs. Please follow the instruction on the [video](http://labs.appcelerator.com/project/55f74a9f421c44837717716b/Hyperloop-Module) about how to use hyperloop module. There is a [blog](http://www.appcelerator.com/blog/2013/10/introducing-hyperloop/) post on the module. Also here is our [Git repository](https://github.com/appcelerator/hyperloop). Thanks.
  4. Andrey Tkachenko 2016-01-05

  5. Sharif AbuDarda 2016-01-06

    Hello, Hyperloop is working fine with Liveview flag enabled in Android. I just tested again the example project. The project is working fine with Liveview enabled.

    Tested Environment

    Ti sdk 6.0.0.v20151228134127 hyperloop 1.1.0 beta, appc CLI 5.1.0 Android Device 4.4.2 Node.js Version 4.2.2 npm Version 2.14.7 CLI Version 5.0.5 Try using SDK 6.0.0.v20151228134127. Thanks.
  6. Andrey Tkachenko 2016-01-06

    Hi again. Examples project is not working if Liveview flag enabled in Android. https://yadi.sk/i/qeQZvu-MmhrQd *Tested Environment*
       hyperloop 1.1.0 beta
       Ti SDK 6.0.0.v20160106002328
       Operating System
         Name                        = Mac OS X
         Version                     = 10.10.5
         Architecture                = 64bit
         # CPUs                      = 4
         Memory                      = 16.0GB
       
       Node.js
         Node.js Version             = 4.2.2
         npm Version                 = 2.14.7
       
       Appcelerator CLI
         Installer                   = 4.2.2
         Core Package                = 5.1.0
       
       Titanium CLI
         CLI Version                 = 5.0.5
         node-appc Version           = 0.2.31
       
    Tested on Genymotion 4.2.2/4.4.2 Working fine without liveview flag enabled.
  7. Sharif AbuDarda 2016-01-07

    Hello, Here is my test result with liveview enabled. http://postimg.org/image/on2qocvoz/ Examples project is working when Liveview flag enabled in Android. The difference I see is, in the package.json file the version is "version": "1.0.1". This is the same [project](https://s3-us-west-2.amazonaws.com/appc-labs-server/downloads/hyperloop-examples.zip) in [here](http://labs.appcelerator.com/project/55f74a9f421c44837717716b/Hyperloop-Module). I additionally add the module version 1.1.0 for Android which you can see in the module tag in tiapp.xml.

    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                 = 6.0.0.v20151228134127
         SDK Path                    = /Users/gsl001/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20151228134127
         Target Platform             = android
       
       Command
         /usr/local/bin/node /Users/gsl001/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/bin/titanium build --platform android --log-level trace --sdk 6.0.0.v20151228134127 --project-dir /Users/gsl001/Downloads/hyperloop-examples --target emulator --android-sdk /Users/gsl001/Documents/android-sdk-macosx --device-id Google Nexus 7 - 5.1.0 - API 22 - 800x1280 --skip-js-minify --liveview --deploy-type development --no-colors --no-progress-bars --no-prompt --prompt-type socket-bundle --prompt-port 52989 --plugin-paths /Users/gsl001/.appcelerator/install/5.1.0/package/node_modules --config-file /var/folders/gw/3ksrznsd21v_bdlfq6ww1l080000gn/T/build-1452146275205.json --no-banner
       [INFO] :   Found Titanium module id=hyperloop version=1.1.0 platform=android deploy-type=development path=/Users/gsl001/Downloads/hyperloop-examples/modules/android/hyperloop/1.1.0
       [INFO] :   Found Titanium plugin id=ti.alloy version=1.0 
       [INFO] :   Found Titanium plugin id=hyperloop version=latest 
       [INFO] :   Deploy type: development
       [INFO] :   Building for target: emulator
       [INFO] :   Building for emulator: Google Nexus 7 - 5.1.0 - API 22 - 800x1280
       [INFO] :   Targeting Android SDK API: 23
       
    Tested on Genymotion emulator Google Nexus 7 - 5.1.0 - API 22 - 800x1280. Working fine with liveview flag enabled. Thanks.
  8. Andrey Tkachenko 2016-01-07

    Do you tried select any item from example app? Link to the Hyperloop module that you pointed contains plugin version 1.1.0. Can you try install both parts from module package (module and plugin)?
  9. Christopher Williams 2016-02-12

    [~falko] We don't officially support live view plus hyperloop at the same time yet. It may or may not work, we haven't tried and validated it yet, honestly. Is the original issue still happening? Is there a new issue here? The original issue looks like it may be invalid and likely stems from adding the module but not adding the plugin to tiapp.xml.
  10. Andrey Tkachenko 2016-02-12

    *Tested Environment* Ti Sdk 6.0.0.v20160211194748 Hyperloop 1.1.0 beta appc CLI 5.1.0 Android Device 4.2.2 Node.js Version 4.2.2 npm Version 2.14.7 CLI Version 5.0.5 Appcelerator Studio, build: 4.4.0.201511241829 Fresh project and fresh install hyperloop through Studio. Hyperloop: Plugin version 1.1.0 Module version 1.1.0 Liveview: *disabled* Project type: Alloy Test code from original message. *Part of tiapp.xml:*
        <modules>
                <module platform="android">hyperloop</module>
                <module platform="iphone">hyperloop</module>
            </modules>
            <sdk-version>6.0.0.v20160211194748</sdk-version>
            <plugins>
                <plugin version="1.0">ti.alloy</plugin>
            </plugins>
        
    *Result:*
        [ERROR] :  V8Exception: Exception occurred at ti:/module.js:280: Uncaught Error: Requested module not found: android.view.View
        
  11. Andrey Tkachenko 2016-02-12

    *Tested Environment* Ti Sdk 6.0.0.v20160211194748 Hyperloop 1.1.0 beta appc CLI 5.1.0 Android Device 4.2.2 Node.js Version 4.2.2 npm Version 2.14.7 CLI Version 5.0.5 Appcelerator Studio, build: 4.4.0.201511241829 Fresh project and fresh install hyperloop through Studio. Hyperloop: Plugin version 1.1.0 Module version 1.1.0 Liveview: *disabled* Project type: Alloy Test code from original message. *Result:*
        [ERROR] :  V8Exception: Exception occurred at ti:/module.js:280: Uncaught Error: Requested module not found: android.view.View
        
     I added this line by hand to the tiapp.xml:
        <plugin version="1.0">hyperloop</plugin>
        
    *Result:* OK Then run with Liveview enabled. *Result:*
        [ERROR] :  Error: Requested module not found: android.view.View
        [ERROR] :  File: app.js
        [ERROR] :  Line: undefined
        [ERROR] :  SourceId: undefined
        [ERROR] :  Backtrace:
        [ERROR] :  undefined
        
  12. Andrey Tkachenko 2016-02-12

    *Tested Environment* Ti Sdk 6.0.0.v20160211194748 Hyperloop 1.1.0 beta appc CLI 5.1.0 Android Device 4.2.2 Node.js Version 4.2.2 npm Version 2.14.7 CLI Version 5.0.5 Appcelerator Studio, build: 4.4.0.201511241829 Fresh project and fresh install hyperloop through Studio. Hyperloop: Plugin version 1.1.0 Module version 1.1.0 Liveview: *disabled* Project type: Alloy Test code from original message. *Result:*
        [ERROR] :  V8Exception: Exception occurred at ti:/module.js:280: Uncaught Error: Requested module not found: android.view.View
        
     I added this line by hand to the tiapp.xml:
        <plugin version="1.0">hyperloop</plugin>
        
    *Result:* OK BTW I was made mistake with version of plugin but it runned successful. Then run with Liveview enabled. *Result:*
        [ERROR] :  Error: Requested module not found: android.view.View
        [ERROR] :  File: app.js
        [ERROR] :  Line: undefined
        [ERROR] :  SourceId: undefined
        [ERROR] :  Backtrace:
        [ERROR] :  undefined
        
  13. Christopher Williams 2016-02-12

    Ok, so it sounds like the resulted from an invalid setup at first where the plugin tag for hyperloop wasn't in the tiapp.xml, resulting in having no hyperloop javascript wrappers being generated. Once added it worked fine. Then when you turned on live view, it broke? That's not entirely unexpected - again hyperloop module is still in beta and we have made no effort yet to check compatibility with liveview. It's on our list of things to take a look at. So using both at the same time isn't yet supported.
  14. Christopher Williams 2016-02-12

    Ok, so since the original ticket appears to be from an invalid setup, I'm going to mark this ticket as invalid. I've opened up a new ticket to support usage of hyperloop with liveview in TIMOB-20394 and add [~falko] as a watcher to it.
  15. Andrey Tkachenko 2016-02-12

    Ok thank you.
  16. Lee Morris 2017-03-20

    Closing ticket as invalid.

JSON Source