Error message : Unable to fetch app definition. Error:Error in date time arithmetic expression. The input date time values in the expression are invalid, or the result date time value is invalid/n

I have a working app with data filtered out by the security filters. When logged in to the app with custom log in page to filter data. It works completely fine. There is one scenario at the log in which posts the error " Unable to fetch app definition.

Error:Error in date time arithmetic expression. The input date time values in the expression are invalid, or the result date time value is invalid/n "

I need help in debugging this error. Any possible explanations is appreciated.

thanks in advance.

Solved Solved
1 21 1,428
1 ACCEPTED SOLUTION

The issue has been fixed after a series of trial and error. This was a data issue.
Thanks for the inputs and support.

View solution in original post

21 REPLIES 21

Steve
Platinum 4
Platinum 4

Please post a screenshot of the error message, and a screenshot of the entire expression you suspect may be involved.

I do not know which arithmetic expression is the issue followed with.

The issue has been fixed after a series of trial and error. This was a data issue.
Thanks for the inputs and support.

Sir, Iโ€™m running into the same issue. the problem being i dontโ€™ know where the data i would need to fix is located, this after spending much time tying to find if i have a bad expression somewhere but i feel like i can be a data issue like data that isnโ€™t date/time format is this what happened to you?

Please contact Support for help with this.

https://www.appsheet.com/Support/Contact

Steve, they couldnโ€™t help - would you say this is strictly a data thing or an expression in app?

Do you have a ticket number?

i couldnโ€™t find in the email thread, but his name is Meletiy

Iโ€™m in the process of rebuilding app from scratch, im super depressed - bout to switch back to when i work i donโ€™t know how else i would get a schedule out in time

i tried restoring to previous version i went back a ways, itโ€™s not former version - has to be something in data like the man mentioned in this thread, but how can bad data break an app? itโ€™s prob something so simple

I found the ticket. His responses were not terribly helpful for you, it seems. Unfortunately, Iโ€™m not in a position to offer much more help. I donโ€™t have access to Supportโ€™s tools to look at your app.

The above is the significant part of the ridiculously long error message.

Does the app editor display any error messages about your app? Error messages are displayed in red, and prevent the app from loading in the app emulator.

Have you tried using Save & verify data rather than just Save?

Have you made any recent changes to any expressions that use or produce Date, DateTime, or Date values?

Check your data. Specifically, review and date, date & time, and time values in your spreadsheet. Look for any that are not dates and/or times, that are obviously improperly formatted, that have spreadsheet errors (e.g., #ERROR), or that are way in the past or way in the future.

Are you using spreadsheet formulas to calculate any date and/or time values?

no red messages in errors, those tell you where the issue is, mine doesnโ€™t tell me where it is.

i have not tried save and verify data,

there was a 3 hour gap of me not working on the app until the time it broke, i even tried deleting all the data out of my main table, 6500 rows and resyncing to see if that helped, it didnโ€™t

i agree it has to be something with date/time it could be so simple but i have looked everywhereโ€ฆ im literally building a new app

no spreadsheet formulas, everything in app

it has to be data based im thinking, i even tried deleting a bunch of tables that arenโ€™t central to my core function, nothing helped yet - maybe i iddnโ€™ tget the right one

Where does the long error message display? Can you screenshot that?

thats when i look at the audit monitor, i trace it back to where we first had errors, can i add you as a co- author? whatโ€™s your email

Iโ€™m afraid thatโ€™s beyond what Iโ€™m able to do.

Mayur, it was a data issue? resolved in google sheets?

Brother Iโ€™m running into the same issue, i put a lot of hours in this app and my business frankly depends on it now, can you please let me know what you did to fix yours? i canโ€™t find where the error is either

Error:
โ€œSystem.AggregateException: One or more errors occurred. โ€”> System.Exception: Error in date time arithmetic expression. The input date time values in the expression are invalid, or the result date time value is invalid\r\n at Jeenee.DataTypes.ArithmeticExpression.Evaluatable.RunDate(IDataContext dataContext, List1 childValues)\r\n at Jeenee.DataTypes.AppEvaluatable.RunBatch(BatchDataContext batchDataContext, BatchArguments batchArguments)\r\n at Jeenee.DataTypes.AppEvaluatable.RunBatch(BatchDataContext batchDataContext, BatchTrace batchTrace)\r\n at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext()\r\n at System.Collections.Generic.List1..ctor(IEnumerable1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)\r\n at Jeenee.DataTypes.AppEvaluatable.RunBatch(BatchDataContext batchDataContext, BatchTrace batchTrace)\r\n at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext()\r\n at System.Collections.Generic.List1..ctor(IEnumerable1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)\r\n at Jeenee.DataTypes.AppEvaluatable.RunBatch(BatchDataContext batchDataContext, BatchTrace batchTrace)\r\n at Nirvana.Data.DataLayer.GetComputedFieldValuesBatch(Context context, IDataContext dataContext, TableData tableData, SchemaField attr, Int32 col)\r\n at Nirvana.Data.DataLayer.GetComputedFieldValues(Context context, IDataContext dataContext, TableData tableData, SchemaField attr)\r\n at Nirvana.Data.DataLayer.AugmentData(Context context, AppTemplate appTemplate, String tableName, TableData tableData, ItemSchema itemSchema, Boolean keysOnly, AppErrors appErrors)\r\n at Nirvana.Data.DataLayer.GetTableData(Context context, AppTemplate appTemplate, String tableDataIdentifier, Int32 userId, AppTable appTable, ItemSchema tableSchema, UseCacheOption useCache, Boolean augmentData, AppEvaluatable filter, Nullable1 ifModifiedSinceDate, Boolean& notModified, AppErrors appErrors, Boolean ignoreSecurityFilters)\r\n at Nirvana.Internal.InternalAPI.GetTableData(Context context, AppTemplate appTemplate, AppTable appTable, Int32 userId, Boolean augmentData, AppEvaluatable filter, Nullable1 ifModifiedSince, Boolean& notModified, AppErrors appErrors)\r\n at Nirvana.source.api.AppApiController.ParallelReadTable(Context perTableContext, Int32 thisUserId, String appTemplateName, AppTemplate appTemplate, AppTable appTable, Boolean augmentData, String tableTimestampsFromClient, TableParams tableParamsFromClient, AppErrors perTableAppErrors, DataFormat desiredFormat) in T:\\tmp\\tmp4AA5.tmp\\jeenee\\Nirvana\\Controllers\\API\\AppApiController.cs:line 2115\r\n at Nirvana.source.api.AppApiController.<>c__DisplayClass42_0.<ParallelReadTables>b__2(AppTable appTable) in T:\\tmp\\tmp4AA5.tmp\\jeenee\\Nirvana\\Controllers\\API\\AppApiController.cs:line 1955\r\n at System.Threading.Tasks.Parallel.<>c__DisplayClass42_02.b__1()\r\n at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)\r\n at System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )\r\n โ€” End of inner exception stack trace โ€”\r\n at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\r\n at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner1 source, ParallelOptions parallelOptions, Action1 simpleBody, Action2 bodyWithState, Action3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func1 localInit, Action1 localFinally)\r\n at System.Threading.Tasks.Parallel.ForEach[TSource](Partitioner1 source, ParallelOptions parallelOptions, Action1 body)\r\n at Nirvana.source.api.AppApiController.ParallelReadTables(IPerfCollector perfCollector, Context context, String appTemplateName, AppTemplate appTemplate, AppTemplate smallClone, String tableTimestampsFromClient, Dictionary2 perTableParamsFromclient, DataFormat desiredFormat) in T:\\tmp\\tmp4AA5.tmp\\jeenee\\Nirvana\\Controllers\\API\\AppApiController.cs:line 1983\r\n at Nirvana.source.api.AppApiController.ExecuteSyncRequest(IPerfCollector perfCollector, Context context, AppSyncRequest request) in T:\\tmp\\tmp4AA5.tmp\\jeenee\\Nirvana\\Controllers\\API\\AppApiController.cs:line 1808\r\n---> (Inner Exception #0) System.Exception: Error in date time arithmetic expression. The input date time values in the expression are invalid, or the result date time value is invalid\r\n at Jeenee.DataTypes.ArithmeticExpression.Evaluatable.RunDate(IDataContext dataContext, List1 childValues)\r\n at Jeenee.DataTypes.AppEvaluatable.RunBatch(BatchDataContext batchDataContext, BatchArguments batchArguments)\r\n at Jeenee.DataTypes.AppEvaluatable.RunBatch(BatchDataContext batchDataContext, BatchTrace batchTrace)\r\n at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext()\r\n at System.Collections.Generic.List1โ€ฆctor(IEnumerable1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)\r\n at Jeenee.DataTypes.AppEvaluatable.RunBatch(BatchDataContext batchDataContext, BatchTrace batchTrace)\r\n at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext()\r\n at System.Collections.Generic.List1โ€ฆctor(IEnumerable1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)\r\n at Jeenee.DataTypes.AppEvaluatable.RunBatch(BatchDataContext batchDataContext, BatchTrace batchTrace)\r\n at Nirvana.Data.DataLayer.GetComputedFieldValuesBatch(Context context, IDataContext dataContext, TableData tableData, SchemaField attr, Int32 col)\r\n at Nirvana.Data.DataLayer.GetComputedFieldValues(Context context, IDataContext dataContext, TableData tableData, SchemaField attr)\r\n at Nirvana.Data.DataLayer.AugmentData(Context context, AppTemplate appTemplate, String tableName, TableData tableData, ItemSchema itemSchema, Boolean keysOnly, AppErrors appErrors)\r\n at Nirvana.Data.DataLayer.GetTableData(Context context, AppTemplate appTemplate, String tableDataIdentifier, Int32 userId, AppTable appTable, ItemSchema tableSchema, UseCacheOption useCache, Boolean augmentData, AppEvaluatable filter, Nullable1 ifModifiedSinceDate, Boolean& notModified, AppErrors appErrors, Boolean ignoreSecurityFilters)\r\n at Nirvana.Internal.InternalAPI.GetTableData(Context context, AppTemplate appTemplate, AppTable appTable, Int32 userId, Boolean augmentData, AppEvaluatable filter, Nullable1 ifModifiedSince, Boolean& notModified, AppErrors appErrors)\r\n at Nirvana.source.api.AppApiController.ParallelReadTable(Context perTableContext, Int32 thisUserId, String appTemplateName, AppTemplate appTemplate, AppTable appTable, Boolean augmentData, String tableTimestampsFromClient, TableParams tableParamsFromClient, AppErrors perTableAppErrors, DataFormat desiredFormat) in T:\tmp\tmp4AA5.tmp\jeenee\Nirvana\Controllers\API\AppApiController.cs:line 2115\r\n at Nirvana.source.api.AppApiController.<>c__DisplayClass42_0.b__2(AppTable appTable) in T:\tmp\tmp4AA5.tmp\jeenee\Nirvana\Controllers\API\AppApiController.cs:line 1955\r\n at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.b__1()\r\n at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)\r\n at System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )<โ€”\r\nโ€

I really wish it could tell me where the error is itโ€™s been over a day my company depends on this app now, it hit up appsheet support also for help - Need this working!

Steve, what if iโ€ฆ copy the appโ€ฆ ??

Top Labels in this Space