-
-
Notifications
You must be signed in to change notification settings - Fork 532
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
!!! Android error on start: called start() while already started #539
Comments
You can do the trick by reloading camera with this code,
its not recommended, but its working in my case |
Add
|
In my case I did
|
It also reproduces when hitting Hot Restart on the screen with MobileScanner and navigating back to it |
@juliansteenbakker MobileScannerException: code genericError, message: Called start() while already started. |
same issue |
Any progress @juliansteenbakker ? |
same |
We are seeing the same issue on iOS. Adding controller.stop() to initState does not resolve the issue. |
Have you tried this? While I definitelly think instantiating a new controller everytime isn't the prettiest I ended up using the same workaround as the user who wrote the comment. Works fine for me. Maybe this can help? I am still hoping this is getting fixed anytime soon though. |
This should no longer occur with the new beta, version 5.0.0-beta.1 , as the lifecycle is now no longer managed by |
I've been fighting with this issue for the last two hours in the version 5.0.0-beta.2. |
I am aware that we should handle hot reload better, we have a tracking issue for that specifically: I still need to figure out if we can intercept it internally, or provide users with guidance around the use of |
In my case, users were navigated to a new page that includes the scanner but when i do this back-and-forth navigation multiple times i was getting this error in debug console: so i have updated For example:
However, this change only works for targeting |
After some update recently - wether it was Android 13 QPR 2 (March Pixel update) or Flutter 3.7.7 on first camera initialization I get this error. In Example app it also happens. Did not check on other devices. I also guess that something related to it causes a crash from time to time when disabling/enabling camera.
ℹ️ Environment:
✅ Steps to reproduce:
💡 Actual result:
👍 Expected result:
The text was updated successfully, but these errors were encountered: