Wordpress-android: Delay in displaying images from the phone

Created on 21 Sep 2020  路  11Comments  路  Source: wordpress-mobile/WordPress-Android

Expected behavior

The images from the phone should be displayed immediately

Actual behavior

We need to wait for a few seconds for the images from the phone to get listed on the screen

Steps to reproduce the behaviour

  1. In the post/page editor, add an image block
  2. Choose option add image > choose from device.
  3. You will need to wait for a few seconds(~10 seconds) to get the images from the phone listed on the screen.
Tested on OnePlus 6, Android 10, WPAndroid 15.7-rc-4
Media Performance [Pri] Blocking [Type] Enhancement

All 11 comments

I'm able to replicate this on OPPO Reno 4, Android 10, WPAndroid 15.7-rc-4.

Tested the same steps on Huawei Nova 2i, Android 8, WPAndroid 15.6 but the photos on device appear almost immediately.

Thanks for the report @tarunvijwani!

I tested using my Pixel 3 device as a quick check from my side. I feel my connection speed is pretty decent and am wondering how yours compares! Here are the results of my test and I'll note that I'm already on to the 15.8 beta and I tested with 3 different site types: WordPress.com Free, WP 5.5.1 Jetpack 8.9, and WP 5.5.1 Self-hosted (no plugins).

Video: 6m34s

Tested with WPAndroid 15.8-rc-1 on Pixel 3 Android 11.

It would be very helpful to know a few additional details if possible:

  1. When you say you need to wait ~10s for an image to show up in an image block after adding it, is the image placeholder completely blank for you during that ~10s or does the image appear right away with a dark overlay and you were expecting it to appear without the dark overlay?
  2. What type of site did you test with: WordPress.com, Jetpack, or Self-hosted?
  3. Can you go to https://fast.com/ (or similar site) and measure your internet connection speed, including the latency which shows when you tap the "Additional Info" button and then report the results of the speed, upload speed, latency unloaded and latency loaded (perhaps include a screenshot)?
  4. If this bug reported was made in response to user feedback, could you please include a shorthand reference code for that report? You can find out about shorthand links in the Field Guide or ping me on Slack if you're not sure. If you are reporting this just from your own experience, then ignore this question and thank you for testing our apps!

I was also curious about the age of the device you tested with because we have been discussing editor-related performance issues for older devices recently, and I found that the OnePlus 6 was unveiled on 16 May 2018 and went on sale on 22 May 2018 according to WikiPedia.

Thank you for testing @reginabally!

Is there any chance I could get you to test this again by adding a few images in the editor and checking how fast they appear using the OPPO Reno 4 with 15.8-rc-1 instead of 15.7-rc-4?

May I assume you did your tests with OPPO Reno 4 and the Huawei Nova 2i both over WiFi and both using the same network?

Happy to test again, @designsimply!

Please check out this video recording on OPPO Reno 4 with 15.8-rc-1: https://d.pr/v/JESvbA

And yes, the tests for OPPO Reno 4 and the Huawei Nova 2i are both over WiFi and the same network. I've attached a screenshot of the speed test of my network:

Screenshot_2020-09-25-12-36-59-97_3aea4af51f236e4932235fdada7d1643

Thank you for the video! I can see that as soon as you tapped "Choose from device" it took about 5s for images from the phone to appear on the OPPO Reno 4 device.

I tried testing again with my Pixel 3 and found that the images showed up very quickly for me before and after clearing the app cache and local storage. (1m21s)

I checked how much space my Photos app is using on my Pixel 3 device (which is working fine) and I found 136 MB user data and 253 MB cache is being used right now. To find this info, I long-pressed the Photos app icon, tapped the info icon that appeared, and then tapped on the Storage & cache option to see the details:

Screenshot_20200929-113220

Tested with WPAndroid 15.8-rc-1 on Pixel 3 Android 11.

A couple of new reports and also some more info from HE testing below:

Ticket 3348229-zen
Site: https://saida.tv/ - self-hosted
Device Samsung Note 8
App version 15.7
Android 11

Ticket 3350798-Zen
Site: https://khamnews.com - Self-hosted
Device: User did not come back with this info yet
App Version: 15.7
Android: not provided yet

Also tested on my own devices:

Pixel 2
Android 11
App version 15.8 rc1
Site 1234hetrialtest.wordpress.com (wp.com Personal Plan) and https://rossana.blog (AT site)
Delay of about 30 seconds

Pixel 3
Android 11
App version 15.8 rc1
Site 1234hetrialtest.wordpress.com (wp.com Personal Plan) and https://rossana.blog (AT site) with no delay at all

Both pixel phones share the same library

Also, from Eric's tests:

Sony M5 Dual (E5663) - Android 6.0
15.5 and 15.6 both shows the images immediately
15.7 there are ~3 seconds delay.
700+ images in the device

Oppo F1 Plus - Android 5.1
15.6 shows the images immediately
15.7 there are ~10-15 seconds delay
1850+ images in the device

Oppo F7 Pro - Android 10
15.6 images appear immediately
15.7 ~25-50 seconds delay
Almost ~15000 images in the device with ~9800 from Camera

Steps to reproduce:

  1. Open a blog post
  2. Type the plus sign to add a block
  3. Select an image block
  4. Click on Add Image
  5. Select the option Choose from Device

The user from 3348229 has replied back with the logs. These lines look suspicious:

84 - [Sep-29 14:58 STATS] 馃數 Tracked: editor_button_tapped, Properties: {"editor":"aztec","button":"image"}
85 - [Sep-29 14:58 POSTS] Photo picker > can't refresh when not added


Full set of app logs from the user with some data removed

WordPress - 15.7 - Version code: 924
Android device name: Samsung SM-N950F

01 - [Sep-29 14:58 POSTS] User explicitly confirmed changes. Post Title: *** REDACTED ***
02 - [Sep-29 14:58 API] Dispatching action: PostAction-UPDATE_POST
03 - [Sep-29 14:58 API] Dispatching action: ListAction-LIST_DATA_INVALIDATED
04 - [Sep-29 14:58 POSTS] PostUploadHandler - UPLOAD. Post: *** REDACTED ***
05 - [Sep-29 14:58 API] Dispatching action: PostAction-PUSH_POST
06 - [Sep-29 14:58 POSTS] No custom fields found for post.
07 - [Sep-29 14:58 POSTS] No custom fields found for post.
08 - [Sep-29 14:58 POSTS] No custom fields found for post.
09 - [Sep-29 14:58 API] long type could be misinterpreted when sent to the WordPress XMLRPC end point
10 - [Sep-29 14:58 STATS] 馃數 Tracked: editor_closed
11 - [Sep-29 14:58 API] long type could be misinterpreted when sent to the WordPress XMLRPC end point
12 - [Sep-29 14:58 API] long type could be misinterpreted when sent to the WordPress XMLRPC end point
13 - [Sep-29 14:58 UTILS] trackLastActivity, activityId: My Site
14 - [Sep-29 14:58 PROFILING] Visual Editor Startup: begin
15 - [Sep-29 14:58 PROFILING] Visual Editor Startup: 0 ms, EditorFragment.onCreate
16 - [Sep-29 14:58 PROFILING] Visual Editor Startup: 141514 ms, WPMainActivity.onResume
17 - [Sep-29 14:58 PROFILING] Visual Editor Startup: end, 141514 ms
18 - [Sep-29 14:58 UTILS] SnackbarSequencer > New item added
19 - [Sep-29 14:58 UTILS] SnackbarSequencer > invoking start()
20 - [Sep-29 14:58 UTILS] SnackbarSequencer > prepareSnackBar message [Your post is uploading]
21 - [Sep-29 14:58 UTILS] SnackbarSequencer > before delay
22 - [Sep-29 14:58 API] WhatsNewStore: fetchWhatsNew
23 - [Sep-29 14:58 STATS] 馃數 Tracked: editor_session_end, Properties: {"has_unsupported_blocks":"0","editor":"classic","content_type":"new","session_id":"*** REDACTED ***","post_type":"post","blog_type":"core","editor_has_hw_disabled":"0","outcome":"save"}
24 - [Sep-29 14:58 UTILS] SnackbarSequencer > after delay
25 - [Sep-29 14:58 UTILS] SnackbarSequencer > item removed from the queue
26 - [Sep-29 14:58 UTILS] SnackbarSequencer > finishing start()
27 - [Sep-29 14:58 API] Dispatching action: UploadAction-PUSHED_POST
28 - [Sep-29 14:58 API] Dispatching action: PostAction-PUSHED_POST
29 - [Sep-29 14:58 API] long type could be misinterpreted when sent to the WordPress XMLRPC end point
30 - [Sep-29 14:58 API] long type could be misinterpreted when sent to the WordPress XMLRPC end point
31 - [Sep-29 14:58 API] Dispatching action: PostAction-FETCHED_POST
32 - [Sep-29 14:58 API] Dispatching action: ListAction-LIST_DATA_INVALIDATED
33 - [Sep-29 14:58 STATS] The passed blog obj is null or it's not a wpcom or Jetpack. Tracking analytics without blog info
34 - [Sep-29 14:58 STATS] 馃數 Tracked: editor_post_published, Properties: {"editor_source":"aztec","with_categories":true,"word_count":175,"post_id":7767,"has_gutenberg_blocks":false,"post_type":"post","post_format":"standard","with_photos":true,"has_wp_stories_blocks":false}
35 - [Sep-29 14:58 POSTS] PostUploadHandler > Completed
36 - [Sep-29 14:58 MAIN] UploadService > Completed
37 - [Sep-29 14:58 MAIN] UploadService > Destroyed
38 - [Sep-29 14:58 UTILS] SnackbarSequencer > New item added
39 - [Sep-29 14:58 UTILS] SnackbarSequencer > invoking start()
40 - [Sep-29 14:58 UTILS] SnackbarSequencer > prepareSnackBar message [Post published]
41 - [Sep-29 14:58 UTILS] SnackbarSequencer > before delay
42 - [Sep-29 14:58 STATS] The passed blog obj is null or it's not a wpcom or Jetpack. Tracking analytics without blog info
43 - [Sep-29 14:58 STATS] 馃數 Tracked: editor_post_created, Properties: {"created_post_source_detail":"post-from-my-site","post_type":"post","created_post_source":"post-list"}
44 - [Sep-29 14:58 UTILS] trackLastActivity, activityId: Post Editor
45 - [Sep-29 14:58 STATS] The passed blog obj is null or it's not a wpcom or Jetpack. Tracking analytics without blog info
46 - [Sep-29 14:58 STATS] 馃數 Tracked: editor_opened, Properties: {"has_gutenberg_blocks":false,"post_type":"post","editor_has_hw_disabled":"0"}
47 - [Sep-29 14:58 STATS] 馃數 Tracked: editor_session_start, Properties: {"has_unsupported_blocks":"0","editor":"classic","content_type":"new","startup_time_ms":237,"session_id":"*** REDACTED ***","post_type":"post","blog_type":"core","editor_has_hw_disabled":"0","unsupported_blocks":[]}
48 - [Sep-29 14:58 API] Dispatching action: SiteAction-FETCH_POST_FORMATS
49 - [Sep-29 14:58 API] Dispatching action: SiteAction-FETCH_SITE_EDITORS
50 - [Sep-29 14:58 API] Dispatching action: SiteAction-FETCH_POST_FORMATS
51 - [Sep-29 14:58 API] long type could be misinterpreted when sent to the WordPress XMLRPC end point
52 - [Sep-29 14:58 API] Dispatching action: TaxonomyAction-FETCH_CATEGORIES
53 - [Sep-29 14:58 API] long type could be misinterpreted when sent to the WordPress XMLRPC end point
54 - [Sep-29 14:58 API] long type could be misinterpreted when sent to the WordPress XMLRPC end point
55 - [Sep-29 14:58 API] Dispatching action: PostAction-FETCH_REVISIONS
56 - [Sep-29 14:58 API] Dispatching action: PostAction-UPDATE_POST
57 - [Sep-29 14:58 API] Dispatching action: PostAction-FETCH_REVISIONS
58 - [Sep-29 14:58 API] Dispatching action: ListAction-LIST_DATA_INVALIDATED
59 - [Sep-29 14:58 API] Volley error on https://public-api.wordpress.com/rest/v1.1/sites/0/post/0/diffs/?locale=en_US - exception: null
60 - [Sep-29 14:58 API] StackTrace: com.android.volley.ClientError
at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:199)
at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:131)
at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111)
at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90)

61 - [Sep-29 14:58 API] Dispatching action: PostAction-FETCHED_REVISIONS
62 - [Sep-29 14:58 API] An error occurred while fetching History revisions
63 - [Sep-29 14:58 API] Volley error on https://public-api.wordpress.com/rest/v1.1/sites/0/post/0/diffs/?locale=en_US - exception: null
64 - [Sep-29 14:58 API] StackTrace: com.android.volley.ClientError
at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:199)
at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:131)
at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111)
at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90)

65 - [Sep-29 14:58 API] Dispatching action: PostAction-FETCHED_REVISIONS
66 - [Sep-29 14:58 API] An error occurred while fetching History revisions
67 - [Sep-29 14:58 UTILS] SnackbarSequencer > after delay
68 - [Sep-29 14:58 UTILS] SnackbarSequencer > item removed from the queue
69 - [Sep-29 14:58 UTILS] SnackbarSequencer > finishing start()
70 - [Sep-29 14:58 API] Dispatching action: SiteAction-FETCHED_POST_FORMATS
71 - [Sep-29 14:58 API] Dispatching action: TaxonomyAction-FETCHED_TERMS
72 - [Sep-29 14:58 API] Dispatching action: SiteAction-FETCHED_POST_FORMATS
73 - [Sep-29 14:58 POSTS] Post formats successfully fetched!
74 - [Sep-29 14:58 SETTINGS] Post formats successfully fetched!
75 - [Sep-29 14:58 POSTS] Post formats successfully fetched!
76 - [Sep-29 14:58 SETTINGS] Post formats successfully fetched!
77 - [Sep-29 14:58 SETTINGS] Post formats successfully fetched!
78 - [Sep-29 14:58 SETTINGS] Post formats successfully fetched!
79 - [Sep-29 14:58 EDITOR] EditPostRepository: Transaction is writing on a locked thread [dalvik.system.VMStack.getThreadStackTrace(Native Method), java.lang.Thread.getStackTrace(Thread.java:1538), org.wordpress.android.ui.posts.EditPostRepository.reportTransactionState(EditPostRepository.kt:148), org.wordpress.android.ui.posts.EditPostRepository.access$reportTransactionState(EditPostRepository.kt:35), org.wordpress.android.ui.posts.EditPostRepository$updateAsync$1.invokeSuspend(EditPostRepository.kt:118), kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33), kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56), android.os.Handler.handleCallback(Handler.java:873), android.os.Handler.dispatchMessage(Handler.java:99), android.os.Looper.loop(Looper.java:214), android.app.ActivityThread.main(ActivityThread.java:7073), java.lang.reflect.Method.invoke(Native Method), com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494), com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)]
80 - [Sep-29 14:58 API] Dispatching action: PostAction-UPDATE_POST
81 - [Sep-29 14:58 API] Dispatching action: ListAction-LIST_DATA_INVALIDATED
82 - [Sep-29 14:58 API] Dispatching action: PostAction-UPDATE_POST
83 - [Sep-29 14:58 API] Dispatching action: ListAction-LIST_DATA_INVALIDATED
84 - [Sep-29 14:58 STATS] 馃數 Tracked: editor_button_tapped, Properties: {"editor":"aztec","button":"image"}
85 - [Sep-29 14:58 POSTS] Photo picker > can't refresh when not added
86 - [Sep-29 14:58 API] Dispatching action: PostAction-REMOVE_POST
87 - [Sep-29 14:58 EDITOR] Post had no unsaved changes when exiting the editor.
88 - [Sep-29 14:58 API] Dispatching action: ListAction-LIST_ITEMS_REMOVED
89 - [Sep-29 14:58 STATS] 馃數 Tracked: editor_closed
90 - [Sep-29 14:58 UTILS] trackLastActivity, activityId: My Site
91 - [Sep-29 14:58 PROFILING] Visual Editor Startup: begin
92 - [Sep-29 14:58 PROFILING] Visual Editor Startup: 0 ms, EditorFragment.onCreate
93 - [Sep-29 14:58 PROFILING] Visual Editor Startup: 7979 ms, WPMainActivity.onResume
94 - [Sep-29 14:58 PROFILING] Visual Editor Startup: end, 7979 ms
95 - [Sep-29 14:58 API] WhatsNewStore: fetchWhatsNew
96 - [Sep-29 14:58 STATS] 馃數 Tracked: editor_session_end, Properties: {"has_unsupported_blocks":"0","editor":"classic","content_type":"new","session_id":"*** REDACTED ***","post_type":"post","blog_type":"core","editor_has_hw_disabled":"0","outcome":"cancel"}
97 - [Sep-29 14:58 STATS] 馃數 Tracked: me_tab_accessed
98 - [Sep-29 14:58 STATS] 馃數 Tracked: support_opened, Properties: {"origin":"ME_SCREEN_HELP"}
99 - [Sep-29 14:58 UTILS] trackLastActivity, activityId: Help Screen

(internal reference: p1601335801037600-slack-C0HTU7HV3)

Since this is being looked into internally at the moment, I'm going to let the user know we're looking into it for now.

[Note from Sheri: I have edited this comment to include the logs鈥攚ith some data redacted鈥攖o make it easier for review. Possibly noteworthy: this user is using the classic editor not the block editor so it's possible this case is a separate issue鈥攖hey also mentioned a wait time of ~5 minutes and not seconds like the other users on this issue have reported.]

@planarvoid @develric @mzorz each of you worked on Media Picker Consolidation issues in 15.7. Can one of you let me know what you think about this issue? I would most like to know if you think that adding a loading spinner would be a good temporarily update and which data points would be best to gather from users reporting this going forward (i.e. app version, OS version, device family, number of images on the device?, storage amount used in "Storage & cache" under App info for the Photos app?, type of site, anything else?). We have seen 3 user reports so far and 3 happiness engineers were able to replicate the problem where trying to select images for an image block results in long delays on some devices. Can you please also let me know if this issue should be moved to the gutenberg-mobile repo or if it belongs here? Thank you!

Aha. Ignore that last messages because now I see in the Slack conversation (internal reference: archives/C0HTU7HV3/p1601335801037600) that @develric is working on this and targeting 15.8. 馃憤

Thank you all for the various reports 馃檱 - this is getting fixed in #13035 and a follow up issue has been created here: https://github.com/wordpress-mobile/WordPress-Android/issues/13036

Closing via #13035

Was this page helpful?
0 / 5 - 0 ratings