csdcorp / speech_to_text

A Flutter plugin that exposes device specific text to speech recognition capability.
BSD 3-Clause "New" or "Revised" License
351 stars 218 forks source link

MissingPluginException conflict with other plugin #39

Closed niypoo closed 4 years ago

niypoo commented 4 years ago

My app access on database in backend mode after user terminated app, after update that issue show up to me

MissingPluginException(No implementation found for method getDatabasesPath on channel com.tekartik.sqflite) I tested all solutions I know and I found in internet but I found nothing so I have disabled plugin one by one until speech_to_text : 0.8.0 after that database work great and issue has disappear .

i'm work on flutter 1.2

niypoo commented 4 years ago

I have edit on GeneratedPluginRegistrant.java from

com.csdcorp.speech_to_text.SpeechToTextPlugin.registerWith(shimPluginRegistry.registrarFor("com.csdcorp.speech_to_text.SpeechToTextPlugin"));
 flutterEngine.getPlugins().add(new com.tekartik.sqflite.SqflitePlugin());

to

    flutterEngine.getPlugins().add(new com.tekartik.sqflite.SqflitePlugin());
com.csdcorp.speech_to_text.SpeechToTextPlugin.registerWith(shimPluginRegistry.registrarFor("com.csdcorp.speech_to_text.SpeechToTextPlugin"));

and it's working but every build flutter reset older to old one and I have to move speech register to last one.

I don't know why nut I did that to help you about where is this issue , thanks

sowens-csd commented 4 years ago

That definitely shouldn't be necessary. I use the sqflite plugin and speech to text in a couple of my own projects without problem. I assume you've contacted the sqflite folks as well?

niypoo commented 4 years ago

no I didn't contacted the sqflite folks , any idea ?

sowens-csd commented 4 years ago

What version of Flutter and sqflite are you using?

sowens-csd commented 4 years ago

I see it looks like there's a good response on https://github.com/tekartik/sqflite/issues/382, hopefully that resolves your issue. Please let me know.

niypoo commented 4 years ago

What version of Flutter and sqflite are you using?

speech_to_text: ^0.8.0 sqflite: ^1.2.0 Flutter 1.12.13+hotfix.8 • channel stable • https://github.com/flutter/flutter.git Framework • revision 0b8abb4724 (3 weeks ago) • 2020-02-11 11:44:36 -0800 Engine • revision e1e6ced81d Tools • Dart 2.7.0

sowens-csd commented 4 years ago

Did the response on tekartik/sqflite#382 resolve the issue?

niypoo commented 4 years ago

tekartik/sqflite#382 no not resolve , already my app using android new embedding v2 ,

sowens-csd commented 4 years ago

It looks to me from their response that they do understand the issue and have resolved it for other users. I think you should keep following up over there. I have just posted a revision to the repo for a range of other issues. You could certainly try it but I doubt that it would change anything for you.

niypoo commented 4 years ago

Unfortunately , I have tested everything even I have disabled every plugin , speech_to_text case this issue in headless mode in android when disabled it the app working as expected in headless mode

niypoo commented 4 years ago

I will explain where is the issue appear case , they are working together as great but I use background_fetch to handle some stuff in background , when I terminated my app and background feating some data here the issue occurred , here this issue happened and when I disabled your package or re-sort the registed packages in GeneratedPluginRegistrant.java the issue disappear

sowens-csd commented 4 years ago

So you never see a problem unless you have the speech_to_text plugin installed? The problem goes away if you comment out speech_to_text from your dependencies?

What happens if you have the speech_to_text plugin as a dependency but never call the initialize() method? Do you still see the problem?

niypoo commented 4 years ago

Yes. ّI will try that but called initialize() in specific event taping so I didn't call it in init or main function , but I will try it to sure.

niypoo commented 4 years ago

So you never see a problem unless you have the speech_to_text plugin installed? The problem goes away if you comment out speech_to_text from your dependencies?

What happens if you have the speech_to_text plugin as a dependency but never call the initialize() method? Do you still see the problem?

yes I just add speech_to_text and didn't initialize it and the issue appear again .

niypoo commented 4 years ago

is this plugin support new android embedding , ! I don't found any solution for now .

niypoo commented 4 years ago

Hello , @sowens-csd , How are you today, ! I hope you well , please see last comment in that issue https://github.com/tekartik/sqflite/issues/382

It seems SpeechToText is not supporting embedding v2 yet (SpeechToText requires an activity upon registration hence the crash).

sowens-csd commented 4 years ago

That's really helpful, thank you! I'll do that migration and let you know as soon as it's done.

niypoo commented 4 years ago

yeah , I'm waiting for this update , thanks

sowens-csd commented 4 years ago

I just pushed a large update that switches to the new plugin APIs. If you could try the repo version that would be really helpful. Thanks!

niypoo commented 4 years ago

I just pushed a large update that switches to the new plugin APIs. If you could try the repo version that would be really helpful. Thanks!

Okay , I will test new commit from repo version and I will inform you .

niypoo commented 4 years ago

@sowens-csd Everything looks great , final this issue has been fixed , and I'm still testing and if I found anything I will inform you.

niypoo commented 4 years ago

Everything seems good

sowens-csd commented 4 years ago

Great news. Thanks for letting me know. I'll wrap this up into a release version as soon as a couple of other outstanding issues are resolved.