canelmas / let

Annotation based simple API flavored with AOP to handle new Android runtime permission model
Apache License 2.0
530 stars 40 forks source link

Request a permission causes a crash in Android O #22

Closed waninkoko closed 6 years ago

waninkoko commented 6 years ago

According to some crash reports I'm receiving, there is an issue happening in Android O when a method annotated with @AskPermission is called.

This is the crash stacktrace:

Fatal Exception: com.canelmas.let.LetException: Proceeding with the annotated method failed!
       at com.canelmas.let.RuntimePermissionRequest.proceed(RuntimePermissionRequest.java:139)
       at com.canelmas.let.RuntimePermissionRequest.proceed(RuntimePermissionRequest.java:52)
       at com.canelmas.let.LetAspect.ajc$inlineAccessMethod$com_canelmas_let_LetAspect$com_canelmas_let_RuntimePermissionRequest$proceed(LetAspect.java:1)
       at com.canelmas.let.LetAspect.annotatedMethods(LetAspect.java:57)

EDIT: This happens only if the permissions is granted. Looks like the crash happens when the library tries to invoke the method.

canelmas commented 6 years ago

@waninkoko hey,

is this the whole stacktrace? May your annotated method be throwing any runtimexception?

I've tested the library within an app with O, everything seemed ok.

waninkoko commented 6 years ago

@canelmas I just copied the relevant part of the stacktrace (the next call in the stack would be the annotated method).

I have received a new crash report where looks like the method is actually throwing a RuntimeException. I hope to come back with good news asap.

waninkoko commented 6 years ago

Confirmed that the crash was due to an exception in the annotated method. Sorry for the false alarm!