-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
After open the camera i get "Illegal Argument Exception". #689
Comments
Getting same issue. Tried every possible way for it. But seems crashed inn native code. Please Help us in to that. Thank you |
Can someone let me know if the error goes away if Note that targeting API 28 won't be google play store compliant but will tell us if this is a problem introduced by an android API change. |
After add that still getting same error. |
Thanks for trying. We'll probably will require a Sample Reproduction App to move this issue along. |
Hi, I created a Sample Reproduction App as suggested by @breautek and to my surprise the plugin works fine. The only difference is the version of the plugin, in my project i have:
And the new one
i updated my project but it still doesn't work. Are there any plugin what interfere with camera plugin? the strange thing is that when I use the plugin to select an image from the gallery it works fine |
I suspect that latest plugin is getting same error with ionic 5 version. I do have same plugin in ionic 4 working fine. Can you confirm on that? |
@jonapachanga can you add a stacktrace? I am not sure if it is a Javascript exception or a native plugin exception. |
Might be following might help to identified issue: FYI: Permission for camera is given manually. First time camera permission was not asked and app is just crashed. Something really missing or crashed. |
Hey, I fixed by changed some code in CameraLauncher.java file but it's not proper as i did hardcoded there. in
here somehow in ionic 5 so for now i hard coded like following:
and bingo it's working. But we need proper solution to grab package id there it's not dynamic for now as i don't know it's ionic 5 issue or plugin code issue till now. :) Thank you |
that can be happened and missed packageID in my code either of following reasons:
Above might help you to identified issue. |
@naitikpatel1990 can you search for a BuildConfig class in your project? Like in my screenshot? Is it present in your project after building or during debugging? |
Is this issue still present. If it is not reproducable in a plain Cordova app, we won't be able to help. If the issue is solved, please close it. |
@naitikpatel1990 Is this issue still present. If it is not reproducable in a plain Cordova app, we won't be able to help and need to close this issue. If the issue is solved, please close it. |
Issue is not opened by me so i can't close it. Regarding issue i gave all possible ways i tried and it seems working for me. So not gonna make sample app and integrate as too much overloaded with other tasks for now. |
@naitikpatel1990 thanks for the info. Indeed you did not open this issue. @jonapachanga Is this issue still present with the latest camera version (v5.0.2)? If it is not reproducable in a plain Cordova app, we won't be able to help and need to close this issue. If the issue is solved, please close it. |
Issue is being closed due to missing reproduction cordova app. |
This worked for me but I figured out if you do this it will resolve it without having to hard-code the applicationId in:
|
Bug Report
This is my code. It's very simple, I tried on Android 9 and Android 10, Also i played with the different CameraOptions but always i get "Illegal Argument Exception"
Problem
What is expected to happen?
I have expected the camera open
What does actually happen?
Throw the error
Illegal Argument Exception
Information
The followings are part of my package.json
Environment, Platform, Device
I am running Ionic CLI 6.10.1 with Capacitor - Angular CLI 9.0.6
Version information
Checklist
The text was updated successfully, but these errors were encountered: