wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.96k stars 1.31k forks source link

Error occurred when reblogging a post #18931

Open reginabally opened 1 year ago

reginabally commented 1 year ago

Reported in 6588902-zen.

Expected behavior

Able to reblog a post in the app.

Actual behavior

The app displayed the "An error occurred when accessing this blog" error after tapping the "Reblog" button on a WordPress.com site in the browser.

Steps to reproduce the behavior

  1. Visit a WordPress.com site that has the "Reblog" button added on a mobile browser. (e.g., https://thestoryreadingapeblog.com/2023/08/03/style-guides-essential-writing-resources-for-professionals-by-melissa-donovan/). Note: if you don't see the "Reblog" button, request the desktop site to see it.
  2. Tap the "Reblog" button and choose the "Open Reblog Editor" button.
  3. When the app opens, notice the "An error occurred when accessing this blog" and the editor shows a blank page.

Screen recording: reblog_failed.webm.zip

Logs: logs.txt.zip

Tested on Pixel 4 (Android Studio emulated device), Android 13, JPAndroid 22.9
zwarm commented 4 months ago

TLDR; The Android app doesn't support reblog deep links.

Intercepted deep link format: https://wordpress.com/post/225903215?url=http%3A%2F%2Fthestoryreadingapeblog.com%2F2023%2F08%2F03%2Fstyle-guides-essential-writing-resources-for-professionals-by-melissa-donovan%2F&is_post_share=true

After investigation, it has become evident that the Android app currently lacks support for reblog deep links. Instead, incoming links are being interpreted as Edit Post Links. Consequently, the app attempts to open the post for editing. When the site is not found or its host does not match the host in the URL, we display the message "An error occurred when accessing this blog." and open a blank editor. This aligns with the intended behavior.

FYI: @tiagomar - I will relabel to remove the bug and pri high labels.

dangermattic commented 4 months ago

Thanks for reporting! 👍