Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error packaging twilio-conversations in ember.js app with bower on ubuntu #8

Closed
wireframe opened this issue Mar 14, 2016 · 5 comments
Closed
Labels
Ember Issues related to Ember needs more information Issues that require more information to resolve, such as Room SIDs, SDK versions, etc.

Comments

@wireframe
Copy link

I know this is a pretty cryptic error message, but I've been able to isolate the issue to importing twilio-conversations#0.13.4 in my app. The application builds fine on OSX, but our build server w/ Ubuntu is blowing up with this error message.

not ok 1 PhantomJS 1.9 - Global error: Error: Could not find module `ember-resolver` imported from `frontend/resolver` at http://localhost:7357/assets/vendor.js, line 173
    ---
        Log: |
            { type: 'error',
              text: 'Error: Could not find module `ember-resolver` imported from `frontend/resolver` at http://localhost:7357/assets/vendor.js, line 173\n' }
    ...
not ok 2 PhantomJS 1.9 - Global error: Error: Assertion Failed: The tests file was not loaded. Make sure your tests index.html includes "assets/tests.js". at http://localhost:7357/assets/vendor.js, line 15822
    ---
        Log: |
            { type: 'error',
              text: 'Error: Assertion Failed: The tests file was not loaded. Make sure your tests index.html includes "assets/tests.js". at http://localhost:7357/assets/vendor.js, line 15822\n' }
@markandrus
Copy link
Contributor

Hi @wireframe, thanks for the report. I don't have much to go on based on "ember-resolver"—are there some additional logs you could share or repro steps?

Thanks,
Mark

@wireframe
Copy link
Author

Hey Mark,
I've been banging my head against a wall to isolate the root cause, but no luck thus far. The good news is that this error happens at build time, so it is fairly easy to reproduce by initializing a new ember app and just trying to require the twilio conversations library. no twilio connection/initialization or application specific logic needed.

@markandrus
Copy link
Contributor

Hey @wireframe, thanks for the info. I tried to reproduce, but I could not. Could you check my steps below?

  1. First, create a new Ember app:

    $ ember new twilio-conversations-ember-test
    version: 2.4.2
    Could not start watchman; falling back to NodeWatcher for file system events.
    Visit http://www.ember-cli.com/user-guide/#watchman for more info.
    installing app
      create .bowerrc
      create .editorconfig
      create .ember-cli
      create .jshintrc
      create .travis.yml
      create .watchmanconfig
      create README.md
      create app/app.js
      create app/components/.gitkeep
      create app/controllers/.gitkeep
      create app/helpers/.gitkeep
      create app/index.html
      create app/models/.gitkeep
      create app/resolver.js
      create app/router.js
      create app/routes/.gitkeep
      create app/styles/app.css
      create app/templates/application.hbs
      create app/templates/components/.gitkeep
      create bower.json
      create config/environment.js
      create ember-cli-build.js
      create .gitignore
      create package.json
      create public/crossdomain.xml
      create public/robots.txt
      create testem.js
      create tests/.jshintrc
      create tests/helpers/destroy-app.js
      create tests/helpers/module-for-acceptance.js
      create tests/helpers/resolver.js
      create tests/helpers/start-app.js
      create tests/index.html
      create tests/integration/.gitkeep
      create tests/test-helper.js
      create tests/unit/.gitkeep
      create vendor/.gitkeep
    Successfully initialized git.
    Installed packages for tooling via npm.
    Installed browser packages via Bower.
    
  2. Ensure initial tests pass:

    $ ember test
    Could not start watchman; falling back to NodeWatcher for file system events.
    Visit http://www.ember-cli.com/user-guide/#watchman for more info.
    Built project successfully. Stored in "/tmp/ember/twilio-conversations-ember-test/tmp/class-tests_dist-JhNjsuTR.tmp".
    ok 1 PhantomJS 2.1 - JSHint - app.js: should pass jshint
    ok 2 PhantomJS 2.1 - JSHint - helpers/destroy-app.js: should pass jshint
    ok 3 PhantomJS 2.1 - JSHint - helpers/module-for-acceptance.js: should pass jshint
    ok 4 PhantomJS 2.1 - JSHint - helpers/resolver.js: should pass jshint
    ok 5 PhantomJS 2.1 - JSHint - helpers/start-app.js: should pass jshint
    ok 6 PhantomJS 2.1 - JSHint - resolver.js: should pass jshint
    ok 7 PhantomJS 2.1 - JSHint - router.js: should pass jshint
    ok 8 PhantomJS 2.1 - JSHint - test-helper.js: should pass jshint
    
    1..8
    # tests 8
    # pass  8
    # skip  0
    # fail  0
    
    # ok
    
  3. Add twilio-conversations as a dependency:

    $ bower install twilio-conversations --save
    bower cached        git://github.com/twilio/twilio-conversations.js.git#0.13.2
    bower validate      0.13.2 against git://github.com/twilio/twilio-conversations.js.git#*
    bower new           version for git://github.com/twilio/twilio-conversations.js.git#*
    bower resolve       git://github.com/twilio/twilio-conversations.js.git#*
    bower download      https://github.com/twilio/twilio-conversations.js/archive/0.13.4.tar.gz
    bower extract       twilio-conversations#* archive.tar.gz
    bower resolved      git://github.com/twilio/twilio-conversations.js.git#0.13.4
    bower install       twilio-conversations#0.13.4
    
    twilio-conversations#0.13.4 bower_components/twilio-conversations
    
  4. Added an import of twilio-conversations to app/app.js:

    import Ember from 'ember';
    import Resolver from './resolver';
    import loadInitializers from 'ember-load-initializers';
    import config from './config/environment';
    
    // Import twilio-conversations
    import {Conversations} from 'twilio-conversations';
    
    // Suppress JSHint error
    void Conversations;
    
    let App;
    
    Ember.MODEL_FACTORY_INJECTIONS = true;
    
    App = Ember.Application.extend({
      modulePrefix: config.modulePrefix,
      podModulePrefix: config.podModulePrefix,
      Resolver
    });
    
    loadInitializers(App, config.modulePrefix);
    
    export default App;
  5. Re-ran tests:

    $ ember test
    version: 2.4.2
    Could not start watchman; falling back to NodeWatcher for file system events.
    Visit http://www.ember-cli.com/user-guide/#watchman for more info.
    Built project successfully. Stored in "/tmp/ember/twilio-conversations-ember-test/tmp/class-tests_dist-FERjeSmz.tmp".
    ok 1 PhantomJS 2.1 - JSHint - app.js: should pass jshint
    ok 2 PhantomJS 2.1 - JSHint - helpers/destroy-app.js: should pass jshint
    ok 3 PhantomJS 2.1 - JSHint - helpers/module-for-acceptance.js: should pass jshint
    ok 4 PhantomJS 2.1 - JSHint - helpers/resolver.js: should pass jshint
    ok 5 PhantomJS 2.1 - JSHint - helpers/start-app.js: should pass jshint
    ok 6 PhantomJS 2.1 - JSHint - resolver.js: should pass jshint
    ok 7 PhantomJS 2.1 - JSHint - router.js: should pass jshint
    ok 8 PhantomJS 2.1 - JSHint - test-helper.js: should pass jshint
    
    1..8
    # tests 8
    # pass  8
    # skip  0
    # fail  0
    
    # ok
    

Is there something else about the way you use twilio-conversations?

Thanks,
Mark

EDIT: Granted, this was on OS X. I'll need to retry on Ubuntu, but before I do, can you confirm whether these steps should be sufficient to trigger the failure? Or do I need to do something with the resolver?

@markandrus markandrus added the needs more information Issues that require more information to resolve, such as Room SIDs, SDK versions, etc. label May 20, 2016
@markandrus markandrus added the Ember Issues related to Ember label Oct 25, 2016
@markandrus
Copy link
Contributor

@wireframe can you please retry with twilio-video.js? We've made a number of improvements to get twilio-video.js bundling cleanly with Angular, React, and Meteor apps. Perhaps this solves your issue?

Thanks,
Mark

@wireframe
Copy link
Author

thanks for the update @markandrus

we are no longer evaluating twilio for webrtc support, but if we revisit it in the future, i'll open a new issue if we encounter any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ember Issues related to Ember needs more information Issues that require more information to resolve, such as Room SIDs, SDK versions, etc.
Projects
None yet
Development

No branches or pull requests

2 participants