-
Notifications
You must be signed in to change notification settings - Fork 116
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
Attempt to cast generated internal exception: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.ArrayList #41
Comments
This seems odd because the doc for |
So it looks this code path is a thing in AOSP. I'm trying to figure out why I've never seen this happen before... I have a feeling a bunch of email apps are going to stop working if I start passing an array in... |
I don't think it looks like AOSP at all. |
Well, it is in AOSP: It looks like it'll fail the cast, log the warning, and return null. So there won't be any body in the email. But I agree that we need more info about device and Android version and what not because I've never seen this happen on any device that I've used or people on my team have used. Something is different to get that code path to be executed. |
I'm integrating this as well have have the same issue. Though, unlike what you might expect, The email does have a body. I have a custom lens that simply adds a log file (written with my custom @Override protected Set<Uri> getAdditionalAttachments() {
return Collections.singleton(logFile);
} And the full log:
Seems to me like AOSP is trying to copy the attachments ( And, of course, my device info:
|
Hmm, notice how it's complaining about the I wonder if this is relevant from the Intent docs:
|
Updating my Lens to send a |
I think your log file being omitted is a separate issue (though a good one). The warning is still being logged for you so it doesn't sound like that fixed anything. |
You're correct. The missing log file was a different issue of mine. I haven't narrowed down the cause of the warning, but everything appears to be working as expected. |
While debugging app and also adding exception handling code as below, yet I am getting same exception: |
I’m able to reproduce this reliably with my Nexus 5X / API 24 emulator on Telescope 2.1. |
I'm also able to reproduce this. |
Happening with me right now, any fixes guys ? |
No fixes have been provided in this project as I still haven't experienced this and don't really understand why this is happening. If you're able to reproduce it, then please feel free to copy |
03-01 10:01:53.078 12936-12936/com.mattprecious.telescope.sample W/Bundle: Key android.intent.extra.TEXT expected ArrayList<CharSequence> but value was a java.lang.String. The default value <null> was returned. 03-01 10:01:53.078 12936-12936/com.mattprecious.telescope.sample W/Bundle: Attempt to cast generated internal exception: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.ArrayList at android.os.BaseBundle.getCharSequenceArrayList(BaseBundle.java:1067) at android.os.Bundle.getCharSequenceArrayList(Bundle.java:922) at android.content.Intent.getCharSequenceArrayListExtra(Intent.java:5471) at android.content.Intent.migrateExtraStreamToClipData(Intent.java:8173) at android.app.Instrumentation.execStartActivity(Instrumentation.java:1572) at android.app.Activity.startActivityForResult(Activity.java:3921) at android.app.Activity.startActivityForResult(Activity.java:3881) at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:784) at android.app.Activity.startActivity(Activity.java:4208) at android.app.Activity.startActivity(Activity.java:4176) at com.mattprecious.telescope.EmailLens.onCapture(EmailLens.java:71) at com.mattprecious.telescope.TelescopeLayout$SaveScreenshotTask.onPostExecute(TelescopeLayout.java:582) at com.mattprecious.telescope.TelescopeLayout$SaveScreenshotTask.onPostExecute(TelescopeLayout.java:543) at android.os.AsyncTask.finish(AsyncTask.java:651) at android.os.AsyncTask.-wrap1(AsyncTask.java) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5443) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
I am getting this error log here to long press with two finger:
https://goo.gl/9uRTkz
The text was updated successfully, but these errors were encountered: