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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 9, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 9, 2026. It is now read-only.
Media Upload fails to upload image when leaving and coming back in #1928
changed the title [-]Gallery Upload fails to upload image[/-][+]Gallery Upload fails to upload image when leaving and coming back in[/+]on Feb 18, 2020
changed the title [-]Gallery Upload fails to upload image when leaving and coming back in[/-][+]Media Upload fails to upload image when leaving and coming back in[/+]on Feb 18, 2020
For me when the app was uploading a new page and a new image it was just hanging on the upload for a new page and never completing (waited for a few minutes). However, if I can fix this issue by:
Tap the image
Select Retry
Tap the image
Select Cancel
Back out to Site Pages
Then the page uploads successfully. Just revalidated a few flows and this looks like it's an issue on other media blocks as well not just gallery.
After performing the steps in the previous comment, in the notification center, I see the Uploading dialog for "1 page and 1 file."
To fix this apparent lock between the media uploader and the page publish, you can do one of the following:
Possible fixes are:
A) restart the phone
B) Click on the image and remove (either via remove on retry prompt or retry and cancel)
C) Loose network through airplane mode or wifi and get the network back. Then go back to site pages
Any of those seem to allow the page to upload successfully.
Also worth noting in the HTML view of the page, you'll see a local URL for the media. However, in my case, when I went to https://wordpress.com/media/{site name}, then I saw the image had successfully uploaded.
So far, I verified the bug was not in initially could not reproduce this Bug in WPAndroid release 14.1 but I could reproduce it in WPAndroid 14.2.
Looks like the new behavior actually started with the React Native upgrade (can reproduce on this commit, but not on the 14.1 release). Rather than running through those updates (too much :-P) to see what broke it, I'm just going to debug the upload code and see if we can get a fix.
In all cases, I observed the expected behavior for this flow, so perhaps there is some subtle difference in our actions to arrive at different results (or maybe some race condition)?
Here is a screencast of my test:
Can you see whether anything is different about the flow I used?
Hey @mkevins, In your gif, it looks like you might be creating a new post instead of a new page. Try creating a new page instead. In my testing posts were fine, but pages had problems.
Reality:
The post displays white screen until the upload is complete(the upload is observable on device's status bar only)
@mkevins@chipsnyder I definitely was seeing the issue with Posts also, and I think Pinar was too, unless the above was a mistype.
Still not sure why Matt is not producing the issue, his steps look the same as mine. I did have to switch to slower mobile network and larger photos to make sure I was not loading too fast when switching back and forth. But the loading bar in Matt's video seems to show that the image is still loading, so not sure why he is not seeing the issue.
Create a post and add a new image that must be uploaded
Exit the post editor
Reopen the post editor
Then
a. If the image uploads before I try to reopen the post in the editor: the image id and url update correctly
b. If the image uploads as the editor is opening: the image id and url do not update and the local id and local file path remain. This results in the retry upload dialog when you tap on the image. But my media library shows that the image uploaded successfully. In addition, exiting the post on mobile shows that the post is still a local draft. If I then exit to the main screen on the app and return to the posts screen, the post upload is initiated. Of course, since the post has the local media id and file url, it will not display properly on the web.
c. If the image uploads after the editor has reloaded the post: the image updates with the correct id and url once the upload completes.
In the scenario where the upload finishes after the post has been reopened in the editor (4c), I did not observe any UI indication that the upload was still in progress with image blocks. Gallery blocks, on the other hand, did have the upload progress bar as like in @mkevinscomment and gif.
I recreated this issue on the 14.1 release (the only other release I tested), so this does not appear to me to be a new regression.
I could not recreate this issue on iOS because iOS appears to block the user from reopening a post while it is in the process of being uploaded.
Activity
[-]Gallery Upload fails to upload image[/-][+]Gallery Upload fails to upload image when leaving and coming back in[/+]pinarol commentedon Feb 18, 2020
What happens when we dismiss the retry dialog? Does it complete successfully?
[-]Gallery Upload fails to upload image when leaving and coming back in[/-][+]Media Upload fails to upload image when leaving and coming back in[/+]chipsnyder commentedon Feb 18, 2020
For me when the app was uploading a new page and a new image it was just hanging on the upload for a new page and never completing (waited for a few minutes). However, if I can fix this issue by:
Then the page uploads successfully. Just revalidated a few flows and this looks like it's an issue on other media blocks as well not just gallery.
pinarol commentedon Feb 18, 2020
I can repro this with the same apk on Android(Huawei p20 lite, Android 9.0):
Expected:
Reality:
chipsnyder commentedon Feb 18, 2020
After performing the steps in the previous comment, in the notification center, I see the Uploading dialog for "1 page and 1 file."

To fix this apparent lock between the media uploader and the page publish, you can do one of the following:
Possible fixes are:
A) restart the phone
B) Click on the image and remove (either via remove on retry prompt or retry and cancel)
C) Loose network through airplane mode or wifi and get the network back. Then go back to site pages
Any of those seem to allow the page to upload successfully.
Also worth noting in the HTML view of the page, you'll see a local URL for the media. However, in my case, when I went to https://wordpress.com/media/{site name}, then I saw the image had successfully uploaded.
cameronvoell commentedon Feb 18, 2020
So far, I
verified the bug was not ininitially could not reproduce this Bug in WPAndroid release 14.1 but I could reproduce it in WPAndroid 14.2.Looks like the new behavior actually started with the React Native upgrade (can reproduce on this commit, but not on the 14.1 release). Rather than running through those updates (too much :-P) to see what broke it,I'm just going to debug the upload code and see if we can get a fix.mkevins commentedon Feb 19, 2020
Hi @chipsnyder 👋 ,
Thanks for testing this flow on the release. I was unable to reproduce this issue, following the same steps. I tried on:
12fbfd07886f166a5f710120c0619096037818d6w/ metro onvia Pixel 3a (Android 10).
In all cases, I observed the expected behavior for this flow, so perhaps there is some subtle difference in our actions to arrive at different results (or maybe some race condition)?
Here is a screencast of my test:
Can you see whether anything is different about the flow I used?
chipsnyder commentedon Feb 19, 2020
Hey @mkevins, In your gif, it looks like you might be creating a new post instead of a new page. Try creating a new page instead. In my testing posts were fine, but pages had problems.
cameronvoell commentedon Feb 19, 2020
@mkevins @chipsnyder I definitely was seeing the issue with Posts also, and I think Pinar was too, unless the above was a mistype.
Still not sure why Matt is not producing the issue, his steps look the same as mine. I did have to switch to slower mobile network and larger photos to make sure I was not loading too fast when switching back and forth. But the loading bar in Matt's video seems to show that the image is still loading, so not sure why he is not seeing the issue.
pinarol commentedon Feb 19, 2020
Right, I tried with a post as well.
mchowning commentedon Feb 19, 2020
I'm seeing the following in my testing:
a. If the image uploads before I try to reopen the post in the editor: the image id and url update correctly
b. If the image uploads as the editor is opening: the image id and url do not update and the local id and local file path remain. This results in the retry upload dialog when you tap on the image. But my media library shows that the image uploaded successfully. In addition, exiting the post on mobile shows that the post is still a local draft. If I then exit to the main screen on the app and return to the posts screen, the post upload is initiated. Of course, since the post has the local media id and file url, it will not display properly on the web.
c. If the image uploads after the editor has reloaded the post: the image updates with the correct id and url once the upload completes.
In the scenario where the upload finishes after the post has been reopened in the editor (4c), I did not observe any UI indication that the upload was still in progress with image blocks. Gallery blocks, on the other hand, did have the upload progress bar as like in @mkevins comment and gif.
I recreated this issue on the 14.1 release (the only other release I tested), so this does not appear to me to be a new regression.
I could not recreate this issue on iOS because iOS appears to block the user from reopening a post while it is in the process of being uploaded.
pinarol commentedon Jun 22, 2020
Should be resolved with associated PRs