Open reginabally opened 3 years ago
I am not able to replicate this one in the latest beta or released build. Would you be able to make a video?
Thanks for taking a look, @startuptester! Sorry, I didn't record a video when I was testing on my test site. However, when I tried to replicate this issue again, I wasn't able to reproduce anymore even when the site was switched to private.
There was another case reported in 3632385-zen with the user mentioned that they noticed the issue happens after they purchased a paid plan and registered a custom domain on a private site.
I will test this out, see if I can reproduce it again with a new test site, and report back.
I was able to reproduce this and followed these steps:
Replicated on iPhone X, iOS 14.2, WP iOS 16.3.0.7.
I tried to take a screen recording to show some of the difference. You can find it here: https://s.pvl.app/ApuGWRZy
This is most likely related to the work done in https://github.com/wordpress-mobile/WordPress-iOS/pull/15309
Nicely done! Thank you! @aerych, are you able to take a look and see if it is related to #15309?
are you able to take a look and see if it is related to #15309?
This doesn't appear to be related. In fact, I can reproduce this same behavior in mobile safari and desktop safari. Will follow up with a dotcom team to see what's up. Pinged in p1610402471373700-slack-dotcom
Some related resources for posterity: https://wordpress.com/support/remote-login-permission/ p58i-9P5-p2 p9xfpQ-14l-p2
tl;dr: The current impression is this is another case were Apple's third party cookie security policies are creating unexpected hurtles.
Another report in 3700597-zen.
I was not able to reproduce this on my end but now I'm wondering if disabling, although not recommended, the "Prevent Cross-Site Tracking" in Safari would work: https://www.macrumors.com/how-to/safari-ios-11-tracking-prevention/
Another report of this in 3743685-zen
Disabling cross-site tracking in Safari did not help. The only thing that helps is changing the site privacy temporarily.
Similar issue on 3813388-zen. Changing site privacy seems to help.
Another here: 3853840-zen
4016318-zen
Another here: 4023780-zen
Noting that this issue affects not just the My Site → View Site
web view, but also other web views such as Blog Posts → View
(see https://github.com/wordpress-mobile/WordPress-iOS/issues/16607#issuecomment-853036905).
24451083-hc
Also in 4047173-zen when using a custom travel.blog
address.
Noting the conversation in p5T066-2lo-p2#comment-8707, where an audio file couldn't be viewed on a private site with a custom domain. The file could only be viewed after making the site public temporary and then making it private again. Tested WP app version 17.5.0.1, iPhone X, iOS 14.4.2.
I wasn't able to replicate on the same WP app (version 17.5.0.1), iPhone X, iOS 14.6, but noting here as it's the same issue of a file uploaded to a site's Media Library (an audio file, rather than an image in this case) not being visible.
Highlighting that there is an equivalent issue for Safari, too: https://github.com/Automattic/wp-calypso/issues/53102
Another report in 4114827-zd-woothemes
Another report in 4305899-zd-woothemes
Another report in 4399933-zd-woothemes.
zen-4359348 two sites were affected. On one of the sites the issue got fixed by settings site´s privacy settings to public and then back to private. On the other site the issue remains even after performing the same steps. The site on which issue still persist is using mapped domain name.
32895940-hc
Another reported issue in 4647745-zd-woothemes
User first reached out on 33565646-hc
Then submitted a report: 4673033-zen
Gave them two workarounds to try:
4754671-zen:
For some reason today, I cannot view any pictures that I have added or amended in the viewing pages. Everything is fine in the editing page. I have looked at settings and pictures that are visible are the same settings as ones that do it appear. Is there a solution?
It’s currently on private setting
4754671-zen:
For some reason today, I cannot view any pictures that I have added or amended in the viewing pages. Everything is fine in the editing page. I have looked at settings and pictures that are visible are the same settings as ones that do it appear. Is there a solution?
It’s currently on private setting
cc: @tiagomar
Regarding the workaround of changing the visibility between public and private, I did a quick check and realized that it works mainly because the requests and images are cached. In fact, that explains why new images added after setting the site private aren't loaded, similar to the case outlined in https://github.com/wordpress-mobile/WordPress-iOS/issues/15596#issuecomment-757175133.
After performing a deeper exploration of the issue, here are some findings that I hope would be useful for addressing it in the future:
NOTE: I replaced the blog name with <BLOG>
in order to anonymize the information.
<BLOG>.travel.blog
.https://<BLOG>.travel.blog/
included the authentication cookie and it was successful.https://<BLOG>travel.files.wordpress.com/2022/04/img_001.jpg
failed with status code 403
. I'd like to note that there was no cookie associated with the request, which explains why the request failed.***
) :
wordpress_logged_in_***
***
<BLOG>.travel.blog
/
403
.My impression after investigating the issue is that the authentication cookie is only valid for requests made to <BLOG>.travel.blog
. In this case, since the image is provided from a different domain (i.e. <BLOG>travel.files.wordpress.com
) the same cookie can't be used. Not sure if it would be possible to have an extra authentication cookie for the other domain, maybe this would help on addressing the issue 🤔 .
As a side note, I also tried making the same request using a cookie obtained by logging into WP.com using the Safari app in the device, and in this case, the request was successful.
👋 Thanks all for the great research. I believe this is happening because cross-site tracking (as mentioned earlier) is blocked, meaning the cookies won't be sent even if you have them. Disabling the setting in Safari will only fix this problem inside Safari and not the app, unfortunately.
Private *.wordpress.com
sites shouldn't be affected by this issue, only mapped domains.
Method A | Method B |
---|---|
If a user has a domain such as my.travel.blog
, method A will generate a preview for the page or post with a URL such as mytravelblog.wordpress.com?p=123&preview=true
where 123
is the page or post ID. This method succeeds because all content is loaded from *.wordpress.com
and nothing is deemed "cross-site". It will also not force the redirect to my.travel.blog
.
NSCrossWebsiteTrackingUsageDescription
to Info.plist
(for both WordPress and Jetpack) (source, see "Intelligent Tracking Prevention in WKWebView")Then cookies will be sent to *.files.wordpress.com
to load the private media.
This client-side solution feels subpar because it's scary looking and requires manual intervention by the user.
Another one here: 5574449-zen
Referenced on previously linked issues, there are internal discussions (pMz3w-fNu-p2) and explorations (D86397-code) to remedy the high-level issue with back-end solutions, which may negate the need for client-side solutions in the WPiOS app.
Another case: 28783920-hc
Another case: zen-5766770 hc
A user who previously reported this issue came back to let us know they're still experiencing it: 5766770-zd
I believe this is another case as well: 41679918-hc Had user change to default WordPress.com domain
This seems to be the case on 8308709-zd
as well.
It was reported in 3624089-zen that the user wasn't able to view the images on the app's web view when the site is set to Private. They were able to view the images when they changed the site's privacy setting to Public.
Expected behavior
I would expect to be able to view the images on the site through the web view on the app even though my site is set to Private.
Actual behavior
I wasn't able to see the images on the site when it is set to Private.
Steps to reproduce the behavior
Note: Reported and tested on WordPress.com Simple sites with custom domains.
Tested on iPhone SE, iOS 14.3, WPiOS 16.3. Reported in the ticket on iPhone 12 Pro Max, iOS 14.2, WPiOS 16.3