Git Product home page Git Product logo

Comments (12)

g-apparence avatar g-apparence commented on May 22, 2024

Hi,
seems like a pretty easy scenario to reproduce.
Thank you for reporting it, will try it and fix it!

from camerawesome.

ak-cloud avatar ak-cloud commented on May 22, 2024

Stack overflow reference if you find the issue and solution https://stackoverflow.com/questions/65966286/flutter-android-app-crashes-on-all-devices

from camerawesome.

g-apparence avatar g-apparence commented on May 22, 2024

Seems like a good log, this will help.
Will try to fix this after lunch.

from camerawesome.

gautamenbake avatar gautamenbake commented on May 22, 2024

pls solve this

from camerawesome.

g-apparence avatar g-apparence commented on May 22, 2024

I'm on it ;)

from camerawesome.

g-apparence avatar g-apparence commented on May 22, 2024

I think you got a first crash log. I'm not pretty sure It's coming from camerAwesome or a conflict with two libs.
For now I can't reproduce it. Uninstalled the example and installed never crashed on Android 9/10.

Could you give me :

  • a complete log (which should be very long with another root cause stack trace)
  • try your code with a new blank project and share it so I can reproduce it

Also:

  • check you asked all permissions in your android manifest file:
    <uses-feature android:name="android.hardware.camera" android:required="true"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.FLASHLIGHT"/>
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  • check you configured build gradle with
compileSdkVersion 30
minSdkVersion 21
targetSdkVersion 30

from camerawesome.

liquidiert avatar liquidiert commented on May 22, 2024

Hey I have a related problem when using Permission Handler before using the camera the first time.
Here's my error log:

D/com.apparence.camerawesome.CamerawesomePlugin(11746): _handleCheckPermissions:
E/flutter (11746): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: Null check operator used on a null value
E/flutter (11746): #0      CameraAwesomeState.initPlatformState.<anonymous closure>
package:camerawesome/camerapreview.dart:188
E/flutter (11746): #1      _rootRunUnary (dart:async/zone.dart:1362:47)
E/flutter (11746): #2      _CustomZone.runUnary (dart:async/zone.dart:1265:19)
E/flutter (11746): #3      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
E/flutter (11746): #4      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
E/flutter (11746): #5      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
E/flutter (11746): #6      _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)
E/flutter (11746): #7      _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)
E/flutter (11746): #8      CamerawesomePlugin.listenPermissionResult.<anonymous closure>
package:camerawesome/camerawesome_plugin.dart:125
E/flutter (11746): #9      _HandlerEventSink.add (dart:async/stream_transformers.dart:209:17)
E/flutter (11746): #10     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)
E/flutter (11746): #11     _rootRunUnary (dart:async/zone.dart:1362:47)
E/flutter (11746): #12     _CustomZone.runUnary (dart:async/zone.dart:1265:19)
E/flutter (11746): #13     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
E/flutter (11746): #14     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
E/flutter (11746): #15     _DelayedData.perform (dart:async/stream_impl.dart:591:14)
E/flutter (11746): #16     _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11)
E/flutter (11746): #17     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:663:7)
E/flutter (11746): #18     _rootRun (dart:async/zone.dart:1346:47)
E/flutter (11746): #19     _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (11746): #20     _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter (11746): #21     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1202:23)
E/flutter (11746): #22     _rootRun (dart:async/zone.dart:1354:13)
E/flutter (11746): #23     _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (11746): #24     _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter (11746): #25     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1202:23)
E/flutter (11746): #26     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
E/flutter (11746): #27     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)

from camerawesome.

liquidiert avatar liquidiert commented on May 22, 2024

Ah think I found it! Line 188 of camera preview uses ! operator. I think ? would be a better choice in this case, cause otherwise one always has to implement a dummy onPermissionsResult.

from camerawesome.

g-apparence avatar g-apparence commented on May 22, 2024

Yes you are right, that's a null safety migration mistake!

from camerawesome.

g-apparence avatar g-apparence commented on May 22, 2024

You can create a pull request, we'll validate it right away

from camerawesome.

liquidiert avatar liquidiert commented on May 22, 2024

Awesome I created one!

from camerawesome.

g-apparence avatar g-apparence commented on May 22, 2024

Fixed this on 0.3.3

from camerawesome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.