- java.lang.RuntimeException: Failure delivering result ResultInfo #89
- Comments
- Gregliest commented Oct 22, 2016
- tbruyelle commented Oct 22, 2016
- Gregliest commented Oct 22, 2016
- tbruyelle commented Oct 24, 2016
- tarasantoshchuk commented Oct 24, 2016
- Gregliest commented Oct 24, 2016
- tbruyelle commented Oct 24, 2016
- epool commented Nov 24, 2016
- Android crash — Failure delivering result ResultInfo #37
- Comments
- makx commented Jan 10, 2020 •
- zsweigart commented Feb 24, 2020
- makx commented Feb 26, 2020
- zsweigart commented Feb 26, 2020
- vafada commented Mar 9, 2020
- Issue with activity being recreated when receiving file upload result #15
- Comments
- dzolnai commented Mar 17, 2015
- ocram commented Mar 17, 2015
- dzolnai commented Mar 18, 2015
- ocram commented Mar 18, 2015
- dzolnai commented Apr 16, 2015
- ocram commented Apr 17, 2015
- dzolnai commented Apr 27, 2015
- ocram commented Apr 28, 2015
- dzolnai commented Apr 28, 2015
- ocram commented Apr 29, 2015
- Android crash — Failure delivering result ResultInfo #37
- Comments
- makx commented Jan 10, 2020 •
- zsweigart commented Feb 24, 2020
- makx commented Feb 26, 2020
- zsweigart commented Feb 26, 2020
- vafada commented Mar 9, 2020
java.lang.RuntimeException: Failure delivering result ResultInfo #89
Comments
Gregliest commented Oct 22, 2016
It says in the readme that «the request must be done during an initialization phase.» Otherwise, «the user’s answer will never be emitted to the subscriber.» For my application, it doesn’t matter if some of the responses are dropped, so I’m experimenting with dispatching the permissions request from a non reactive event. However, I’m getting the exception thrown here
Here’s the stack trace:
Is there a workaround? Much appreciated!
The text was updated successfully, but these errors were encountered:
tbruyelle commented Oct 22, 2016
You can also have this kind of exception if you don’t follow the library guidelines.
Gregliest commented Oct 22, 2016
Thanks for the quick response. Yes, I’m going off the rails a little bit here. As I said, I don’t care if some of the responses get dropped if the activity gets recreated. Also, I’m triggering the permissions request from an event, and I can’t easily make the element reactive. I ran into this exception as I was experimenting with how RxPermissions would handle the permissions request in this case.
I read through #3, and I think that the tradeoff of flexibility (requiring the permissions request in the initialization) for completeness is perfectly reasonable, for cases where you need to guarantee that the result is emitted to the subscriber. However, it would also seem reasonable for the library to support cases where it doesn’t matter if the occasional request gets dropped. At least, I didn’t expect the library to crash. I also have no way to catch the exception and act on it, since it’s thrown completely internally to the library. Is there a way to emit the error to the observable?
tbruyelle commented Oct 24, 2016
We can’t emit an error precisely because we can’t find the subject for the requested permission.
tarasantoshchuk commented Oct 24, 2016
@Gregliest
can you post some code, where you’re requesting permissions?
we might be able to provide workaround for you
Gregliest commented Oct 24, 2016
I’m requesting permissions inside of an OnClickListener inside of a Dialog. The code itself is pretty generic, let me know if you actually want to see it. I’m testing by setting the developer option «Don’t keep activities», triggering the system permissions dialog, exiting the app, re-entering the app, and then clicking «allow».
I did a little more digging, since the system permissions dialog is popping up twice. The first dialog is attached to the old observable from the destroyed activity, and the second dialog must be spawned when the ShadowActivity gets recreated. The app crashes when I click allow on the second dialog.
tbruyelle commented Oct 24, 2016
Your code seems to gather all conditions to trigger the biggest flaw of this library : configuration change handling. As you read in #3 there’s no workaround, so we have the choice to follow the guidelines or to stop using RxPermissions .
epool commented Nov 24, 2016
@Gregliest you could try 0.9.0 to verify if that version fixes you problem.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Android crash — Failure delivering result ResultInfo #37
Comments
makx commented Jan 10, 2020 •
This error is thrown when i sign in using react-native-google-signin. The thing is that the error happens on
com.plaid.PlaidModule.onActivityResult(PlaidModule.kt:222)
.
if (data.extras != null) <
result.putMap(DATA, Arguments.makeNativeMap(data.extras)) // E/AndroidRuntime: FATAL EXCEPTION: main Process: com.eltonai, PID: 12251 java.lang.RuntimeException: Failure delivering result ResultInfo
The text was updated successfully, but these errors were encountered:
zsweigart commented Feb 24, 2020
Hi @makx what version of the sdk are you using? We just released version 3.0
makx commented Feb 26, 2020
zsweigart commented Feb 26, 2020
Can you upgrade to 3.0?
vafada commented Mar 9, 2020
This is also happening when logging in via facebook
Источник
Issue with activity being recreated when receiving file upload result #15
Comments
dzolnai commented Mar 17, 2015
At a small number of users I noticed that the system has to recreate the activity before delivering the result through onActivityResult(. ) . This means that also a new AdvancedWebView will be created, which won’t have the same mFileUploadCallbacks as the original one. Is there a way to persist these, that the WebView could receive them even if it gets recreated?
The text was updated successfully, but these errors were encountered:
ocram commented Mar 17, 2015
Thanks for pointing this out!
You can always persist such instances by storing the reference in your Application class that will only be destroyed if your whole app/process will be destroyed.
Apart from that, it might be sufficient to make the two members mFileUploadCallbackFirst and mFileUploadCallbackSecond static in AdvancedWebView . Could you try this?
If you can reproduce the behaviour of the Activity being destroyed before the result is delivered, you could test this — and if it works, we’ll adopt the change here.
The only downside would be that you won’t be able to have pending results in two Activity instances at the same time. Say you call startActivityForResult(. ) in one Activity which opens another app. Then you pause this app and open a new Activity in your app. There, you call startActivityForResult(. ) again. Now you’re waiting for two pending results but you will never be able to receive the first one because the second Activity has now overwritten the callback.
But I don’t think this will happen, usually.
dzolnai commented Mar 18, 2015
Good idea with the static variables. I can’t think of a use-case, where there could be two different pending upload callbacks (at least in my app), so I’ll make this change in our product. I’ll come back within a month when I can verify if this solution worked.
ocram commented Mar 18, 2015
Thanks, that would be great!
If it worked, we’ll definitely adopt the fix here 🙂
dzolnai commented Apr 16, 2015
Update: I deployed the fix (making the callbacks static), and issued an application update 2 weeks ago. We didn’t have crashes since then with this issue, so indeed it is a viable solution.
I also had to make the onActivityResult(. ) method static, because it accesses static variables.
ocram commented Apr 17, 2015
Thank you so much!
Good to hear that it worked. A few questions are still open, however. Could you help?
- When the AdvancedWebView is re-created because the containing Activity is re-created, is the file upload callback useful anymore? The WebView will go back to the start page, not the last page you were on and neither the last state and position you were in, right? Where will the selected file go to?
- Making onActivityResult(. ) static shouldn’t be necessary, as non-static methods can access static fields just fine. Only the other way round doesn’t work.
- Did you collect crash data with the Google Play Developer Console (where users report just 5% of crashes or less) or did you use a dedicated crash reporting service such as ACRA, Crashlytics etc. (where almost all crashes end up being reported)? If you use the first option, the crashes may still occur but just have been missed, right?
dzolnai commented Apr 27, 2015
|
Sorry for the late answer 🙂
ocram commented Apr 28, 2015
Okay, thanks for the clarification 🙂
Last thing (Promise!), could you somehow look up that old exception again? It would be useful to know what type of exception this was or in which lines it was caused. Of course, you can leave out all the lines from the stack trace that affect your private code.
Assuming the Activity (and thus the WebView ) is re-created, a NullPointerException is the most likely candidate for a crash. However, in onActivityResult(. ) , every variable is checked explicitly, so it’s not clear how an exception could be thrown there.
dzolnai commented Apr 28, 2015
Yes it was a NullPointerException because the WebView reference got nulled while the activity was re-created.
The stack trace was (replaced package name):
ocram commented Apr 29, 2015
Well, from these two lines, it seems the issue was in your own code. Could that actually be the case?
The two classes MainActivity and WebAppFragment are two of your own components extending Activity and Fragment , right?
So MainActivity.java:121 probably calls WebAppFragment . And in WebAppFragment.java:57 , what is there, or rather, was there (at the time of the error)? Any chance you can look this up?
Because from that code, it seems that your own class WebAppFragment has a NullPointerException in method deliverResult(. ) and more specifically on line 57 .
Источник
Android crash — Failure delivering result ResultInfo #37
Comments
makx commented Jan 10, 2020 •
This error is thrown when i sign in using react-native-google-signin. The thing is that the error happens on
com.plaid.PlaidModule.onActivityResult(PlaidModule.kt:222)
.
if (data.extras != null) <
result.putMap(DATA, Arguments.makeNativeMap(data.extras)) // E/AndroidRuntime: FATAL EXCEPTION: main Process: com.eltonai, PID: 12251 java.lang.RuntimeException: Failure delivering result ResultInfo
The text was updated successfully, but these errors were encountered:
zsweigart commented Feb 24, 2020
Hi @makx what version of the sdk are you using? We just released version 3.0
makx commented Feb 26, 2020
zsweigart commented Feb 26, 2020
Can you upgrade to 3.0?
vafada commented Mar 9, 2020
This is also happening when logging in via facebook
Источник