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

Uncaught TypeError: Cannot read property 'then' of undefined #96

Open
desmeit opened this issue Jun 4, 2019 · 3 comments
Open

Uncaught TypeError: Cannot read property 'then' of undefined #96

desmeit opened this issue Jun 4, 2019 · 3 comments

Comments

@desmeit
Copy link

desmeit commented Jun 4, 2019

I get this error with android. what could the problem be?

@asoap
Copy link

asoap commented Jul 31, 2019

I just downloaded and tried this and had the same issue and I resolved it.

First the problem. The JS in the plugin isn't returning a promise. That's why it's returning undefined.

Look at this file on your computer: plugins\cordova-plugin-tts\www\tts.js

You'll notice it's much different to what is on GitHub. So what I did was delete everything in my plugin folder, downloaded this right from GitHub and replaced the files in my folder. I then had to remove android as a platform and re-add it in order to clear out cordova's cache. Then I ran cordova run android and it worked.

So essentially the issue is that when you run "cordova plugin add cordova-plugin-tts" you get the wrong files.

@markking79
Copy link

I can confirm your solution worked (on iOS anyways).

  1. cordova plugin add cordova-plugin-tts
  2. copy https://github.com/vilic/cordova-plugin-tts/blob/master/www/tts.js to /plugins/cordova-plugins-tts/www/tts.js
  3. cordova platform rm ios
  4. cordova platform add ios
  5. npm run build-dev-cordova-ios

@Fever905
Copy link

You could just add it right from github, like:

cordova plugins add https://github.com/vilic/cordova-plugin-tts.git

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