V6 Rc1 Threejs loading issue on Apple devices

I recently discovered a loading issue on Apple devices for my Threejs apps - they just didn’t load anymore. After quite some testing (I first thought it was a Threejs or Apple issue) my last thinkable option was to check Pro and voila, after rolling back to 5.2.0-beta1 the issue is gone.

I have some screenshots of the console (don’t know if this is useful) but I will add them anyway

Can you add a secure note for me friend?
How are you initializing your Three.js? Try moving all that to inside a timeout to keep it out of the Cornerstone thread.
Can you reach the model path at all? Like if you place the URL in the browser does that download the model?

Thanks Charlie, secure note added.

Actually, on the link provided the app is not being loaded before you press the “Enter” button. Also as said everything works normal on all other devices than Apple devices. Since I don’t have a Mac myself all other questions I can answer with yes

I’m getting a reference error where params is not found around this line. Both iPad and Mac. And I get that windowHalfX error on mac only. Now your const instantiating so this error is weird in itself. I’d guess we have a timing issue some where.
bloomPass.strength = params.bloomStrength;

What is Pro doing in this site? Just content? I’m asking cause the click handler is created by you and I’m trying to see where pro could be interfering.
I’ve got some ideas on where to start to make this easier on debugging.

  • Move the JS to it’s own file.
  • Move the code out of the try block. Just do that for init(). You could even do another function.
  • do setTimeout after the click action to get off the user thread.

That password didn’t work me also.

I updated the password, sorry about that. I will look into the rest tomorrow, it’s already late here.

1 Like

Good day @charlie, so to come back at some of your questions.

The windowHalfX error is probably gone now, this function is now only being called after the scene is successfully loaded.

Pro is for now mostly only hosting the app and I created the buttons in a raw content element, later this will be connected to WooCommerce also.

For your debugging options:

  1. About moving the JS to it’s own file, for now it is just being called on the created page where I used the pageJs sheet, when needed I can move it away from there. But I prefer to have it there for my own workflow, not a necessity.

  2. I don’t fully understand what you are saying here.

  3. There is already one applied, I can increase the time if that would be helpful.

Cheers,

Jeroen.

1 Like

With the windowHalfX error gone it looks like mac works. I’m still getting a reference error on iPad with params not being defined. I’d guess that the console.clear is hiding a warning or error.
That user account doesn’t have any permissions.

Sorry about that (again) Charlie, now you should have all rights. I also commented the console.clear line but for me that doesn’t make any difference.

I’ll take another look this week. I’m still getting a reference error where params is not defined and commenting out the console.clear unfortunately didn’t give me any more answers.

All good and thanks!

So moving everything from line 1-70 as a window variable (window.params = etc…). I was able to run this on a browserstack iPad. Something with try blocks possibly and how ios handles them, or something else. Moving this to it’s own file will probably fix the issue, I’ll see if I can pin point anything that changed in Pro to help you out.

I reverted your code from what I was doing for clarification, I don’t think you necessarily want everything as a window variable so we can see if there’s something else we can do. We’ve been wrapping custom js in a try block since 5 from what I’m seeing.

1 Like

Thanks @charlie, I forgot to reply. I don’t mind necessarily to move things but I can imagine that people with a lot of custom JS will run into the same issue when updating which can be a big headache for ThemeCo also when support questions come running in.

Do you have a pro 5 version of the site for me to look at? I’m not sure if you want me to down grade the current site for testing.

Of this site I don’t have a version 5 but this one: Board Configurator2 | Boardschmiede Custom Shaped Kiteboards (creativist-lab.com) I reverted, which before also didn’t load anymore. I will add login details for this site also. If that isn’t helpful you can also down grade the other site

1 Like

Okay so this site did not run in the apple world after a pro 6 upgrade?
I think I am right about the try block being an issue and wrong about it being a pro 5 thing of wrapping all custom js in a try block as this site is try block free. Let me speak internally how we are going to handle this and test that this will actually fix your other site. Maybe take out the try block by default and have a new setting to enable or disable.
I really appreciate your patience in this. You’re doing great work in these sites.

Thanks @charlie for the compliment, for being self taught I’m not always sure that my methods are the right ones so nice to hear.

About your question, yes the other site was running without problems in version 5.

For me personally it is no problem for now to stay with V5 but of course it would be nice if things just work :slight_smile:

Self taught people stick together. I’ll bring in your other site and make sure it’ll run in 6 I think we’ll be good though.

Thanks Charlie!

1 Like