Log files

From Resco's Wiki
(Redirected from Sync log)
Jump to: navigation, search

In case of problems, Resco support may occasionally ask you for log files. See Send log for information about to how to send log files from the app.

What is a log?

A log is the basic means of communication between the app and a technician, or another responsible person. It provides basic information about the app’s behavior, potential faults, and errors.

The log itself does not contain any CRM data, except Organization ID and User ID that synchronizes the app, and the name and ID of the record that experienced an issue - for identification.

The log contains excerpts from the app’s code – e.g. synchronization details, how long the synchronization took, how many records were downloaded, whether there were any conflicts, issues with connecting to the CRM server, or any other problems with the synchronization.

It also contains the stack trace, i.e. the last steps that the app did before an error or crash occurred. This can help you identify a missing field, or other customization error, or help us identify a problem in the app that we can fix then.

When users experience any problems with the app, the best thing they can do is to send the log from the app’s About section and describe what happened; ideally in a step-by-step manner so that the problem can be reproduced. The more information users provide, the faster can the support staff find the cause of the issue and fix it, or advise what to do next.

Note The log can be sent from the app’s About section. Do not remove the About item from the home screen when customizing your app projects. Otherwise, users will not be able to provide logs for troubleshooting.

By default, when a user sends a log from the app’s About section, the email address of Resco technical support is predefined. If you want to receive logs to your own support email, select Design > Branding from the Project menu in Woodford and change the value of Support Email.

Types of log files

Resco MobileCRM app can generate multiple log files.

crash.log
contains information about exceptions, including some problems with third-party integrations (but see also integrationLog below)
syncLog.txt
contains information about your recent synchronizations
onlineLog.txt
contains information about errors related to online mode
integrationLog.txt
contains information about problems with third-party integration
rulesLog.txt
contains information about issues in rules
secmanLog.txt
contains information about security violations
JSBridge.log
contains information about errors that occurred when running JavaScript code

When you use the send log function of the mobile app, the app collects information from the individual log files and adds a short header information. Synchronization log is also always included. The other log files are only included in case there were issues in the corresponding app functionality.

Finding physical files in Windows versions of mobile apps

If you are using Windows version of the mobile application, you can find the individual log files directly in your file system. Depending on your application version, the log files might be stored in various locations:

  • In case of Windows 7 Desktop application, the application data are stored in the following folder: %APPDATA%\MobileCRM, which is typically: C:\Users\{UserName}\AppData\Roaming\MobileCRM
  • In case of Windows Store (Win10) version, it’s %LOCALAPPDATA%\Packages\Resco.MobileCRM_{StoreId}\LocalState\MobileCRM, which is typically: C:\Users\{UserName}\AppData\Local\Packages\Resco.MobileCRM_{StoreId}\LocalState\MobileCRM

Access logs via Sync Dashboard

Administrators can remotely access synchronization logs via the Sync Dashboard.

Header

Right after installation, the log contains at least a header like this:

MobileCRM 8.3.2.0                      Application name and version
2xxxxxx9-Dxxx-4xxx-Axxx-4xxxxxxxxx6    Device ID
MyiPad                                 Device name
iPad Air 2 4G (iPad5,4)                Device model
iPhone OS 9.1.164bit                   Device OS
AppStore Version                       Application type
Application name and version
The application name reflects the Title set in the project's Branding section in Woodford. It can be one of the identifiers of whether the user received the right project. The application version number always reflects the installed app’s version.
Device ID
This ID number depends on the operating system a device runs.
  • For Apple devices see this link
  • For Android devices see this link
  • For Windows Store version (including Windows 10 Mobile) we use this code to get the ID:
var nonce = "RescoMobileCRM".ToCharArray().Select(c=>(byte)c).ToArray();
var token = Windows.System.Profile.HardwareIdentification.GetPackageSpecificToken(nonce.AsBuffer());
var x = token.Id.ToArray();
return Convert.ToBase64String(x);
  • For the Windows desktop version, we use this code to get the ID:
string id = null;
GetSystemInfo(ref id, "Win32_BaseBoard", "SerialNumber");
if (string.IsNullOrEmpty(id))GetSystemInfo(ref id, "Win32_Processor", "UniqueId");
if (string.IsNullOrEmpty(id))GetSystemInfo(ref id, "Win32_Processor", "ProcessorId");
m_deviceId = id;
Device name
It is a name set in the device’s settings, e.g. user-specified name.
Device model
Indicates how the device model is represented in device’s OS.
Device OS
Shows the device’s operating system version.
Application type
“AppStore version” means that the application was provided by Resco and downloaded from an official app store (Apple App Store, Google Play, Windows Store). If the Application type field reads anything else, it means the user is running a custom-built application based on the Resco Mobile CRM technology.

Synchronization log

When synchronization is successful, this partial log records all the important information about the synchronization. If there is an issue, it will, of course, log the error, including as many details as possible to identify the issue.The synchronization log can also be used to check synchronization performance. It should look like this:

Log file: syncLog.txt
Date:2015-06-03 11:57:38+02:00
Org: 00000000-0000-0000-0000-000000000000
User: 00000000-0000-0000-0000-000000000000
License: Valid
New Customization 00000000-0000-0000-0000-000000000000 (body: True)
<Summary Foreground Server:5 Crm2011/ActiveDirectory Threads:3 Sent=0 Recv=27905 Result=CustomizationReady/> <Times Total=105552 Connect=7820 Prepare=7936/> <Details> <GetCustomizationTim=3808/> <DbPrepareTim=1146/> <Perm Priv=2473ms Org=357ms/> <FullSync> <DownloadActivityParty:appointment 1635ms, Added:618, DelCmds:245, Deleted:0/> <DownloadActivityParty:serviceappointment 499ms, Added:141, DelCmds:112, Deleted:0/> Entitys=86461ms Many=1601ms Shared=176ms <Cleanup221ms, Deleted 6/9> Attach=1246ms Sent=0 Recv=27905 TotalTim=89791</FullSync> </Details>

The sync log has its own structure. To save space, most of the labels and descriptions are shortened. The following info explains the data found in the synchronization log, from top to bottom, left to right:

License
First information is the License type. It can be Valid or Free. Validmeans the user has a professional (paid) license assigned. Free means that either a free version of Mobile CRM app is used, or it is a trial of the professional license.
New Customization
This section shows that there is new customization available and applied. The customization ID number can be compared with other users, if it seems that the customization was applied for one user but not for others(or the other way around). You can simply check the ID and see if they are getting the same project. You can do so in the Woodford configuration tool using the Check User option. If there is no new customization and the app synchronized only CRM data, this part of the sync log will read Customization NOT MODIFIED.
Summary
Download summary represents data as a number of threads, number of uploaded records, and number of downloaded records.

You can find additional examples from the synchronization log, along with technical description of the process, in the Synchronization steps.

Summary section

Foreground means that the synchronization was performed with the progress window in the foreground, and the user had to wait until the sync ended to work with the app. The other option you could see here, Background, means that the synchronization ran in the background and users could work with the app apart from saving changes while the sync was in progress.

Result tells you what kind of synchronization it was:

  • CustomizationReady – new or changed customization was found, downloaded and applied
  • AdminFullSync – administrator forced full sync from Woodford. If you use background synchronization, user is notified that he needs to press the sync button when ready.
  • Normal – standard incremental or full synchronization of data, without customization changes
  • AppLocked – application was locked by admin in Woodford's Device control section
  • Wiped – application was wiped by admin in Woodford's Device control section.
  • Aborted – Synchronization process was killed by the system. We will get to this in few moments when we will take a closer look at sync errors

Times Total represents the entire duration of the synchronization, including the connection and preparation phase of the process. Connect is the connection time needed to get in touch with the CRM system. Prepare specifies the preparation time needed for download of metadata, including mobile project, permissions, creation of a new database if needed and preparation for download.

Even more detailed times for the preparation phase provides the following section. GetCustomization shows the time needed to download the customization project. DbPrepare reveals thetime needed to prepare the local database. PermPriv is the time it takes to download user permissions, and Org indicates the time required to download specific organization info, such as unit decimal precision. All times are in milliseconds.

In the second half of the sync log, we can see the number of operations that occurred, the times these operations took, and records that are uploaded and downloaded. The FullSync abbreviation tells us we’re taking a look at a full synchronization. It means that the local database is empty and all records, that follow sync filters (and user security role permissions as well as Max Sync Records option) were downloaded to the device from the CRM server. What’s important: When an activity party takes more than 200ms to download, details about the entity download will be displayed in the log. In our example above, download of the activity party list for the Appointment entity took 1635 milliseconds and 618 records were downloaded and none of them were deleted as they all follow the sync filter—even though delete commands were performed. Similarly, for Service Appointment entity.

The next part of the log presents the final summary of the data download part. Entitys is the total time needed to download actual data from the CRM, Many shows the time needed to download many to many relations, Shared is the time needed to download shared records. Cleanup is a stage that checks if all data follow the sync filter, because even during full synchronization some unwanted data can be downloaded. So the log shows the time needed for the cleanup phase and number of records and N:N relations removed.

The last section shows the time needed for the attachment download (Attach) and the number of uploaded (Sent) and download (Recv) records. The final information (TotalTime) is the net time of synchronization itself, without the connection and preparation phase.

Specifics of incremental synchronization

Incremental synchronization (IncSync) adds one more specific thing - the result of our custom plugins. So, if there is a change in owner, or N:N relation resulting in change in record’s permissions, or are even deleted on the CRM server, these changes are also performed on the Mobile CRM database that can result in removing records from the database, if the user no longer has permission for the record, or it no longer exists. You need to enable these plugins in Woodford.

License: Valid
New Customization XXXX-XXXX (body: True)
<Summary Foreground Server:5 Crm2011/ActiveDirectory Threads:3 Sent=1 Recv=0 Result=Normal/>
<Times Total=9365 Connect=295 Prepare=1028 UploadTotal=91/>
<Details>
   <UploadSync>Entitys=96ms Sent=1 TotalTim=102 NoChangesLeft</UploadSync>
   <GetCustomization Tim=1027/>
   <IncSync> <SyncDeletes <Analyze Tim=147 UnchangedTbls=27/> Items=667 Fetches=5 Deletes=667 Tim=4725/> Entitys=5544ms Many=1308ms Shared=578ms Attach=291ms Sent=0 Recv=0 TotalTim=8042</IncSync>
</Details>

SyncDeletes displays the time needed for analyzing the plugin’s results and determine whether deletes need to be performed on the local database. If yes, deletes are removed and number of deletes is shown in Items and Deletes. The time needed to perform the plugin check (Tim) is the last information always visible. If there is an entity, where the delete or cleanup took longer than 200 milliseconds, it is shown also in Entitys section with further details.

SharePoint sync issues

SharePoint.DocumentSync – If there is such an expression in the sync log, check the actual issue. In this case make sure the SharePoint credentials were entered correctly, and that the SharePoint type is set accurately in Mobile CRM app’s Setup section:

2016-07-21T10:00:52.0609763+12:00: Exception
System.Net.HttpException: HTTP Error Unauthorized (401)
The remote server returned an error: (401) Unauthorized.
  at System.Net.HttpWebRequestSync.GetResponse()
  at ...WebServiceBase.XmlResponse..ctor(Object context, Boolean async, Boolean soap, XmlReaderSettings xmlSettings)
  at ...WebServiceBase.InternalEndInvoke(Object request, Func`2 readResponse)
  at MobileCrm.Data.SharePoint.ListService.GetListCollection()
  at MobileCrm.Data.SharePoint.DocumentSync.GetListUrlMap(ListService service, config, Action`2 Log)
  at MobileCrm.Data.SharePoint.DocumentSync

Similar issues can occur when the SharePoint site is not accessible from the device. In that case,the SharePoint site’s internal and external URLs are set incorrectly in the Woodford project, or user needs to use VPN in order to access SharePoint:

2016-07-23T20:47:17.8670080+12:00: Exception
InvalidOperationException: The request contains no response.
  at WebServiceBase+XmlResponse..ctor (Object context, Boolean soap, WebServiceBase webService, Xml.XmlReaderSettings xmlSettings, Boolean processMultipartResponses) <0x1004fa160 + 0x003c8>
  at WebServiceBase.InternalEndInvoke (Object request, Func`2 readResponse) <0x1004f9870 + 0x0005b>
  at MobileCrm.Data.SharePoint.ListService.GetListCollection () <0x1005213a0 + 0x0014f>
  at MobileCrm.Data.SharePoint.DocumentSync.GetListUrlMap (MobileCrm.Data.SharePoint.ListService service, MobileCrm.config, Action`2 Log) <0x10051e1a0 + 0x0006b>
  at MobileCrm.Data.SharePoint.DocumentSync.DownloadFiles (db, MobileCrm.config,

File integration sync issues

Google Drive, DropBox and OneDrive issues are displayed in the Sync log like this:

FILESYNC: Could not upload GoogleDrive/DropBox/OneDrivefile: "Actual error, issue"

Online log

If an error occurs while using the Resco Mobile CRM app in online mode, it is logged in the onlineLog.txt file.

=============================
Log file: onlineLog.txt
OnlineMode 2016-07-06T11:36:19.5604100-04:00 OnlineError 2016-07-06T11:36:19.4475010-04:00 Can't connect
System.Exception: Can't connect ---> System.Net.WebRequestException: The Internet connection appears to be offline. (-1009)
at System.Net.HttpConnection.GetResponse (System.Net.HttpWebRequestSync request) <0x100c20dd0 + 0x002f8> in <filename unknown>:0

OnlineMode is the time when the online log file was created (started to fill in). OnlineError is the time when the error occurred.

Then the error report continues with the actual issue. In this case,the issue is that user tried to switch to the Online mode before the internet connection (connection to the CRM server) was enabled on the device. So the Mobile CRM app Can't connect and the reason is The Internet connection appears to be offline. (-1009).

The online log can also contain different errors, not only issues with connection, but since the app in online mode is working directly with CRM server data, these are most likely to be server errors.

Integration log

=============================
Log file: integrationLog.txt
IntegrationError 2016-07-18T07:06:09.9259550-04:00 An internal server error occurred. Try again later.
Microsoft.Exchange.WebServices.Data.ServiceResponseException: An internal server error occurred. Try again later.
  at MobileCrm.Data.Exchange.ExchangeEmailService.DownloadEmails (MobileCrm.Data.Exchange.ExchangeSyncContext context) <0x1005a8d80 + 0x01188> in <filename unknown>:0
  at MobileCrm.Data.Exchange.ExchangeEmailService.DownloadEmails (MobileCrm.Data.Integration.SyncContext context) <0x1005a8130 + 0x000b7> in <filename unknown>:0
  at MobileCrm.Data.Integration.EmailService.SyncInternal (MobileCrm.Data.Integration.SyncContext context) <0x1005b3d40 + 0x00067> in <filename unknown>:0
  at MobileCrm.Data.Exchange.ExchangeEmailService.Sync (MobileCrm.Data.Exchange.ExchangeSyncContext context) <0x1005a7ac0 + 0x00087> in <filename unknown>:0
  at MobileCrm.Data.Exchange.Exchange.Sync (System.Func`3 progressCallback) <0x1005a6c50 + 0x0018b> in <filename unknown>:0

Integration log contains information about issues with Resco Mobile CRM’s integration features. This partial log contains issues with SharePoint, Exchange and Gmail, Dropbox, Google Drive integration, usually similar to synchronization issues.

First hint is to look for keywords SharePoint, Exchange, Gmail, DropBox, or Drive in the log trace. It specifies the integration feature that is having issues. Problem itself is usually HTTP Error unauthorized (401), meaning that a wrong username or password has been used.

IntegrationError 2016-08-11T20:55:13.9637020+02:00 ServiceRequestFailed
Microsoft.Exchange.WebServices.Data.ServiceRequestException: ServiceRequestFailed ---> System.Net.HttpException: HTTP Error unauthorized (401)

Another problem can be caused by Server not found (404) error when the Exchange or SharePoint server URL is not available from the device, or some other internal server error occurred:

IntegrationError 2016-06-24T14:54:01.6325360+02:00 The specified object was not found.
Microsoft.Exchange.WebServices.Data.ServiceResponseException: The specified object was not found.
  at Microsoft.Exchange.WebServices.Data.ServiceResponse.InternalThrowIfNecessary () [0x00012] in <filename unknown>:0

IntegrationError 2016-07-18T17:15:20.2094630-04:00 An internal server error occurred. Try again later.
Microsoft.Exchange.WebServices.Data.ServiceResponseException: An internal server error occurred. Try again later.
  at MobileCrm.Data.Exchange.ExchangeEmailService.DownloadEmails

Rules log

=============================
Log file: rulesLog.txt
FormRules:5/07/2016 12:41:50 PM
ExecutionError
-----------------------------
ConditionStep:
ConditionGroup:
-----------------------------
System.InvalidOperationException: Property not found on object'Calf feed.statuscode'
  atMobileCrm.UI.Workflow.AbstractVariable.GetProperty(Object o, String propertyName)
  at MobileCrm.UI.Workflow.EntityVariable.GetValue(String[] path)
  at MobileCrm.UI.Workflow.ConditionStep.Eval(ExecutionContext context)
  at MobileCrm.UI.Workflow.ConditionStep.Execute(ExecutionContext context)
  at MobileCrm.UI.Workflow.ConditionGroup.Execute(ExecutionContext context)
  at MobileCrm.UI.Workflow.Branch.Execute(ExecutionContext context)
  at MobileCrm.UI.Workflow.ExecutionContext.Execute()
FormRules:5/07/2016 12:41:50 PMExecutionError

In the Rules log, you can find information about issues with rules. So when a user describes on what form the issue occurred, you can check the rule itself. In the rules log you can see e.g. what field is causing the issue.

A typical scenario is when the app tries to load a parent or a child record, while the lookup field on the child is empty and the parent record does not exist. So when you try to use the parent field in next step, it does not exist and the rule reports an error. In this case, the parent entity (entity or variable named feed) field statuscode is not available, or, since it is a default field, the whole record is not loaded and thus,cannot be used.

If you can’t handle this error, send us the log and screenshot of the rule to mobilecrm@resco.net and our support team will gladly assist you.

Security manager log

=============================
Log file: secmanLog.txt
2016-06-14T22:18:50.7378484-04:00 SecuredFolder violation: Hash file integrity violated.

In the Security manager log, you can see information about a potential issue with JavaScript code,or the whole customization being corrupted or violated. It means that the project hash computed at the start of the app does not match the hash that was computed during customization’s download.

It should warn the user that someone could have adjusted the customization, or JavaScript code. The user needs only to synchronize the app to get the project again.

JSBridge log

In JSBridge log, you can find errors that occurred when running your JavaScript code. You can also use this log to write your own messages, errors, etc., from the JavaScript code. In case you have issues, and the log does not help, please let us know – mail us the log and the code that causes it together with steps to reproduce it, so that we can help you as fast as possible.

JSBridge log
-------------------------------------------------
App 9.1.2.0 2016-07-26T01:50:59.1064317-04:00: Error invoking script: MobileCRM.UI.EntityForm._callHandlers('onChange',new (MobileCRM.UI.EntityForm||MobileCRM.ObservableObject)({"detailViews":[new (MobileCRM.UI._DetailView||MobileCRM.ObservableObject)({"isDirty":false,"isEnabled":true,"items":[new MobileCRM.ObservableObject(...System.Exception: Exception from HRESULT: 0x80020101
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at Resco.UI.WindowsRT.JSBridge.<InternalInvokeScript>d__11.MoveNext()
---End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at Resco.UI.WindowsRT.JSBridge.<InvokeScript>d__10.MoveNext()

Crash log

Log file: CRASH LOG

A crash log can contain two types of events:

  • It can log an error, when something wrong took place, but it does not need to lead to a crash of the application in all cases.
  • And then there’s a crash, that is logged when the Mobile CRM application malfunctions and stops working immediately and closes.

Beside the header with information about the Mobile CRM version number, time of the event and device memory information, each error or crash log contains a stack trace, a sequence of code that was executed when the problem occurred.

When such errors occur, the log can help us track the cause of the issue. But because the code is using the same methods and code parts for different entities, views etc.,we need as much information about the situation when the application crashed as possible. Ideally, all steps required to reproduce the issue, or at least the name of the entity, view, or form where the issue occurred. It of course depends on the actual issue.

Error log

An error log contains the time and date of the error that occurred. It also described the storage (disk space and RAM).

Log file: CRASH LOG
Application 9.1.2.0 ERROR 2015-09-03T22:43:06.1125440-05:00
Mem:16141976
Disk space Free/Total [MB] : 57746 / 117039
free/used/total [MB]: 21 / 761 / 987
System.Exception: OnAbortBackgroundTask

The error above represents the User Abort synchronization issue. It occurs when user puts the Mobile CRM application to the background or starts a different application during Mobile CRM app’s Synchronization.It occurs on iOS and Windows Store applications solely.

The user behavior can cause a major database corruption that can lead to data loss (unsynchronized changes), so it is important to explain users not to do so, and to keep the application running in the foreground during synchronization, and also not to turn off the device during synchronization, as well.

Application 9.0.2.0 ERROR 2016-07-14T12:29:01.6416400-05:00
Mem:2699080
Disk space Free/Total [MB] : 4930 / 28601
free/used/total [MB]: 23 / 234 / 1015
PersonalContactDisabledByFilter

This error means, that use of personal contacts, contacts from the device’s phone book, is disabled. It can be caused by view filter on Contact entity. It is a minor issue, but it can help admins identify, why a user is not seeing his personal contacts in the Resco Mobile CRM app.

Application 9.1.3.0 CRASH 2016-08-08T06:54:03.7072620+04:30
Mem:5625720
Disk space Free/Total [MB] : 5973 / 12833
free/used/total [MB]: 45 / 396 / 987
Mono.Data.Sqlite3.SqliteException: SQLite error
no such column: opportunity.statecode
  at Mono.Data.Sqlite3.SQLite3.Prepare (Mono.Data.Sqlite3.SqliteConnection cnn, System.String strSql, Mono.Data.Sqlite3.SqliteStatement previous, UInt32 timeoutMS, System.String& strRemain) [0x00000] in <filename unknown>:0
  at Mono.Data.Sqlite3.SqliteCommand.BuildNextCommand () [0x00000] in <filename unknown>:0

In this case the problem is that the opportunity statecode field was disabled in the mobile project. Since this field is required for some standard features, it should be enabled back. A no such column message indicates that a field, that is used in a form, view, chart, or else in the project, is not available in the database.

Application 9.1.3.0 ERROR 2016-08-10T14:38:31.8811220+02:00
Mem:5498376
Disk space Free/Total [MB] : 25826 / 27728
free/used/total [MB]: 72 / 446 / 987
System.Net.WebRequestException: A server with the specified hostname could not be found. (-1003)
  at System.Net.HttpConnection.GetResponse (System.Net.HttpWebRequestSync request) <0xc0df4c + 0x00368>
  at System.Net.HttpWebRequestSync.GetResponse () <0xc0ef78 + 0x0015f>
  at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.Microsoft.Exchange.WebServices.Data.IEwsHttpWebRequest.GetResponse () <0xff5414 + 0x00027>
  at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse (IEwsHttpWebRequest request) <0x102fb70 + 0x0004f>

Similarly to an integration error, the wrong Exchange URL (that could not be found) can be logged also in the application crash log, as an error.

Crash log

Every crash - unexpected closing of the Mobile CRM application (can be described as suddenly getting to the device’s home screen) - should be logged in the Crash log. It can help you - or us - to identify the cause of the crash.

Application 9.1.2.0 CRASH 2016-07-29T08:36:48.1661400+02:00
Mem:6884600
Disk space Free/Total [MB] : 52477 / 57034
free/used/total [MB]: 396 / 1314 / 1988
System.NullReferenceException: Object reference not set to an instance of an object
  at MobileCrm.Data.FetchXml.Evaluator.EvalCondition (MobileCrm.Data.DynamicEntity entity, string linkName, MobileCrm.Data.FetchXml.Condition c) <0x1004f16a0 + 0x003bc>  at MobileCrm.Data.FetchXml.Evaluator.EvalFilter (MobileCrm.Data.DynamicEntity entity, string linkName, MobileCrm.Data.FetchXml.Filter filter) <0x1004f1490 + 0x000cf>
  at MobileCrm.Data.FetchXml.Evaluator.EvalFilter (MobileCrm.Data.DynamicEntity entity, string linkName, MobileCrm.Data.FetchXml.Filter filter) <0x1004f1490 + 0x00173>
  at MobileCrm.Data.FetchXml.Evaluator.EvalLink (MobileCrm.Data.DynamicEntity entity, MobileCrm.Data.FetchXml.Entity fetchEntity) <0x1004f1350 + 0x0004b>
  at MobileCrm.Data.FetchXml.Evaluator.IsMatch (MobileCrm.Data.DynamicEntity entity) <0x1004f1310 + 0x0002b>
  at MobileCrm.Controllers.Sales.ChildEntityList`1[T].LoadDataSource (IFilterListView view) <0x100316550 + 0x00247>
  at MobileCrm.UI.BaseEntityList.LoadDataView () <0x1011a5cd0 + 0x0002b>
  at MobileCrm.UI.BaseEntityList.Refresh (IReference changedEntity) <0x1011a4b60 + 0x0015b>
  at MobileCrm.Controllers.Sales.ChildEntityList`1[T].AsyncRefresh (System.Object changedItem) <0x100316f00 + 0x000af>

This error, Object reference not set to an instance of an object, means that the application is trying to load data that cannot be found: for example a field or an entity. In this case it could be UoM, UoMSchedule (Unit, Unit Group) entity or its field was disabled. The lead to this is Sales.ChildEntityList in the trace log, since the sales entity product entity uses Unit (Unit Group’s) filed values.

Other possibilities for such an error log (with different trace) could be e.g. a field, that is on a form, or view, but was disabled in the entity section of a project. If the field name is not available in the log, like in this case, it is most likely a field used in application’s logic - a field that was enabled originally, when the project was created. If you know which field has been disabled recently, you can try to enable it back and if the issue gets fixed, avoid disabling it in the future. If not, let us know we can help. Once again, we will need the log and the descriptions of steps the users performed to cause the error (at least which entity, form, view was accessed).

Examples — synchronization issues

Server side error

Log file: syncLog.txt
Date:2016-03-04 13:51:20+08:00
Org: 00000000-0000-0000-0000-000000000000
User:00000000-0000-0000-0000-000000000000
2016-02-11T12:56:35.2971390+07:00: Exception 
RescoSoapException: Server Error: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.

This error reports a CRM server error while performing synchronization. To get more information about the error, CRM admin needs to check the CRM server side tracing logs.

Log file: syncLog.txt
Date:2016-02-05 19:59:07+11:00
Org: 00000000-0000-0000-0000-000000000000
User:00000000-0000-0000-0000-000000000000
2016-02-05T19:59:07.4005620+11:00: Exception
Thread: Exception while fetching entity new_supplierappointment
Inner: RescoSoapException: Server Error: Code.Value=s:Sender| Reason.Text=SQL timeout expired.| Detail.OrganizationServiceFault.ErrorCode=-2147204783| Detail.OrganizationServiceFault.Timestamp=2016-02-05T08:59:00.9805882Z| Detail.OrganizationServiceFault.InnerFault.InnerFault.ErrorCode=-2147220970| Detail.OrganizationServiceFault.InnerFault.InnerFault.Message=System.Data.SqlClient.SqlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #58AF102B
  at ...WebServiceBase.ThrowSoapException (HttpException ex)
  at XmlResponse..ctor (System.context, async, soap, System.XmlReaderSettings xmlSettings)
  at XmlResponse..ctor (System.context, async)
  at Crm2011.CrmService2011+<ExecuteFetch>c__Iterator1.MoveNext ()
  at Synchronization.SyncEngine+EntityDownloader.Downloader ()

The error above is a server-side error. To solve it, please contact your CRM administrator, who can check the server-sid eMS Dynamics CRM tracing logs and determine what exactly the issue is. To find more information, look for the reference number #58AF102B in the tracing logs.

Log file:syncLog.txt
Date:2016-02-29 9:57:07+11:00
Org: 00000000-0000-0000-0000-000000000000
User: 00000000-0000-0000-0000-000000000000
2016-02-29T09:58:32.8934570-05:00: Create Error
appointment[Appointment name, c407aacd-bccf-47b6-820d-eb5509daf9b7]
RescoSoapException: Server Error: ErrorCode=-2147204305| Message=A validation error occurred. The value of 'scheduleddurationminutes' on record of type 'appointment' is outside the valid range.| Timestamp=2016-02-29T14:58:26.8601196Z| TraceText= [Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.TargetAttributeValidationPlugin] [c754fdb4-ef2f-4f2c-b49f-186214ab4dcd: TargetAttributeValidationPlugin]

This error is caused by a plugin, as the data that the user entered in the appointment does not meet the plugin’s criteria. In the MS Dynamics CRM’s tracing log,you should also find a trace from the plugin.

2016-02-29T09:58:40.2293950-05:00: Exception
System.Exception: Can't execute Full Sync forced by Administrator because upload of local changes failed
  at SyncEngine.Execute (db, Synchronization.SyncResult& result) <0x1003cf710 + 0x008e8>
  at SyncEngine.Execute (db, MobileCrm.config, Synchronization.SyncResult& result, System.Func`3 progress, Synchronization.SyncConflict conflictCallback, Boolean IsHighEndDevice) <0x1003d0d40 + 0x00197>

Forced full sync could not be performed, due to unsynchronized changes (e.g. the create appointment error above). Unless the sync errors are solved, forced full sync will not be performed. If you do not need to keep the changes, the user can perform Delete Date from Mobile CRM app’s Setup. This will remove all, including unsynchronized,changes from the device and the next sync will be a full synchronization.

Server Permission Issues

Log file: syncLog.txt
Date:2016-01-19 16:38:36+08:00
Org: 00000000-0000-0000-0000-000000000000
User:DEMO
Date:2016-01-19 16:46:05+08:00
Org: 51449dee-b7be-48d6-baef-e47cd2012af2
User:d66a457f-9192-e511-811e-c4346bacafe8
License: Valid
New Customization 58309823-8f68-4487-a1dc-5c0d55eae4ac (body: True)Permission query returned no results!
Exception while syncing: product
Inner: RescoSoapException: Server Error: -2147220960| Principal user (Id=d66a457f-9192-e511-811e-c4346bacafe8, type=8) is missing prvReadCore_accountcroppest privilege(Id=b9fa861f-9016-4815-ad07-4c8f0a765509)| 2016-01-19T08:46:04.9968562Z
  at ...WebServiceBase.ThrowSoapException (HttpException ex)

Based on this error you can see that user is missing a privilege to read the entity. It means that user permissions were changed. To fix it, user needs to perform a full synchronization - either a forced full sync from Woodford, or by deleting the local data, if there are no unsynchronized changes.

Log file: syncLog.txt
Date:2016-03-09 12:49:47-08:00
Org: 00000000-0000-0000-0000-000000000000
User:DEMO2016-03-22T11:44:06.7418960-07:00: Exception
RescoSoapException: Server Error: Code.Value=s:Sender| Reason.Text=SecLib::RetrievePrivilegeForUser failed -no roles are assigned to user.Returned hr = -2147209463, User: 5b93777b-59ef-e511-811b-c4346bacd1a8| Detail.OrganizationServiceFault.ErrorCode=-2147209463|

According to this error, a user does not have a security role assigned. If the user should be able to access the CRM, system admin needs to assign the user at least one role.

Log file: syncLog.txt
Date:2016-02-11 19:42:47+08:00
Org: 00000000-0000-0000-0000-000000000000
User:DEMO2016-02-11T19:42:47.1135010+08:00: Exception
RescoSoapException: Server Error: MSIS7068: Access denied.
  at XmlResponse..ctor (System.context, async, soap, System.XmlReaderSettings xmlSettings)
  at ...WebServiceBase.InternalEndInvoke (System.request, System.readResponse)

According to this log, it seems that the user might have been disabled. CRM admins should be able to identify the issue.

Connection issues - Bad URL

All the following logs have one thing in common – an incorrect CRM URL, or the fact that the CRM server is not accessible from the device.

Log file: syncLog.txt
Date:2016-03-03 12:05:13-06:00
Org:3cbc7cf6-f7ff-e411-80e2-005056be5ca2
User:efa439c9-4ccf-e511-80f9-005056be1bc8
2016-03-03T12:05:13.7107630-06:00: Exception
System.Net.WebRequestException: The request timed out. (-1001)
  at System.Net.HttpConnection.GetResponse (System.Net.IOSWebRequestrequest) <0x100c295e0 + 0x002f8>
  at System.Net.IOSWebRequest.GetResponse () <0x100c2a4d0 + 0x00137>
  at Crm2011.WsdlHelper.FindAuthenticationTypeAndUrl(MobileCrm.LoginInfo settings, MobileCrm.SimpleLoginInfo login, System.String url, System.String& type, System.String& authUrl, System.String& authId) <0x1004c4aa0 + 0x0016b>
  at CrmService2011.Connect (MobileCrm.LoginInfo settings, MobileCrm.SimpleLoginInfo login, System.Action`2 Log) <0x1004bc6c0 + 0x0014f>
Log file: syncLog.txt
Date:2016-03-03 00:08:57+00:00
Org: 00000000-0000-0000-0000-000000000000
User:DEMO
2016-03-03T00:08:57.8342050+00:00: Exception
System.Net.WebRequestException: A server with the specified hostname could not be found. (-1003)
  at System.Net.HttpConnection.GetResponse (System.Net.IOSWebRequest request)
  at System.Net.IOSWebRequest.GetResponse ()
  at Crm2011.WsdlHelper.FindAuthenticationTypeAndUrl (MobileCrm.SimpleLoginInfo login, System.String url, System.String& type, System.String& authUrl, System.String& authId)
Log file: syncLog.txt
Date:2016-03-02 13:47:44-08:00
Org: 00000000-0000-0000-0000-000000000000
User:DEMO
Disco connection failedto :'https://crm.server.com/MSCRMServices/'
2016-03-02T13:47:44.3738260-08:00: Exception
System.Net.WebRequestException: Could not connect to the server. (-1004)
  at System.Net.HttpConnection.GetResponse (System.Net.IOSWebRequest request) <0xbc7ccc + 0x00360>
  at System.Net.IOSWebRequest.GetResponse () <0xbc8cd0 + 0x0015f>
Log file: syncLog.txt
Date:2016-03-02 21:18:22+00:00
Org: 00000000-0000-0000-0000-000000000000
User:DEMO
Disco connection failed to :'https://crm.server.com/MSCRMServices/'
2016-03-02T21:18:22.1814900+00:00: Exception
System.Net.WebRequestException: Failed to load URL(Error code: 503)(503)
Log file: syncLog.txt
Date:2016-03-22 18:50:30-04:00
Org: 00000000-0000-0000-0000-000000000000
User:DEMO
Disco connection failed to :'https://crmusa.tempursealy.com/MSCRMServices/2007/AD/CrmDiscoveryService.asmx'
2016-03-22T18:50:30.2383410-04:00: Exception
System.Net.HttpException: HTTP Error not found (404) ---> System.Net.HttpException: HTTP Error not found (404)

All of the above and other similar logs refer to issues with reaching the CRM server.It can be either an incorrect URL in the Mobile CRM application’s synchronization dialog, or the fact that the CRM server is not accessible from the device. E.g. user needs to use VPN connection before running synchronization.

We use this message in such cases:

Please, make sure, that you use the correct MS Dynamics CRM URL. You can try to connect with that URL via your mobile web browser to check if your CRM is accessible. Can you connect?

Time, date issues

Log file: syncLog.txt
Date:2016-02-05 12:06:18+08:00
Org: 00000000-0000-0000-0000-000000000000
User:DEMO
2016-02-05T12:06:18.9497260+08:00: Exception
RescoSoapException: Server Error: Code.Value=s:Sender| Code.Subcode.Value=a:BadRequest| Reason.Text=ACS10001: An error occurred while processing the SOAP header.
Trace ID: 3e75fceb-7e49-4945-9070-51078b662c7c
Timestamp: 2016-02-05 05:07:07Z
  at MobileCrm.Data.WebService.CrmServiceFactory.Connect (settings, MobileCrm.SimpleLoginInfo login, System.Log) [0x00164]
  at MobileCrm.Data.WebService.CrmServiceFactory.Connect (settings, System.Log)
  at SyncEngine.Execute (db, Synchronization.SyncResult& result) [0x00024]
  at SyncEngine.Execute (db, MobileCrm.config, Synchronization.SyncResult& result, System.Func`3 progress, Synchronization.SyncConflict conflictCallback, IsHighEndDevice) [0x00062]

“An error occurred while processing the SOAP header” means that user’s time zone, time or date is not set accurately and authentication against the CRM server cannot be performed. This is the most common issue. In some cases, it can be caused by incorrec tcredentials entered by user. When we receive a log with such error, we reply with the following message:

“Your username/password is not set correctly, or time and date is not set accurately. Please double check your credentials and try to set the date and time to automatic, then synchronize again. Also, you can check if it is possible to connect to your MS Dynamics CRM directly from your mobile web browser, so your CRM is accessible via your mobile device.”

Log file: syncLog.txt
Date:2016-03-24 08:14:51+01:00
Org: 00000000-0000-0000-0000-000000000000
User:DEMOCrm2011ConnectFailed
2016-03-24T08:14:51.9302260+01:00: Exception
RescoSoapException: Server Error: An error occurred when verifying security for the message.
  at...WebServiceBase.ThrowSoapException (HttpException ex) <0x1004b7270 + 0x000a8>
  at XmlResponse..ctor (System.context, async, soap, System.XmlReaderSettings xmlSettings) <0x1004b7bc0 + 0x0010f>
  at ...WebServiceBase.InternalEndInvoke (System.request, System.readResponse) <0x1004b7320 + 0x00077>
  at ...WebServiceBase.Invoke (System.action, System.args, System.writeRequest, System.writeHeader, System.readResponse) <0x1004b7550 + 0x00047>
  at Crm2011.FederationService.IssueSecurityToken (System.target, System.header, System.keyType, System.trustNamespace) <0x1004a6b90 + 0x0029f>

Log file: syncLog.txt
Date:2016-02-11 08:13:35+01:00
Org: 00000000-0000-0000-0000-000000000000
User:00000000-0000-0000-0000-000000000000
2016-02-11T08:13:35.7113480+01:00: Exception
RescoSoapException: Server Error: Code.Value=s:Sender| Code.Subcode.Value=a:FailedAuthentication| Reason.Text=ID3242: The security token could not be authenticated or authorized.

These two issues are very similar to the one before. Again, a possible time zone, time, date, or user credentials issue. Again, we usually reply with this message to users:

“Your username/password is not set correctly, or time and date is not set accurately. Please double check your credentials and try to set your date and time to automatic, then synchronize again. You can also check if it is possible to connect to your MS Dynamics CRM directly from your mobile web browser, so your CRM is accessible via your mobile device.”

User credentials / access issues

Log file: syncLog.txt
Date:2016-01-20 11:20:58+13:00
Org: 00000000-0000-0000-0000-000000000000
User:00000000-0000-0000-0000-000000000000
2016-01-20T11:20:58.5142250+13:00: Exception
RescoSoapException: Server Error: Code.Value=s:Sender| Code.Subcode.Value=a:FailedAuthentication.ExpiredPassword| Reason.Text=MSIS3125: The password for domain\user has expired.| Detail.UserAccountPasswordExpiredFault.UserAccountName=TWI\Deborah.Dougherty
  at ...WebServiceBase.ThrowSoapException (HttpException ex) <0x1004ef410 + 0x000a8>
  at XmlResponse..ctor (System.context, async, soap, System.XmlReaderSettings xmlSettings) <0x1004efe70 + 0x001a7>
  at ...WebServiceBase.InternalEndInvoke (System.request, System.readResponse) <0x1004ef4c0 + 0x00077>
  at ...WebServiceBase.Invoke (System.action, System.args, System.writeRequest, System.writeHeader, System.readResponse) <0x1004ef6f0 + 0x0005b>

The password for domain\user has expired issue means that the user needs to log in to the CRM server via browser and update his password. Then of course,he/sheneeds to use the new updated password in the Mobile CRM app as well. To users experiencing this problem we send the following message:

“You need to log in to your CRM using the browser on your device and you will be asked to change your password. When you do, you also need to change your passwordinthe RescoMobile CRM app(to the one you’vejust setup via the browser).”

2016-03-04T08:14:49.4904330+02:00: Exception
RescoSoapException: Server Error: Code.Value=S:Sender| Code.Subcode.Value=wst:FailedAuthentication| Reason.Text=Authentication Failure DefaultURL| Detail.error.value=0x80048831| Detail.error.internalerror.code=0x80041082| Detail.error.internalerror.text=The password for the account has expired.

Similar issue as the previous one. The user needs to log in to the CRM server via the browser, to change the expired password. In this case, it was an error with CRM online.

Log file: syncLog.txt
Date:2016-03-02 15:44:09-05:00
Org: 00000000-0000-0000-0000-000000000000
User:DEMO
2016-03-02T15:44:09.6740830-05:00: Exception
RescoSoapException: Server Error: Code.Value=S:Sender| Code.Subcode.Value=wst:FailedAuthentication| Reason.Text=Authentication Failure| Detail.error.value=0x80048821| Detail.error.internalerror.code=0x80041012| Detail.error.internalerror.text=The entered and stored passwords do not match.

The entered and stored passwords do not match: This message speaks for itself. The user name or password that the user entered into the Mobile CRM app is not correct. It can be a typo in the password, a missing domain name in the username, or a missing / incorrect organization on CRM URL, etc. You most probably know your CRM server authentication, or you can use this message as reference:

“Your username or password is not set correctly. Please double check your credentials and synchronize again. Also make sure that you specified the organization name in the URL and the domain name in the username, in the case they are used.”

Log file: syncLog.txt
Date:2016-03-02 14:10:34-06:00
Org: 59fe8e8d-e4be-4b42-bedf-755693b54e56
User:384a3d29-9930-e511-916d-005056ad7bb9
2016-03-02T14:10:34.9694180-06:00: Exception
System.Net.HttpException: HTTP Error unauthorized (401) ---> System.Net.HttpException: HTTP Error unauthorized (401)
  at System.Net.HttpConnection.GetResponse (System.Net.IOSWebRequest request) <0x100c755e0 + 0x00438>
  at System.Net.IOSWebRequest.GetResponse () <0x100c764d0 + 0x00137>

This is an issue similar to the previous one – again we’re dealing with potentially incorrect credentials, or either domain name or organization missing. Same is also the message we send to users:

“Your username or password is not set correctly. Please double check your credentials and synchronize again. Also make sure that you specified the organization name in the URL and the domain name in the user name, in the case they are used.”

Log file: syncLog.txt
Date:2016-03-22 15:34:21-05:00
Org: 00000000-0000-0000-0000-000000000000
User:DEMO
2016-03-22T15:34:21.3511880-05:00: Exception
RescoSoapException: Server Error: Code.Value=s:Sender| Code.Subcode.Value=a:FailedAuthentication| Reason.Text=Access is denied.
  at MobileCrm.Data.WebService.CrmServiceFactory.Connect (settings, MobileCrm.SimpleLoginInfo login, System.Log) <0x42bda8 + 0x004d8>
  at MobileCrm.Data.WebService.CrmServiceFactory.Connect (settings, System.Log) <0x42bd74 + 0x00027>
  at SyncEngine.Execute (db, Synchronization.SyncResult& result) <0x3a7000 + 0x00167>
  at SyncEngine.Execute (db, MobileCrm.config, Synchronization.SyncResult& result, System.Func`3 progress, Synchronization.SyncConflict conflictCallback, IsHighEndDevice) <0x3a8998 + 0x001e7>

This error indicates a user without access to the CRM server. This needs to be checked by the CRM admin, whether the user should have access to CRM or not.

Wrong user mode

<Log file: syncLog.txt
Date:2016-03-04 13:51:54+01:00
Org: 00000000-0000-0000-0000-000000000000
User:DEMO
2016-03-04T13:51:54.0323870+01:00: Exception
RescoSoapException: Server Error: Code.Value=Sender| Reason.Text=Customer mode setup for this organization not found.
  at ...WebServiceBase.ThrowSoapException (HttpException ex) <0x1004b2590 + 0x000a8>

This message means that the user used something other than the Internal user mode to synchronize the Mobile CRM application. In order to get the project assigned as an internal (CRM) user, the user needs to switch the User Mode (in the Mobile CRM app’s Sync Dialog) back to Standard User option.

Update application

Log file: syncLog.txt
Date:2016-08-09 08:18:17+02:00
Org: 00000000-0000-0000-0000-000000000000
User:00000000-0000-0000-0000-000000000000
License: Valid
2016-08-09T08:18:17.3044890+02:00: Exception
MobileCrm.Data.Customization.CustomizationException: Unsupported metadata version 21 (20) Update Application
  at MobileCrm.Data.Customization.Service.DownloadCrmCustomization (ICrmService service, MobileCrm.config, System.String currentVersion, System.String filePath, System.Action`2 logger, MobileCrm.Data.Crypto.SecuredFolder sf) <0x356a08 + 0x015cc>

This means that the Mobile CRM application is unable to download the mobile project and synchronize, as the Mobile CRM app version is lower than version of Woodford used to publish the mobile project. This can happen when you update Woodford and publish a project before you check whether all users updated the Resco Mobile CRM application to the latest version. It is also an evil way of forcing all users to update their Mobile CRM application.

If the Woodford update happened by mistake, it is possible to publish the project as a previous version. Otherwise, you can send this message to users, notifying them that Mobile CRM app update is required:

Please update your Resco Mobile CRM app (latest version is available in the app store) and synchronize again.

License issues

MobileCrm.Data.Customization.CustomizationException: LICENSE: NOT FOUND

This is a sync error that tells us the user does not have a mobile license. It needs to be assigned to him/her in Woodford’s Mobile users section.

MobileCrm.Data.Customization.CustomizationException: LICENSE: EXPIRED

If this error occurs, the license needs to be assigned as the user is in pending mode for more than two weeks. This happens when Auto assign licenses in Woodford are disabled and the user synchronizes without having a mobile license assigned in advance. If a license is not assigned, the user will not be able to synchronize, just like when he/she is disabled from using a license.