-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
IllegalStateException: Drag shadow dimensions must be positive #10492
IllegalStateException: Drag shadow dimensions must be positive #10492
Comments
90-day impact: ~16 per day https://sentry.io/share/issue/2ae8f76166ec4b4f9e144906d6611fb3/ Possibly related: https://stackoverflow.com/questions/52073822/illegalstateexception-drag-shadow-dimensions-must-be-positive |
Sentry issue: WORDPRESS-ANDROID-3VJ |
90-day impact: ~22 per day 90-day impact: ~3 per day |
90-day impact: ~33 per day 90-day impact: ~4 per day |
After some investigation, one possible cause for this issue is drag and drop of text in editor. I found one known report of this issue when a line break is selected, and you try to drag it. I was not able to reproduce this, unfortunately. |
It appears these lines in Aztec editor could be causing this issue. As this issue is limited to: 99% Android 9, it could be Android platform specific issue. Found related issues in Android Issue Tracker: These issues were reproducible in Android 9 Pie only. They were accepted by Google, fixed and told to be available in a future build.
|
I searched for For Sentry Issue WORDPRESS-ANDROID-3T2—the issue from the search results with the largest number of users affected—64 events have been tracked for this crash in 14.6.1 since it was released 9d ago on Apr 22. |
I searched for 220 events have been tracked for crash WORDPRESS-ANDROID-3T2 in 14.7 and 14.7.1 since they were released 15d and 4d ago respectively. Events in the last 90d: 7,800 |
It seems this issue is also present in Android 10 (so far ~ 76% Android 9, 23% Android 10). Also, this issue seems to occur in both Aztec and Gutenberg editors. JS snippet to examine editor usePasted in browser console in sentry: // query API for events
let events = await fetch('https://sentry.io/api/0/issues/1135692615/events/?full=1').then(raw => raw.json()); Then, to examine editor usage for the various events: // get editor counts
events.map(({entries: [,,{data: {values}}]}) =>
values.map(({message}) =>
message.includes('editor_session_start')
? message.includes('classic')
? 'aztec'
: message.includes('gutenberg')
? 'gutenberg'
: undefined
: undefined
).filter(editor => editor)
).reduce((sum, editors) =>
!! editors.length
? editors.every(editor => editor === 'gutenberg')
? {...sum, gutenberg: sum.gutenberg + 1}
: editors.every(editor => editor === 'aztec')
? {...sum, aztec: sum.aztec + 1}
: {...sum, mixed: sum.mixed + 1}
: sum
, {gutenberg: 0, aztec: 0, mixed: 0}); Which gave: Finally, I searched for "Dropped" in the breadcrumb messages, but did not find this log entry: // look for Dropped log
events.map(({entries: [,,{data: {values}}]}) =>
values.map(({message}) =>
message.includes('Dropped')
? message
: undefined
).filter(message => message)
); I attempted to reproduce this by several combinations of drag and drop, including having newlines at the beginnings and endings of the dragged text, as well as dropping to positions before and after newlines. I also tried various combinations of dragging images, rich text, and mixed content, with and without the soft keyboard visible, and in both Aztec and Gutenberg editors. I have not been able to reproduce this issue, however I did notice something odd while trying (via Pixel 3 XL API 28 emulator): when I dragged a clip of text, the caret position seemed to be "scaled down", i.e. it remained at a fraction of the x and y values from where I expected it to be: Also, when I dragged newlines from a textarea (using split screen with Chrome open), the newlines appeared as escaped characters, instead of actual newlines, or |
A 90d graph of results for The majority of those appear to be in this Sentry issue: Events in the last 90d: 8,500 |
A 90d graph of results for The majority of those appear to be in this Sentry issue: Events in the last 90d: 9,100 |
Ok so by looking into one of the logs collected in Sentry I could see one of the crashes on Aztec happened shortly after an image failed to upload (also, there's a bug there we need to check: the image they tried to upload was a .webp image which is unsupported in FluxC and as such it will always fail, will open a separate issue on this). So I figured given the crash was a few seconds after the failure, I'd imagine the user would go and try open the Post with the failed image to see what happened, and trying to tap retry or doing something with or around the boundaries of the image. So that's what I started looking for, and was able to reproduce 3 times already on a Pixel 3 XL API 29 emulator 🎉 , here's a video (crash happens towards the end) https://cloudup.com/cd_D1uIwAX8 Steps to reproduce (first, make sure to set "use block editor" to off for your test site):
Been reading the issues mentioned here by @ashiagr and it seems the issue has been fixed on the platform side. I wonder if we can workaround it so, I'm investigating a bit further how the OnDragListener works. Ideally, I'm hoping to be able to provide our own ShadowBuilder for drag operations started from within Aztec, but so far this seems to be all internal to the view. Will continue investigating an I'll update here with what I can find. |
Re: this:
Opened issue here #12822 |
Sentry Issue: WORDPRESS-ANDROID-3T2
The text was updated successfully, but these errors were encountered: