Comments (12)
Hi,
seems like a pretty easy scenario to reproduce.
Thank you for reporting it, will try it and fix it!
from camerawesome.
Stack overflow reference if you find the issue and solution https://stackoverflow.com/questions/65966286/flutter-android-app-crashes-on-all-devices
from camerawesome.
Seems like a good log, this will help.
Will try to fix this after lunch.
from camerawesome.
pls solve this
from camerawesome.
I'm on it ;)
from camerawesome.
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.
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.
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.
Yes you are right, that's a null safety migration mistake!
from camerawesome.
You can create a pull request, we'll validate it right away
from camerawesome.
Awesome I created one!
from camerawesome.
Fixed this on 0.3.3
from camerawesome.
Related Issues (20)
- [Question] Implement latest changes HOT 2
- PhotoTaken event? HOT 2
- Problems taking photo HOT 3
- Feature Request: Option to Set Maximum Image Size HOT 4
- Can't build the project with AGP8 HOT 1
- Wrong ratio, no padding on the last version 2.0.0+1 HOT 6
- Camera uses wrong orientation on tablets - Android AND iOS HOT 11
- onMediatap not triggered (v2.0.0+1 ) HOT 6
- Landscape HOT 4
- previewAlignment not working HOT 5
- onImageForAnalysis prevents video recording on iOS HOT 8
- Automatic flash malfunction on Android 13 HOT 4
- Access denied finding property "vendor.camera.aux.packagelist" when I updated to camerawesome 2.0.0+1 and video camera doesn't work HOT 4
- Unhandled platform exception 'int' is not a subtype of type 'double' HOT 1
- obsolete kotlin version HOT 1
- Glide package error
- Cant setup with flutterflow HOT 2
- Problem with scan area overlay / google ml kit HOT 1
- Change AwesomeCameraModeSelector text HOT 1
- Realtime Chroma-key HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camerawesome.