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

Error: PlatformException while using the library with FlutterFragment (Android) #27

Open
frqarshed opened this issue Aug 2, 2024 · 2 comments

Comments

@frqarshed
Copy link

I am getting below error while using the barcode scanner with FlutterFragment (works fine with FlutterActivity).

E  [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)
                                                                                                    #0      InstanceManagerHostApi.clear (package:camera_android_camerax/src/camerax_library.g.dart:315:7)
                                                                                                    <asynchronous suspension>
@ndusart
Copy link
Member

ndusart commented Aug 5, 2024

Hi @frqarshed ,

We are not used to projects embedding Flutter fragment in an Android Activity. Do you have a small project example that we can test on ?

Note that our plugin needs a reference to the Activity. So check that you didn't call .shouldAttachEngineToActivity(false) when creating the fragment.

@frqarshed
Copy link
Author

CameraTestExample.zip

@ndusart Attached is a minimum sample and steps to reproduce are mentioned in a text file.

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