Studio - Pressing button a restart simulator window

Hi all

it’s me again., please don’t hate me.

I am experiencing a very weird behavior on the studio.

I have an experience with 2 VPS locations, if I launch the simulator and I go to the location and I trigger the found or lost event everything is working as expected.
When I find the location, there is a UI button displayed on top of them.
The button hides and shows as expected (hides on lost, shows on found)

If I click the button, the expected behavior is to hide a couple of elements and display others and switch the camera, so the issue I am facing is that when I click the button it seems that the behavior is correct (i can see the correct elements) but the simulation restart saying:
8th Wall XR Version: 27.2.5.427s,
it goes through the loading screen and the simulator just display a black screen without anything on it.
It seem to reload twice, as if I untick ‘Clear on run’ I can see the message twice.

At this stage if I click the reload button on the top of the simulator window, it does reload but still display the black screen, the only way for me to return to a working state is to close the simulator rand restart, but then I am again in the same cycle.

If I pair a mobile phone it does very weird things.
It loads with a world camera, obviously there are no VPS as I am not there, but if I tap it is like the button is tapped (not sure why as the button is not displayed) , then after the invisible button is clicked the camera is super zoomed in (and this is also very strange because on tap I switch the camera to a 3D camera so no world camera there)

I did some more debugging and it seems that the buttons are still around in a transparent fashion in the viewport to be clicked even if hidden with
ecs.Hidden.set(world, schemaAttribute.get(eid).mainButton, {})

As errors go I am getting this one while looking at the VPS (not getting this on mobile as I am not looking at the VPS from the mob in this instance)

▼ Uncaught TypeError: Cannot read properties of undefined (reading 'side')
    at (anonymous) runtime.js
    at At runtime.js
    at $i._computeIntersections runtime.js
    at $i.raycast runtime.js
    at br runtime.js
    at br runtime.js
    at br runtime.js
    at br runtime.js
    at br runtime.js
    at br runtime.js

Any suggestion on how to debug this issue?

Just to add to this,
I restored an old version of the project using the source control to a version that was working 100% (as it is the deployed version that I tested earlier this morning) and there is only 1 VPS, but when I click the button the simulator reload

I kept trying to debug this problem.

Unfortunately the project is behaving weirdly.

A UI Object the is displayed only in when a VPS is found, when rendered it is rendered without the text.
When I click the button (that doesn’t have the text) I receive the following error:

| 5 Uncaught TypeError: Cannot read properties of undefined (reading 'side')

If I try to run it a mobile from the editor, the camera doesn’t work and I have a black screen.

I cloned the project and on the new one I am getting a new error when launching the simulator in debug mode

| [XR] Invalid appKey xxxxxx (not the real key I am not sure if it is a secret)
| [XR] Error: Error: Failed to verify
| Uncaught TypeError: Cannot read properties of undefined (reading 'side')

Any idea what I could look at to solve the issue?

Hi Kaiser,

I’m taking a look into this now.

Hi

I did some more testing, I tried switching the UI element from 3d to overlay, but the behavior is very similar.
The ui element doesn’t appear when the VPS is found, after I found it (triggered the event), if I modify the text of the button from the editor while the simulation is running, from time to time it will be rendered, mostly not.

Interesting enough the editor seems to show/hide the element correctly while the sim is running

Then if the button is an overlay, the click seems to be ignored

With overlay button I don’t have any error in the console.

I am also getting a lot of ▼ [XR] Invalid appKey xxxxx, this happen when the simulator reloads itself after I click a 3d button when displayed

Thanks a lot

Hi again :slight_smile:

I tried to build the experience and deploy it to staging, when i went to the actual location and used the deployed version it behaved as expected.

The button appeared on location and it was clickable without and behaved as expected.

Hope this helps