Skip to content
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

Sample blog post hero not rendering on Safari #73

Open
uloco opened this issue Oct 6, 2020 · 15 comments
Open

Sample blog post hero not rendering on Safari #73

uloco opened this issue Oct 6, 2020 · 15 comments
Labels
bug Something isn't working pending on external library this issue is pending on another issue/PR of an external library

Comments

@uloco
Copy link

uloco commented Oct 6, 2020

The sample blog post is not rendering correctly on my setup.
The hero image seems to be missing.

I did a clean repo clone (as recommended), and ran codedoc serve.
If I switch from Home to Sample Blog Post on the side bar, the page does not show any hero image and the title is far at the bottom. See here:

sample-blog-post

Oddly the page renders fine if I do a page refresh. (at the end of the gif)

I don't have any similar issues on Google Chrome.

macOS Version 10.15.7 (19H2)
Safari Version 14.0 (15610.1.28.1.9, 15610) without any extensions enabled
Resolution of Safari window does not matter.

@TysonMN
Copy link
Contributor

TysonMN commented Oct 7, 2020

Is anything printed to the browser's console? Is anything printed to the terminal where you executed codedoc serve?

@loreanvictor loreanvictor added the bug Something isn't working label Oct 7, 2020
@uloco
Copy link
Author

uloco commented Oct 7, 2020

Yes, should have look earlier 😅

image

In chrome I also get an error but it is showing the image and everything properly. There is a different error on chrome though (403)

image

EDIT:
Also the page loads correctly, if I type in the address and navigate directly to the sample blog post.
When switching between screens, it is broken.

@uloco
Copy link
Author

uloco commented Oct 7, 2020

Oh, I think it is the git suffix again, which is included here in the url -.-
If I delete this from the url, the response is correct.
Editing the codedoc config repo by removing the .git solved this error.

But the blog post is still not rendering correctly

@TysonMN
Copy link
Contributor

TysonMN commented Oct 7, 2020

Great job fixing your problem. FWIW, I had already typed a partial response below, so I will share it.

EDIT:
Also the page loads correctly, if I type in the address and navigate directly to the sample blog post.
When switching between screens, it is broken.

CODEDOC uses the "single-page style" of modern website development. When navigating an internal link, it simulates a full page via (rather) minimal amount of changes. Sometimes that minimal reload is not done perfectly. It is great that you thought to try directly loading that whole page vs navigating to that page from an internal link.

@uloco
Copy link
Author

uloco commented Oct 7, 2020

The issue is not solved, sorry. I just solved the error log, but the issue persists

@TysonMN
Copy link
Contributor

TysonMN commented Oct 7, 2020

Ok, sorry for misunderstanding. Can you re-answer these questions then after removing .git from your URLs?

Is anything printed to the browser's console? Is anything printed to the terminal where you executed codedoc serve?

@uloco
Copy link
Author

uloco commented Oct 7, 2020

Nothing is printed to the console after fixing the git repo in .codedoc/config.ts

@uloco
Copy link
Author

uloco commented Oct 7, 2020

The console output in the terminal is this

image

@loreanvictor
Copy link
Contributor

@uloco can you reproduce this on other browsers? if not, could you see if clicking around / zooming in/out / generally interacting with the page causes the image to re-appear (as if it was loaded correctly)?

@uloco
Copy link
Author

uloco commented Oct 7, 2020

I can try tomorrow with different environments. But what I also found out is, that the issue also happens on already published production pages like for example on your blog @loreanvictor. So it is not a serving issue.

@uloco
Copy link
Author

uloco commented Oct 8, 2020

Ok, I cannot reproduce this on my other Macbook.

Safari Version 13.1.2 (15609.3.5.1.3)
macOS Version 10.15.6 (19G2021)

Maybe Safari added some new "Security" features here, that break things?

@loreanvictor
Copy link
Contributor

Hmmm, I'll see if I can find a changelog or something.

@timweiss
Copy link

timweiss commented Oct 9, 2020

I can reproduce the same issue on my machine on eugene.coding.blog with
Safari Version 14.0 (15610.1.28.1.9, 15610)
macOS Version 10.15.6 (19G2531)

but it does not happen on tims.coding.blog, a difference I was able to spot are that my Safari chose to display the base64 representation of an empty image (Safari says 1x1 px, but the real size on reload when the image is rendered correctly):

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=" class="image-0-0-12" data-src="https://images.unsplash.com/photo-1574334292321-4844f63aefef?w=1993&amp;h=600&amp;fit=crop" data-hero="">

But I'm not sure if this may be intended behavior here, my blog uses a fairly old version of codedoc.

@loreanvictor
Copy link
Contributor

I couldn't find anything in particular on recent changes of Safari. Version 14 seems to have had memory issues on older macOS versions (which is not the case here).

In any case, this seems to be isolated to Safari and a particular version, which makes it highly likely that this is caused by something gone wrong with the new update. I will mark this issue as pending on external library for now, and will keep an eye on the situation.

@loreanvictor loreanvictor added the pending on external library this issue is pending on another issue/PR of an external library label Oct 12, 2020
@uloco
Copy link
Author

uloco commented Nov 2, 2020

This issue is also present on my iPhone, iOS Version 14.1. Tried on uloco.coding.blog and eugene.coding.blog. Make sure to navigate via side menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending on external library this issue is pending on another issue/PR of an external library
Projects
None yet
Development

No branches or pull requests

4 participants