Bug Affects...
[x] Content Types or data management
[x] APIs like REST
Current Behavior / Expected Behavior
I have a custom form submission app that is having intermittent issues saving new submissions. The normal workflow is that a user submits the form to give another team member a reward point, the web api retrieves the nominated person's record (2sxc entity) along with the department and location 2sxc entities selected as part of the form submission, saves the form via App.Data.Create(), then if that was successful increments the point total on the nominated person's record, and finally sends out notification emails.
The problem occurs during the the App.Data.Create() call. The error being thrown is System.ArgumentException: Can't find the freshly created entity with ID 62741, something is wrong. at ToSic.Sxc.Apps.Sys.AppDataWithCrud.Create(String contentTypeName, Dictionary2 values, String userName, ITarget target) in C:\Projects\2sxc\2sxc\Src\Sxc\ToSic.Sxc.Apps\Apps\Sys\AppData\AppDataWithCrud.cs:line 63 at ICAREController.Nomination(Object bodyJson)` with a different ID each time. Everything else completes successfully, including sending out error messages.
I just added some code to measure the execution times since sometimes 2sxc is slow to respond on that site. I assumed that the error was occurring during one of these slow-to-respond episodes, causing it to hit some timeouts. Only 1 error has happened since that was put in place, but the App.Data.Create() call only ran for 2.11 seconds before throwing that error. It looks like when the issue isn't occurring the App.Data.Create() call averages .1-.2 seconds. This app has been running without issue for a few years now, and didn't start occurring until we updated the site to DNN v9.13.9 and 2sxc v21.3, and the web api controller is inheriting Custom.Hybrid.Api14.
There are currently a bit over 32,000 stored submissions for that content type. I wanted to mention that in case it might have some impact on creating a new record, especially since it seems always to be the retrieving the newly created record part that is failing on the App.Data.Create() call. I have also noticed that when trying to open up the 2sxc content type in the admin panel to see all of the submissions that it takes 3-5 minutes before anything is loaded if it even works at all (usually doesn't). I will be submitting that as a seperate issue, but wanted to mention it here since it seems relevant.
To Reproduce (Steps, Videos, Screenshots, Apps)
Problem is intermittent (rought once every few days), and have not been able to force the issue to occur.
Your environment
- 2sxc version(s): 21.03
- Browser: all | Chrome XX | Firefox XX | Edge XX | IE XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari
- DNN / Oqtane: v9.13.9
- Hosting platform: IIS
- Ui Languages: English
Additional context
Add any other context about the problem here.
Bug Affects...
[x] Content Types or data management
[x] APIs like REST
Current Behavior / Expected Behavior
I have a custom form submission app that is having intermittent issues saving new submissions. The normal workflow is that a user submits the form to give another team member a reward point, the web api retrieves the nominated person's record (2sxc entity) along with the department and location 2sxc entities selected as part of the form submission, saves the form via App.Data.Create(), then if that was successful increments the point total on the nominated person's record, and finally sends out notification emails.
The problem occurs during the the App.Data.Create() call. The error being thrown is
System.ArgumentException: Can't find the freshly created entity with ID 62741, something is wrong. at ToSic.Sxc.Apps.Sys.AppDataWithCrud.Create(String contentTypeName, Dictionary2 values, String userName, ITarget target) in C:\Projects\2sxc\2sxc\Src\Sxc\ToSic.Sxc.Apps\Apps\Sys\AppData\AppDataWithCrud.cs:line 63 at ICAREController.Nomination(Object bodyJson)` with a different ID each time. Everything else completes successfully, including sending out error messages.I just added some code to measure the execution times since sometimes 2sxc is slow to respond on that site. I assumed that the error was occurring during one of these slow-to-respond episodes, causing it to hit some timeouts. Only 1 error has happened since that was put in place, but the App.Data.Create() call only ran for 2.11 seconds before throwing that error. It looks like when the issue isn't occurring the App.Data.Create() call averages .1-.2 seconds. This app has been running without issue for a few years now, and didn't start occurring until we updated the site to DNN v9.13.9 and 2sxc v21.3, and the web api controller is inheriting Custom.Hybrid.Api14.
There are currently a bit over 32,000 stored submissions for that content type. I wanted to mention that in case it might have some impact on creating a new record, especially since it seems always to be the retrieving the newly created record part that is failing on the App.Data.Create() call. I have also noticed that when trying to open up the 2sxc content type in the admin panel to see all of the submissions that it takes 3-5 minutes before anything is loaded if it even works at all (usually doesn't). I will be submitting that as a seperate issue, but wanted to mention it here since it seems relevant.
To Reproduce (Steps, Videos, Screenshots, Apps)
Problem is intermittent (rought once every few days), and have not been able to force the issue to occur.
Your environment
Additional context
Add any other context about the problem here.