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

Randomization with seed error: number cannot be converted to BigInt, it's not an integer #272

Open
latin-panda opened this issue Jan 13, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@latin-panda
Copy link
Collaborator

latin-panda commented Jan 13, 2025

Web Forms version and package (e.g. are you using web-forms or only the engine?)

Web Forms v0.5.0, main branch at 4b31432

Browser and version

Chrome v131.0.6778.265

Device used

MacOs - Desktop

Problem description

The following error pops up when refreshing a freshly uploaded form with a seed defined like this once(substr(decimal-date-time(now()), 8)).

Screenshot 2025-01-13 at 3 25 56 PM

Steps to reproduce the problem

  • Upload a form that uses the randomization feature with a seed. For example:
    sample form
  • Click preview
  • See how form loads without error
  • Reload the browser a couple of times
  • See popup with error

Video:
https://github.com/user-attachments/assets/92848dc5-3b6d-4528-aaad-79daf1508ef7

Expected behavior

It should not throw an error when reloading the form, and the randomization should work with a seed like once(substr(decimal-date-time(now()), 8)).

Other information

  • I see this issue in the Web Form preview and when running the project locally
  • The same form works fine in the Enketo implementation: https://getodk.org/xlsform/
  • This form uses the Rank widget, which has yet to be implemented, but the XPath random and seed have already been implemented.
@latin-panda
Copy link
Collaborator Author

Today, I tried the solution in this PR. I pulled, reinstalled, rebuilt, and ran the project, but the error still appears on reload.

@latin-panda latin-panda added the bug Something isn't working label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

1 participant