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

Getting fatal on iOS emulator #19

Closed
budde377 opened this issue Feb 23, 2022 · 5 comments
Closed

Getting fatal on iOS emulator #19

budde377 opened this issue Feb 23, 2022 · 5 comments
Labels
bug Something isn't working
Milestone

Comments

@budde377
Copy link

When mounting the widget with

    return MobileScanner(
      key: _qrKey,
      controller: _controller,
      onDetect: (b, a) => widget.onQRViewCreated(b),
    );

I'm getting the fatal error, which crashes the app:

mobile_scanner/SwiftMobileScannerPlugin.swift:177: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

This happens on version 0.1.1.

@juliansteenbakker juliansteenbakker added the bug Something isn't working label Feb 23, 2022
@juliansteenbakker juliansteenbakker added this to the 0.1.2 milestone Feb 23, 2022
@juliansteenbakker
Copy link
Owner

Do you have any information about the device that you are using?

@juliansteenbakker
Copy link
Owner

The error is happening because the camera could not be loaded.
I have made some changes to the plugin. Can you please check using the latest code using this in your pubspec.yaml:

mobile_scanner:
git:
url: https://github.com/juliansteenbakker/mobile_scanner
ref: master

@myoganugraha
Copy link
Contributor

myoganugraha commented Feb 23, 2022

@juliansteenbakker
debug on android, when flash is set on torch mode and close the page with navigator pop, the flash still remain
even open the scanner screen again, the flash indicator was off, but the flash still on torch mode

and the screen was blank because
I[/flutter]() ( 7098): MobileScanner: Called start() while already started!

mobile_scanner: 
    git:
      url: https://github.com/juliansteenbakker/mobile_scanner
      ref: master

Google Pixel 3, Android 12
Flutter 2.2.3, Dart 2.12

@budde377
Copy link
Author

@juliansteenbakker. That makes sense! The emulator doesn't have a camera. The master branch prevents the fatal, thank you for your help!

@juliansteenbakker
Copy link
Owner

@myoganugraha Can you please create a new issue with this information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants