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

RxImagePicker with Camera crashes #63

Open
imayank91 opened this issue Jul 2, 2019 · 1 comment
Open

RxImagePicker with Camera crashes #63

imayank91 opened this issue Jul 2, 2019 · 1 comment

Comments

@imayank91
Copy link

Request

        RxImagePicker.with(fragmentManager!!).requestImage(Sources.CAMERA).subscribe {
            CropImage.activity(it).start(activity!!)

Description
No camera permission has been added to the manifest.

I am using kotlin with androidx Fragment

Error

  io.reactivex.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | Permission Denial: starting Intent { act=android.media.action.IMAGE_CAPTURE flg=0x3 cmp=com.android.camera2/com.android.camera.CaptureActivity clip={text/uri-list U:content://media/external/images/media/130} (has extras) } from ProcessRecord{832fd42 28288:com.app.spectrum/u0a135} (pid=28288, uid=10135) with revoked permission android.permission.CAMERA
        at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
        at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
        at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:77)
        at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:67)
        at io.reactivex.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:308)
        at io.reactivex.subjects.PublishSubject.onNext(PublishSubject.java:228)
        at com.mlsdev.rximagepicker.RxImagePicker.onAttach(RxImagePicker.kt:76)
        at androidx.fragment.app.Fragment.performAttach(Fragment.java:2582)
        at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:821)
        at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1228)
        at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1293)
        at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:439)
        at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManagerImpl.java:2066)
        at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1856)
        at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1811)
        at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManagerImpl.java:1717)
        at androidx.fragment.app.FragmentManagerImpl$2.run(FragmentManagerImpl.java:150)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: java.lang.SecurityException: Permission Denial: starting Intent { act=android.media.action.IMAGE_CAPTURE flg=0x3 cmp=com.android.camera2/com.android.camera.CaptureActivity clip={text/uri-list U:content://media/external/images/media/130} (has extras) } from ProcessRecord{832fd42 28288:com.app.spectrum/u0a135} (pid=28288, uid=10135) with revoked permission android.permission.CAMERA
        at android.os.Parcel.createException(Parcel.java:1942)
        at android.os.Parcel.readException(Parcel.java:1910)
        at android.os.Parcel.readException(Parcel.java:1860)
        at android.app.IActivityManager$Stub$Proxy.startActivity(IActivityManager.java:3755)
        at android.app.Instrumentation.execStartActivity(Instrumentation.java:1669)
        at android.app.Activity.startActivityForResult(Activity.java:4586)
        at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:676)
        at androidx.core.app.ActivityCompat.startActivityForResult(ActivityCompat.java:234)
        at androidx.fragment.app.FragmentActivity.startActivityFromFragment(FragmentActivity.java:796)
        at androidx.fragment.app.FragmentActivity$HostCallbacks.onStartActivityFromFragment(FragmentActivity.java:933)
        at androidx.fragment.app.Fragment.startActivityForResult(Fragment.java:1210)
        at androidx.fragment.app.Fragment.startActivityForResult(Fragment.java:1198)
        at com.mlsdev.rximagepicker.RxImagePicker.pickImage(RxImagePicker.kt:161)
2019-07-02 16:53:28.157 28288-28288/com.app.spectrum E/AndroidRuntime:     at com.mlsdev.rximagepicker.RxImagePicker.access$pickImage(RxImagePicker.kt:23)
        at com.mlsdev.rximagepicker.RxImagePicker$requestPickImage$1.accept(RxImagePicker.kt:125)
        at com.mlsdev.rximagepicker.RxImagePicker$requestPickImage$1.accept(RxImagePicker.kt:23)
        at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:63)
        	... 20 more
     Caused by: android.os.RemoteException: Remote stack trace:
        at com.android.server.am.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java:1788)
        at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:717)
        at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:544)
        at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1099)
        at com.android.server.am.ActivityStarter.execute(ActivityStarter.java:486)
@imayank91
Copy link
Author

imayank91 commented Jul 5, 2019

Looks like the camera permission is again removed. Seems like a regression.

It was added here d6830f4
doesn't exist anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant