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

Failed to install 'com.tokbox.cordova.opentok':Error: Uh oh! #147

Closed
albanonm opened this issue Feb 24, 2015 · 8 comments
Closed

Failed to install 'com.tokbox.cordova.opentok':Error: Uh oh! #147

albanonm opened this issue Feb 24, 2015 · 8 comments

Comments

@albanonm
Copy link

Hi, I cant install the opentok plugin, but I can other plugins. I execute:

cordova plugin remove com.tokbox.cordova.opentok
cordova plugin add https://github.com/songz/cordova-plugin-opentok/

And I get the following error:

Failed to install 'com.tokbox.cordova.opentok':Error: Uh oh!
cannot find "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/plugins/com.tokbox.cordova.opentok/src/ios/OpenTok.framework" ios
at module.exports.framework.install (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/ios.js:135:48)
at Object.ActionStack.process (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/action-stack.js:70:25)
at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:567:20)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:322:20
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:574:44
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:415:13)
Error: Uh oh!

@aullman
Copy link
Collaborator

aullman commented Feb 24, 2015

It seems like the SDK isn't being downloaded. There is a script that is supposed to run when you install the plugin that downloads and expands the OpenTok iOS SDK. The script assumes you're on a unix based machine though because it calls out to the shell and executes the tar command. Are you on a Mac? Did you see the message "Downloading OpenTok iOS SDK"? What happens if you try to manually run scripts/downloadiOSSDK.js ?

You can probably just manually download and untar the opentok SDK.

  1. Download it from https://s3.amazonaws.com/artifact.tokbox.com/rel/ios-sdk/OpenTok-iOS-2.4.0.tar.bz2
  2. Untar the file tar -zxvf ./opentok-ios-sdk-2.4.0.tar.bz2
  3. Move the OpenTok.framework file into the right place. mv ./OpenTok-iOS-2.4.0/OpenTok.framework plugins/com.tokbox.cordova.opentok/src/ios/

@albanonm
Copy link
Author

Hi @aullman , I am on Mac, but I previously used the plugin without problems. The error is also happening with your 64 bits adapted project (it is my target now). I was looking for same error on internet but I hadn't notice. All others plugins installers (like PushPlugin) seems to be ok.

When I execute manually downloadiOSSDK.js on command line it does nothing (node ./xxx/downloadiOSSDK.js), just show console prompt again.

I was tried manually download of opentok SDK. After move Opentok.framework I had executed plugin install and now it finishes installation without errors.

Now the problem are when I try to use video service, I get the errors:
[ ]Will attempt to use file resource 'default'
[ ]Unknown resource 'default'

This is due to a duplicate OpenTok.framework on project library. If I delete one, I get "OpenTokPlugin" not found. I repeated all the installation and received not found again. I added all frameworks that project required manually but 'OpenTokPlugin' not found again.

I only update OpenTokPlugin, this application has been running by several months with previously plugin installation, so I think anything is my bad on my OpenTokPlugin installation. It is frustrating.

@aullman
Copy link
Collaborator

aullman commented Feb 25, 2015

Sorry for the frustrations. Yes, executing the download file manually won't work, it needs to be executed in the context of the cordova application, sorry about that. I'm glad downloading things manually seemed to work.

It sounds though like your xcode project is messed up. Have you tried removing the ios platform and adding it again to start your xcode project all over again? ie.

cordova platform remove ios
cordova platform add ios

@albanonm
Copy link
Author

I finally took a deep breath and start a new project, and that was my solution. Its not take me a long time, I apply your tip of manually copy OpenTok SDK and all libraries seems to be ok. I hope this help to another users.

Thank you very much!!

@aullman
Copy link
Collaborator

aullman commented Mar 1, 2015

Great to hear.

@aullman aullman closed this as completed Mar 1, 2015
@vozax
Copy link

vozax commented Apr 13, 2015

Can't we pre-add the SDK instead of downloading so if we use Phonegap Build it not show this error ?

@aullman
Copy link
Collaborator

aullman commented Apr 13, 2015

That's how it used to be but then the SDK got so big it exceeded the maximum file size for Github.

@saurabh0908
Copy link

Even I got the same error after spending some time I realized that home directory has space in it "OpenTok App" so it was not able to move downloaded "OpenTok.framework" to ios directory. Changed my project to OpenTokApp without space and installation worked like a charm.

Looks like frameworkDir created from context.opts.plugin.dir in script does not take care of whitespace of home directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants