Skip to content

Taking a photo in webforms and clicking next causes webform to crash #2559

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

Open
spwoodcock opened this issue May 28, 2025 · 5 comments
Open
Assignees
Labels
bug Something isn't working dependency:odk-webforms Requires updates to ODK WebForms effort:low Likely a few hours frontend:mapper Related to the mapper frontend code priority:high Should be addressed as a priority

Comments

@spwoodcock
Copy link
Member

Describe the bug

  • Submitting a form without a photo works.
  • Submitting a form with a photo work intermittently - I think due to resource usage? Probably related to

Works:

test1.mp4

Fails:
I can't reproduce this now 😆
It was during a demo, so perhaps my internet and device were under high load and we had a race condition where the photo hadn't fully been loaded into webforms before clicking this button?

Image

In the demo I never reached this screen / it just crashed (two or three times):
Image

To Reproduce

  1. Fill out a form quickly.
  2. The form crashes if the user clicks the continue button before the image is rendered on the page.

Expected behavior

  • Submits successfully.
  • This could be an issue with the webforms code actually - unsure.

Specs

  • Device: Pixel 6a
  • OS: latest Android
  • Browser Chromium
  • RAM: 4GB I believe?
@spwoodcock spwoodcock added this to the (2025.3.1) PATCH milestone May 28, 2025
@spwoodcock spwoodcock added the bug Something isn't working label May 28, 2025
@spwoodcock spwoodcock added priority:high Should be addressed as a priority effort:low Likely a few hours frontend:mapper Related to the mapper frontend code dependency:odk-webforms Requires updates to ODK WebForms labels May 28, 2025
@spwoodcock
Copy link
Member Author

As I couldn't reproduce when writing this issue, let's keep an eye on this / try to reproduce it at some point 👍

@spwoodcock
Copy link
Member Author

spwoodcock commented May 29, 2025

@emi420 was also reporting this, so I don't think it's just me =)

Assume the issue is intermittent based on available system resources?

@NSUWAL123
Copy link
Contributor

It took me about 30-40 seconds to upload the form with an image. With the demo project 257

@emi420
Copy link
Contributor

emi420 commented May 29, 2025

I can't find the code for camera, this is how I did took pictures from a web form, following web standards, 13 years ago:

https://github.com/emi420/Mootor/blob/master/source/js/uiformcamerasingle.js

It's still working without crashing:

https://emi420.github.io/Mootor/demo/#form

@spwoodcock
Copy link
Member Author

We didn't write the code for the camera - ODK did - their implementation is top notch (using the html capture attribute) 👌

We can't change the logic without making a PR in the web-forms lib, but thanks for the info! It will be very useful in a worst case scenario having to implement ourselves!

I actually think the issue isn't the implementation, but it's memory usage in the app - I could be wrong though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependency:odk-webforms Requires updates to ODK WebForms effort:low Likely a few hours frontend:mapper Related to the mapper frontend code priority:high Should be addressed as a priority
Projects
Development

No branches or pull requests

4 participants