Error: 'This record name or ID name already exists' when submitting a record on Enketo

575 views
Skip to first unread message

dkwa...@ona.io

unread,
May 15, 2017, 10:59:58 AM5/15/17
to enketo-users
Hello,

I am getting an error This record name or ID name already exists when submitting a record. An image of the error message is attached. What could be the reason for this?

Regards,
Darlene
already_exists.png

Martijn van de Rijdt

unread,
May 15, 2017, 12:01:03 PM5/15/17
to enketo...@googlegroups.com
Hi Darlene,

Does this happen when you click the 'Submit' button or when you click the 'Save Draft' button? 

In the case of the former you may have found a bug. I remember there has been a bug like this in the past. Which version/service of Enketo are you using?

Cheers,
Martijn

--
You received this message because you are subscribed to the Google Groups "enketo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enketo-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
Revolutionizing data collection since 2012.

Enketo    |    LinkedIn    |    GitHub    |    Twitter    |    Blog

dkwa...@ona.io

unread,
Aug 30, 2017, 4:57:22 AM8/30/17
to enketo-users
Hi Martijn,

This error came up again when clicking on the Submit button. The Enketo version is 1.50.1

Regards,
Darlene


On Monday, May 15, 2017 at 7:01:03 PM UTC+3, Martijn van de Rijdt wrote:
Hi Darlene,

Does this happen when you click the 'Submit' button or when you click the 'Save Draft' button? 

In the case of the former you may have found a bug. I remember there has been a bug like this in the past. Which version/service of Enketo are you using?

Cheers,
Martijn
On Mon, May 15, 2017 at 8:59 AM, <dkwa...@ona.io> wrote:
Hello,

I am getting an error This record name or ID name already exists when submitting a record. An image of the error message is attached. What could be the reason for this?

Regards,
Darlene

--
You received this message because you are subscribed to the Google Groups "enketo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enketo-users...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

mschr...@ona.io

unread,
Sep 18, 2017, 7:51:59 AM9/18/17
to enketo-users
Hello,

We are also experiencing this error "This record name or ID name already exists" when submitting a record. However, it does not appear for all form submissions. What could be possible reasons for this?

Regards,
Megan

Martijn van de Rijdt

unread,
Sep 18, 2017, 12:50:12 PM9/18/17
to enketo...@googlegroups.com
Hi Megan,

The underlying reason is that a record with that instanceID is already saved in the browser storage. The ID-generation should theoretically almost completely avoid collisions (1 in several billions chance I believe), so it's likely some reproducible issue caused by a bug in the code. Until we can reproduce it reliably though, it will be hard to figure out what is going on. I hope somebody comes up with a way to reproduce it.

Cheers,
Martijn

--
You received this message because you are subscribed to the Google Groups "enketo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enketo-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Pushing data since 2012.

Enketo    |    LinkedIn    |    GitHub    |    Twitter    |    Blog

Peter Lubell-Doughtie

unread,
Sep 18, 2017, 1:07:22 PM9/18/17
to enketo...@googlegroups.com
It sounds pretty reasonable to have code which handles collisions, like checks if a created hash matches an existing hash in browser storage and if it does creates another until it doesn't match.

Do you see any reasons against that sort of change?

Martijn van de Rijdt

unread,
Sep 18, 2017, 1:17:04 PM9/18/17
to enketo...@googlegroups.com
I'm thinking it's somehow probably the same record, and not a collision, in which case it could be problematic. Unless..., perhaps there is bug here? https://github.com/enketo/enketo-xpathjs/blob/master/src/engine.js#L4505. I haven't actually tested this.

Peter Lubell-Doughtie

unread,
Sep 18, 2017, 2:09:46 PM9/18/17
to enketo...@googlegroups.com
True, given the odds it makes sense this is probably not a collision.

If it comes to investigating a less likely UUID issue, the 2nd answer in the linked SO post mentions a potential issue with `Math.random()` as well as a new implementation of uuidv4, in an update on that SO answer, but it relies on ES6, https://stackoverflow.com/a/2117523

Khaled Hasan

unread,
Jun 12, 2018, 2:04:31 PM6/12/18
to enketo-users
Hi, I have changed my browser and it solved the issue. I also cleaned my cash of my chrome and working now.

khaled 

Martijn van de Rijdt

unread,
Jul 24, 2022, 4:40:01 PM7/24/22
to enketo-users
Reply all
Reply to author
Forward
Message has been deleted
0 new messages