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

java.lang.IllegalArgumentException at getVoices:172 #13

Open
whitmer opened this issue Jun 7, 2017 · 3 comments
Open

java.lang.IllegalArgumentException at getVoices:172 #13

whitmer opened this issue Jun 7, 2017 · 3 comments

Comments

@whitmer
Copy link

whitmer commented Jun 7, 2017

I have a user on a Galaxy Tab 4 getting the following exception. I can't reproduce it on my Tab 4, or any other device, but I'm thinking about adding a try catch block outside that line so the app at least won't crash on them. I'm not smart enough to know what's really going on :-/.

java.lang.IllegalArgumentException:
at android.os.Parcel.readException(Parcel.java:1544)
at android.os.Parcel.readException(Parcel.java:1493)
at android.speech.tts.ITextToSpeechService$Stub$Proxy.getVoices(ITextToSpeechService.java:796)
at android.speech.tts.TextToSpeech$15.run(TextToSpeech.java:1667)
at android.speech.tts.TextToSpeech$15.run(TextToSpeech.java:1664)
at android.speech.tts.TextToSpeech$Connection.runAction(TextToSpeech.java:2310)
at android.speech.tts.TextToSpeech.runAction(TextToSpeech.java:747)
at android.speech.tts.TextToSpeech.runAction(TextToSpeech.java:737)
at android.speech.tts.TextToSpeech.getVoices(TextToSpeech.java:1664)
at org.apache.cordova.speech.SpeechSynthesis.getVoices(SpeechSynthesis.java:172)
at org.apache.cordova.speech.SpeechSynthesis.onInit(SpeechSynthesis.java:258)
at android.speech.tts.TextToSpeech.dispatchOnInit(TextToSpeech.java:820)
at android.speech.tts.TextToSpeech.access$1500(TextToSpeech.java:59)
at android.speech.tts.TextToSpeech$Connection$SetupConnectionAsyncTask.onPostExecute(TextToSpeech.java:2224)
at android.speech.tts.TextToSpeech$Connection$SetupConnectionAsyncTask.onPostExecute(TextToSpeech.java:2179)
at android.os.AsyncTask.finish(AsyncTask.java:632)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6134)
at java.lang.reflect.Method.invoke(Native Method:0)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)

@arsen91
Copy link

arsen91 commented Jul 24, 2018

I have the same issue with our users. Galaxy Tab3 7.0 on Android 4.4

Any plans to fix or merge this workaround?

@arsen91
Copy link

arsen91 commented Aug 3, 2018

In case anyone would ever need to support older Android on Samsungs here is our fork with the fixed issue on older Android versions (last 3 commits from me). The problem occurs only on Android 4.0.0 - 5.1.0 where users have both text to speech engines: Samsung and Google. Samsung is chosen as a default one and it breaks the app, since it doesn't have certain methods. The fix actually is to check if Google TTS is installed and use it in the application, otherwise just ignore the code that fails. It still speaks and seems to work fine when we ignore broken methods.

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

2 participants