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

New site doesn't load on Mobile Safari #758

Open
jwoertink opened this issue Mar 28, 2024 · 20 comments
Open

New site doesn't load on Mobile Safari #758

jwoertink opened this issue Mar 28, 2024 · 20 comments
Labels

Comments

@jwoertink
Copy link

Love the new design 🙌 but I'm having trouble getting it to load on mobile. I'm using iOS 17.4.1 on iPhone 13.

This is after clearing cache, and I've also tried opening up in private browsing.

IMG_2582

After a few attempts, I was able to get the logo to load as well, but still nothing else.

@straight-shoota
Copy link
Member

That's odd. We had a test with iOS 17.3.1 where everything was fine. 🤔

@jwoertink
Copy link
Author

I tried connecting to the safari debugger to see if I could get anymore info, but the network panel looked fine, and there weren't any issues in the console... Though, I'm not sure I trust the debugger since updating my mac 😕 I have issues with it on my own site. I'll see if I can get any other info on this.

@straight-shoota
Copy link
Member

I did another test with iPad Pro 12.9", 2nd Generation iPadOS 17.2 (21C62) and everything looks fine there.

@jwoertink
Copy link
Author

Yeah, it's still doing it for me. One weird thing I noticed is the site actually loads and I see all of the elements for a split second, then they all go away except for 1 or 2 parts. Then if I try to reload the page, it just never loads. No plugins or extensions, and it happens using Wifi and 5G networks. I can do a screen recording and send it if you want. Not sure if github will let me submit a video in a comment. If you'd like, let me know where I can send a screen recording.

@jwoertink
Copy link
Author

Just to make sure it's not just me, it looks like @russ gets the issue too

image

However, the other people on my team seem to load the site fine. Clearing cache on the entire browser and private browse tab still doesn't fix it.

@russ
Copy link

russ commented Apr 5, 2024

Just to note, the site does load on mobile, but just content above the fold. Scrolling down you see everything just blank after Johannes Müller. iPhone 11, iOS 17.3.1

@straight-shoota

This comment was marked as duplicate.

@fnordfish
Copy link

fnordfish commented Apr 8, 2024

iPhone 11 Pro, iOS 17.4.1

https://ruby.social/@fnordfish/112205967220293581

The most confusing part is, that reload seems to be blocked.

@jwoertink
Copy link
Author

reload seems to be blocked.

Ok, so it's not just me... That's made it very difficult to try and debug because when I open the safari dev inspector, then refresh, it never loads 😂

@crysbot
Copy link

crysbot commented Apr 9, 2024

This issue has been mentioned on Crystal Forum. There might be relevant details there:

https://forum.crystal-lang.org/t/website-relaunch/6719/17

@beta-ziliani
Copy link
Member

As a workaround, given that the issue doesn't show up in iOS Simulator, I suggest to detect the user agent and replace the page with a banner stating that it doesn't work on that browser 🤷
Apple, I hate you.

@jwoertink
Copy link
Author

If anyone wants to do some live debugging, maybe on a discord video chat or whatever, let me know. I can hit the site while y'all watch the logs or something.

@straight-shoota
Copy link
Member

straight-shoota commented Apr 13, 2024

Let's try to figure out the specific cause for this mishap. We can disable parts of the website and see what makes it render correctly.

A binary search through _sass/main.css and js/bundle.js with removing parts of those files could be a good pointer.

@jwoertink If you're willing to help, would you try running the website locally (instructions are in the README) while making some modifications? I could also prepare a couple of preview branches to test, but that's going to slow down iterating.

@jwoertink
Copy link
Author

Cloned the site and pulled it up locally on my phone with ngrok. Good news is I'm able to recreate the issue 🎉

Removing this section seems to fix it

&::before {
content: "";
position: absolute;
display: block;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 0;
opacity: 0.5;
background-image: url(/assets/home/pattern.svg);
background-repeat: no-repeat;
background-size: clamp(30vw, max(80rem, 50vw), 250vw) auto;
background-position: clamp(-15vw, -40rem + 50vw, 0px) top;
}

or I guess more accurately, removing these two lines

background-size: clamp(30vw, max(80rem, 50vw), 250vw) auto;
background-position: clamp(-15vw, -40rem + 50vw, 0px) top;

@straight-shoota
Copy link
Member

Thanks for digging into this, Jeremey! ❤️

This is quite interesting. Maybe Safari has an issue with rendering this big background image with lots of thin lines and transparency... It causes issues as soon as the SVG is loaded.

@beta-ziliani
Copy link
Member

#780 still doesn't fix it on iPhone 11 Pro Max with iOS 17.4.1

@jwoertink
Copy link
Author

Oh weird... Yeah... assuming that PR was deployed, it seems to still be doing it 🤔 Could it be cache just holding on to the old version?

@straight-shoota
Copy link
Member

straight-shoota commented Apr 18, 2024

Hm, I think it's unlikely. But could you try the master branch locally again? If the fix works there, we know we need to look at caches or any other issue related to loading from the internet.

@jwoertink
Copy link
Author

Ok, so I pulled down master, booted it locally, threw it up on ngrok, and got the same deal... However, after removing that entire &::before section and a couple of refreshes, I get this

IMG_2732

This is what happened last time too though. After I updated the sass, I did have to refresh like 5 times before it worked. I assumed it was cache, but maybe it's actually some race condition with the sass?

Also a side note, but I had to disable livereload. The site wouldn't come up for me at all through ngrok with it enabled. I'm sure that's unrelated, but still wanted to note.

@straight-shoota
Copy link
Member

Hm, that's too bad 😢

I guess we'll have to remove the entire pattern background then.
Or figure out how to fix this for real 🤷

I assumed it was cache, but maybe it's actually some race condition with the sass?

If it is a race condition, it must be in Safari.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants