Different speeds and crash on iOS with new Model Viewer Starter Kit scene

When I try load this link on iOS Safari, and refresh the page, I get a different result almost every time. This might be…

  • around 30fps
  • around 4fps
  • a crash

( Tested on iPhone 6S Plus, iPhone 6s, and iPad Pro )

This is after a mobile restart, and making sure no more Safari tabs are open.

Also, sometimes when the fps is low, if I rotate the screen, sometimes the fps then goes up to the higher amount. It also sometimes crashes.

Is anyone else seeing this?

This scene is a straight publish of a new Model Viewer Starter Kit project, I added the FPS script to see the framerate issue. It crashes even without this, but it’s helpful to show the fps for when it does work.

How can the same “published” link work so differently every time? For such a simple scene, this is very worrying.

If you get a chance to try the link out, and re-load it around 10 times, could you post your mobile device details, frame rates that you’re seeing, and if you’re seeing a crash.

Cheers!

Edit: Just to confirm that this is also happening with the published version of the original Starter Kit project at Starter Kit: Model Viewer - PLAYCANVAS from PlayCanvas 3D HTML5 Game Engine ), load it up and refresh it a few times.

Here are the screenshots that I’ve grabbed after running it 9 times in a row ( by clicking the refresh icon ), within about two minutes.

Note how the same published link is giving different results - meaning a client might see a different result than the developer, and even see different results every time!

Going by the results below, the client on iOS viewing content based off the MVSK project ( one of three to select at the start ) would have to refresh 6 times to get the correct ( loaded, right aspect ratio and full frame rate ) version.

The first 5 times, they would either have no content or low framerate content! And even when it loads correctly, the next time they refresh, it will probably not load correctly.








Interestingly, the one that both loads and has high fps, has a correct aspect ratio.

I also see the same results on Chrome on iOS ( slow frame rate, sometimes the content doesn’t load ).

When I do get the slow frame rate on Chrome, I can rotate the device to landscape ( which increases the frame rate to the higher one ), and rotate back to portrait ( which now keeps the higher frame rate ). Rotating the device normally crashes the webpage on Safari, but when it did work, it fixed the frame rate.

Curiouser and curiouser!

Edit: Just to confirm that this is also happening with the published version of the original Starter Kit project at https://playcanv.as/p/lBg2rBGR/ from https://playcanvas.com/project/446385/overview/starter-kit-model-viewer ), load it up and refresh it a few times.

I spent time moving everything over to a new project, choosing the Blank Project template.

I now don’t get the loading errors, or the frame rate issues ( which would indicate that the iOS loading error is somewhere outside of the scope of the PlayCanvas scene ), but I do get the different aspects occuring.

For anyone on iOS, or publising for iOS, try this…

  1. Create a new Project
  2. Choose Blank Project
  3. Immediately publish.

Now, with your iOS device in portrait mode, keep refreshing in the link. I’ve included my link, after carrying out the steps above.

Every number of clicks ( sometimes two, sometimes ten ) , the aspect ratio of the PlayCanvas content is wrong.

FPS can be affected if the phone speed gets thermal throttled (although that’s quite a big drop). I would also look at disabling pixel device ratio in the projects settings to help as well at the cost of visual quality.

The stretching may be due to iframes. Can you you try this without the iframe please?Playcanvas iframe inside an iframe, why?

1 Like

Hi Yaustar,

I changed the /p/ to /e/p/, and the content works great ( no frame dropping, no aspect change after many reloads ).

I then changed back to /p/, and got the frame dropping / not loading / aspect changing - it actually took me 13 reloads to get the correct version of the test to load, all of the first 12 reloads were wrong.

There’s a huge WTF above my head as that’s the first time I’ve heard iframes causing performance lost. @will Have you seen or heard about something like this?

Glad it works though!

Using my iPhone 5s

Hi Anton,

If you refresh the browser say 10 times, are you seeing the same result every time, or does the aspect change / the page doesn’t load for some of the reloads?

I just tested here on at a clients office on their iPhone X , and am seeing similar issues ( ie broken loads / wrong aspect and bad framerate ) when refreshing the page a number of times.

Just wante.d to check if there was outstanding issue/question or are you good to go for the moment?

Hi Yaustar,

Just wanted to check if there was outstanding issue

The issue is still there, of the default public PlayCanvas published links randomly not loading, or performing poorly on iOS, on any browser.

I’ve tried the link on iOS devices of friends and colleagues, and see the same issue ( even on iPad ).

This seems to be a known issue ( with some solutions ), I had noticed the same issue months ago when I was doing a quick test of something in PlayCanvas, but had assumed it was an issue with my phone or with the complexity of the scene, it wasn’t until I tried developing something recently that I found that it was an issue with even the basic scenes on other iOS devices - https://www.google.co.uk/search?q=ios+iframe+issues&oq=ios+iframe+issues&aqs=chrome..69i57j0l2.1944j0j7&sourceid=chrome&ie=UTF-8

In which case, I recommend sharing the published link with the extra e in the path. It’s basically the same project but without the iframe wrapper from PlayCanvas.

If it’s a bug in WebKit/Safari, there’s little that can be done on PlayCanvas’ side.

EDIT: The info below is incorrect, publisging to iOS is still broke - see next post.
Just a quick heads up, there seems to have been a change, so now the loading errors and low frame rates don’t appear when publishing new links ( old links are still broken ) - kudos to the PlayCanvas developer who fixed it.

However, the issue with the aspect ration sometimes changing is still there.

It turns out the publishing is still broke on iOS, when using either Blank or the Model Viewer Starter Kit scene ( I forgot about having copied the code from my MVSK scene to a new blank one earlier, which would explain the incorrect aspect ratio issue )

To try this yourself, take these steps…

  1. Create a new project
  2. Select the Model Viewer Starter Kit option
  3. Publish immediately
  4. Run on an iOS device.

Here’s the link from the above steps…

Now, run this on an iOS device, and refresh the page say 10 times. The content will be wrong some of those times ( in terms of loading, fps, aspect ratio or a combination of all ).

TLDR - Any new PlayCanvas developers creating content and testing it on their iOS devices will have issues, when using the published link that the website shows them.