Staging build differs from preview build

Iā€™m having different results from the same commit between the preview and the staging.

I have a commit saved and built, that work ok on preview.
Using the preview mode of the cloud editor, all is ok, the function that manipulate my overlay works fine in the mobile device and the emulator.
The same commit, i publish as Staging, and the overlay control stop working.

The console give me no error and all the files are loaded ok, using the same mobile for both and cleaning the cached files to ensure is loading the correct files.

Is there some difference in the delivery or compilation of preview and staging?

Hello @Anderson_Santos can you share more information such as a screenshot of what you are experiencing?

Have you verified that you have correctly landed your project. Please reference our tutorial video here about source control

Issue resolved, which turned out to be a logical problem related to attaching multiple copies of a click event listener to an element.

In preview mode, having multiple triggers of the event did not cause any issues, even when executed on mobile. However, in staging mode, the mobile device was re-triggering the events, leading to unintended side effects.
After correcting this issue to ensure only one unique event listener is attached to the element, the behavior is now consistent in both preview and staging modes.

This experience highlighted a difference in execution between modes, reminding me not to fully trust the preview mode. Moving forward, I will pay closer attention to prevent asynchronous loops from causing an accumulation of event listeners.

1 Like