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

Any JS that uses "while" immedately crashes the tab #15416

Open
1 task done
mikesealey opened this issue Jan 21, 2025 · 2 comments
Open
1 task done

Any JS that uses "while" immedately crashes the tab #15416

mikesealey opened this issue Jan 21, 2025 · 2 comments
Labels
avalanche OSS team bb-bindings bug Something isn't working env - production Bug found in production javascript Relating to user JavaScript in the builder

Comments

@mikesealey
Copy link
Collaborator

Checklist

  • I have searched budibase discussions and github issues to check if my issue already exists

Hosting

  • Cloud
    • Tenant ID: miketest1

Describe the bug
In the bindings drawer, using JS, any time a while-loop is typed, the whole tab crashes.

To Reproduce
Steps to reproduce the behavior:

  1. In the design section, add a headline component
  2. Open the bindings drawer of the headline component, switch to JavaScript, and type
while (true) {
}
  • one user noted their tab crashing simply when typing while

Expected behavior
Builder should either handle a while-loop, or totally prevent it.

Screenshots
Jam https://jam.dev/c/79698f4a-fc0e-4f89-9026-6e2c6283a5ef

App Export

  • none -

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Chrome
  • Version 131.0.6778.205 (Official Build) (arm64)

Additional context
Issue raised by Discord user

Image

@mikesealey mikesealey added the bug Something isn't working label Jan 21, 2025
Copy link

linear bot commented Jan 21, 2025

@aptkingston
Copy link
Member

aptkingston commented Jan 21, 2025

We'll do our best to try and think of a solution to this, but fundamentally it's just that if you write an endless loop in JavaScript, it will hang the tab. One solution might just be to reduce the frequency of live evaluation, so that it doesn't run immediately but instead only when pressing a button or something. It's definitely annoying if you want to use a while loop in a binding, since you'll almost always end up writing valid syntax that's an endless loop before you add the code to let it terminate.

@ConorWebb96 ConorWebb96 added avalanche OSS team bb-bindings javascript Relating to user JavaScript in the builder env - production Bug found in production labels Jan 22, 2025 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
avalanche OSS team bb-bindings bug Something isn't working env - production Bug found in production javascript Relating to user JavaScript in the builder
Projects
None yet
Development

No branches or pull requests

3 participants