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

Vibration native not working #106

Closed
idesignpixels opened this issue Apr 4, 2016 · 9 comments
Closed

Vibration native not working #106

idesignpixels opened this issue Apr 4, 2016 · 9 comments

Comments

@idesignpixels
Copy link

Getting error "TypeError: Cannot read property 'apply' of undefined" from browser_adapter.ts

Also getting in browser, can't interface with plugin.

@ihadeed
Copy link
Collaborator

ihadeed commented Apr 6, 2016

Can you please provide me with a way to reproduce this issue? as well as the setup you are using (Platform, Framework .. etc)

@idesignpixels
Copy link
Author

Hi yes my system info is:

Cordova CLI: 6.0.0
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.1
Ionic Version: 2.0.0-beta.3
Ionic CLI Version: 2.0.0-beta.23
Ionic App Lib Version: 2.0.0-beta.13
ios-deploy version: 1.8.4
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v5.4.1
Xcode version: Xcode 7.3 Build version 7D175

Using ios @mhartington reproduced with the same issue, simply downloading the plugin, then
import {Vibration} from 'ionic-native';
private test() { Vibration.vibrate(1000); }

@idesignpixels
Copy link
Author

Also noticed this error in my terminal on building, could be related?
✗ TypeScript error: /./././node_modules/angular2/src/facade/promise.d.ts(1,10): Error TS2661: Cannot re-export name that is not defined in the module.

@ihadeed
Copy link
Collaborator

ihadeed commented Apr 6, 2016

@Lindstrom1989 What version of Angular 2 are you using?

@idesignpixels
Copy link
Author

2.0.0-beta.6

@ihadeed
Copy link
Collaborator

ihadeed commented Apr 6, 2016

Upgrade to beta.7 or later and that should solve the problem.

@idesignpixels
Copy link
Author

Nope still getting "ERROR: ORIGINAL EXCEPTION: TypeError: undefined is not an object (evaluating 'util_1.get(window, pluginObj.pluginRef)[methodName].apply')" on my end.

@tlancina
Copy link
Contributor

tlancina commented Apr 6, 2016

It looks like the plugin defines only the vibrate function on window.navigator, @ihadeed are there any other plugins like this? I can't think of an easy way to fix this off the top of my head other than setting the pluginRef to just navigator, which seems weird.

@ihadeed
Copy link
Collaborator

ihadeed commented Apr 11, 2016

@tlancina I see the problem now. The plugin ref is incorrect. I think this is the only plugin that works this way.

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

3 participants