Log files

From Resco's Wiki
Jump to navigation Jump to search
Resco Academy
Resco Academy has a course on a similar subject:
Resco Support


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 folders:
(Win 8.1) %LOCALAPPDATA%\Roaming\MobileCRM\
(Win 10) %APPDATA%\MobileCRM, which is typically: C:\Users\{UserName}\AppData\Roaming\MobileCRM
  • In case of Windows Store (Win10, WinUWP) version, it’s
%LOCALAPPDATA%\Packages\Resco.MobileCRM_{StoreId}\LocalState\MobileCRM, which is typically: C:\Users\{UserName}\AppData\Local\Packages\Resco.MobileCRM_{StoreId}\LocalState\MobileCRM

Finding physical files on Mac

If you are using Mac with an M1 chip, you can install the iOS version of the app on your Mac. This allows you to access the files just like on a Windows PC. The files are available in the hidden ~/Library/Containers folder.

  1. Run Finder and go to the User folder.
  2. From the menu, select Go > Go to Folder...
  3. Type "library" and press Enter.
  4. Open the Containers folder to find app data.
  5. Go to MobileCrm/Data/Documents.

If you're using other apps instead of the Finder to browse the files, such as Terminal, you may see an obscure ID (such as "DAC418AD-901A-44A3-83A9-35C3C1105C03") instead of "MobileCrm" as the folder name.

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:

Inspecciones personalizadas (versión en español)
Powered by Resco Mobile CRM v13.1.0.3
AppStore Version
Platform: WinRT
Device ID: AwBi8QgAcL4F...wewkALrE=
Device Name: J.resco2.local
Device Model: Unknown Windows.Desktop
OS Version: Windows NT 10.0.18363.900 (2814750970545028)
Resco.MobileCRM_13.1.0.0_x64__nf1vnwdtkksgr
Application name and version
The application name reflects the Title and Subtitle 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.
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 this line shows anything else, it means the user is running a custom-built application based on the Resco Mobile CRM technology.
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.

Synchronization log

When synchronization is successful, sync log records all the important information about the synchronization. Any issues are logged, included as many details as possible. The synchronization log can also be used to check synchronization performance.

We are continuously working to improve the sync log. This description corresponds to release 13.1.0.

The sync engine continuously collects information during the sync process and at the end, the most important information is extracted into the Summary section (described in more detail below).

You can enable a more detailed sync log by using the configuration option Diagnostic Sync Logs. We recommend this in case of problems.

The most important parts of sync log are described below.

Log file: syncLog.txt
Date:2020-06-22 09:58:02+02:00
Org: dc6a053b-446a-48d5-a48f-011ed6265b22
User:601d9d17-89b4-e111-9c9a-00155d0b710a

New Customization e89b30c0-9b89-4369-bc38-26dc0a2958f8
LicenseCheck: Requested: Inspections => Response: ([Inspections/Trial/2020-06-28T00:00:00.0000000Z],[Core/Trial/2020-06-28T00:00:00.0000000Z]) => Licensed
<GetCustomization Tim=1532/>
ValidateSchema=15ms
CustomizationUnpack=1657ms

<Details>
<Perm Priv=328ms Org=203ms/>
</Details>

<Summary>
<Settings App='13.1.0.3' Server='Xrm' Threads='3' MaxExecMultiple='0' Foreground='true' Launch='Manual'/>
<Results Sent='0' Recv='0' Result='CustomizationReady, RestartSyncInBackground'/>
<Times Total='4328ms' Connect='437ms' Prepare='3875ms'/>
<DownloadCustomization Status='NewCustomization' UnpackTime='1657ms' TotalDownloadTime='1532ms' />

<ApiCalls Prepare='11' Total='11' />
</Summary>

Summary section

The Summary section may include over 100 different statistics and information. In this description, we focus on the most important ones.

Settings
<Settings App='13.1.0.3' Server='Xrm' Threads='3' MaxExecMultiple='0' Foreground='true' Launch='Manual'/>
  • App: the version of the Resco Mobile CRM app
  • Server: the backend server ("Xrm" for Resco Cloud, "Salesforce", or Dynamics version, for example "Crm2011.13/ADFSUser")
  • Threads: number of download threads in the entity downloader
  • MaxExecMultiple: Woodford configuration parameter # Records / UploadRequest
  • Foreground: Foreground vs background synchronization
  • Launch: Was the sync launched manually ("Manual") or automatically ("Auto")
  • NOLOCK: Woodford configuration parameter No Lock During Sync
Results
<Results Sent='0' Recv='0' Result='CustomizationReady, RestartSyncInBackground'/>
  • Sent: number of uploaded records
  • Recv: number of downloaded records
  • Result: Either "Normal" or a combination of the following: "CustomizationReady" (new or changed customization was found, downloaded and applied), "Wiped" (application was wiped by admin), "UploadErrors", "AppLocked" (application was locked by admin), "Aborted" (sync process was killed), "AdminFullSync" (administrator forced full sync from Woodford), "WebError", "ConnectFailed", "OAuthError", "RestartSyncInBackground", "Warning"
Times
<Times Total='4328ms' Connect='437ms' Prepare='3875ms'/>
  • Total: Total time spent in this SyncEngine pass (does not include time spent downloading asynchronous attachments and Exchange/Google sync)
  • Connect: Time spent in server handshake
  • Prepare: Time spent for download of metadata, including app project, permissions, Salesforce layouts, creation of a new database if needed and preparation for download
  • UploadTotal: Time spent in upload

Entity downloader (IncSync / FullSync)

<FullSync Recv='480' TotalTime='2109ms' Entitys='859ms'>
  • Recv: # records downloaded
  • TotalTime: Total time spent
  • Entitys: Time spent in the download of "normal" entities
  • ManyToMany: Time spent in the download of intersect (NN) entities
  • Imgs: Time spent in the download of entity images headers (actual images are downloaded as attachments)
  • Shared: Time spent in shared records download (SyncShared)
  • ActivityPartys: Time spent in the download all activityparty records
  • MarketingListTime: Time spent in marketing lists download
Delete plugin
<SyncDeletes TotalTime='94ms'/>
  • AnalyzeTime: Time spent in SyncDeletes analyzer
  • NoSvrChanges: No changes since the last sync
  • PartialFullSyncForced: FullSync forced for some tables (Because of too many Server deletes)
  • nDeletes: number of ordinary records deleted
  • nnDeletes: number of intersect (NN) records deleted
  • nFetches: number of API calls in SyncDeletes module
  • NoSvrChanges: No Server Changes
  • TotalTime: Time spent in SyncDeletes module
SyncAnalyzer statistics
<SyncAnalyzer SkipEntitys='28' TotalTime='578ms'/>
  • PartialFullSyncForced: FullSync forced for some tables (Because it is more efficient than normal incremental sync)
  • AnalysisBroken: SyncAnalyzer aborted prematurely
  • SkipEntitys: number of entities skipped
  • TotalTime: Time spent in SyncAnalyzer module
SyncDownloader statistics
<SyncDownloader CacheSize='250MB' UsedCache='121MB' PausedFor='23%'/>
  • CacheSize: Upper limit (theoretical) for the downloader cache
  • UsedCache: Really used downloader cache
  • PausedFor: How long was some download thread blocked because of full cache

SyncShared (download of shared records)

<SyncShared Recv='123' Del='123' Conflicts='123' SlowEntities='account; contact' TotalTime='453ms'/>
  • Recv: number of records downloaded
  • Del: number of records deleted
  • Conflicts: number of conflicts
  • SlowEntities: list of entities with substantial downloads (current limits: download_time>10s or #_processed_records>10K)
  • TotalTime: Time spent in SyncShared module

Cleanup

<Cleanup RecsDeleted='0' NNRecsDeleted='123' RecordCleanup='219ms' DocsDeleted='0' DocsCleanup='219ms'/>
  • RecsDeleted: number of ordinary records deleted
  • NNRecsDeleted: number of intersect (NN) records deleted
  • RecordCleanup: cleanup duration (does not encompass document cleanup)
  • DocsDeleted: number of documents deleted
  • DocsCleanup: document cleanup duration

Attachment download

<Attachments DequeueEmptyNotes='9;31ms' Recv='123' Failed='123' Skipped='72'/>
  • DequeueEmptyNotes: Number of empty notes; time spent in the detection of empty notes (As an optimization - empty notes are processed in a separate step)
  • Recv: number of attachments downloaded
  • Failed: number of attachments failed (Attachments whose download finished in HTTP error 401 or 404; other errors are considered fatal and abort whole attachment download)
  • Skipped: number of attachments skipped (exceed appSettings.MaxAttachmentSize or do not match BlobStoreFilter - if any)
  • Waiting: number of attachments that remained in the queue when the download was interrupted (Will be downloaded during next sync)
  • Cleaned: number attachments dropped because they belong to a record which is no longer in the client DB [and how log took the cleanup]
  • TotalTim: Total time spent in attachments download
  • Aborted: If the attachments download was aborted

Document sync

SharePoint download

(download of document headers from SharePoint server (docs themselves are downloaded by FileDownloadQueue)

<SharePointDownload REST='False' OAuth='False' TotalTime='1215375ms' ParsingTime='123ms' .../>

Terminology used for SharePointDownload stats:

  • REST: appSettings.UseRestApiForSharePoint: REST API is switched on
  • OAuth: appSettings.UseNewRestApiForSharePoint: New SharePoint REST API is switched on
  • TotalTime: Total time spent in SharePoint downloader
  • ParsingTime: Time spent in processing GetListCollection responses
  • GetListCollectionCalls: number of server requests + time spent in GetListCollection requests
  • GetListCalls: Same stats for GetList calls. This step is omitted when using REST API.
  • GetListItemsCalls: Same stats for GetListItems calls
  • IgnoredLists: Lists apriori ignored (e.g. lists which are not document libraries or hidden)
  • UnchangedLists: Lists not changed since the last sync
  • FailedLists: Failed to get list details
  • FileInfosSaved: List items that refer to a SharePoint document
  • NotDownloaded: Documents skipped (exceed appSettings.MaxAttachmentSize or do not match BlobStoreFilter)
  • Deletes: Docs deleted from the client because they were deleted from the server
  • UnknownDeletes: Documents deleted at the server that were not found on the client

Nice case (fast) - using REST API

<SharePointDownload REST='True' OAuth='False' TotalTime='3015ms' GetListCollectionCalls='3x/1438ms' GetListItemsCalls='9x/1390ms' FileInfosSaved='256'/>

Nice case without REST API (Using REST API would save ~860ms)

<SharePointDownload REST='False' OAuth='False' TotalTime='3016ms' GetListCollectionCalls='1x/1515ms' GetListCalls='31x/860ms' IgnoredLists='7' GetListItemsCalls='2x/563ms' FileInfosSaved='62' NotDownloaded='11'/>

Nothing downloaded because of BlobStoreFilter

<SharePointDownload REST='False' OAuth='False' TotalTime='2438ms' GetListCollectionCalls='1x/891ms' GetListCalls='6x/438ms' IgnoredLists='19' GetListItemsCalls='3x/1000ms' FileInfosSaved='30' Deletes='11' NotDownloaded='30'/>

192 sites. This is strange itself, usually a small number of sites is used, often 1.
81 document libraries. This indicates that majority of sites are not needed.
Recommendations:

  • Exclude unneeded sites: Will save 20+ secs, probably more
  • Use REST API: Will save 3.6 sec
<SharePointDownload REST='False' OAuth='False' TotalTime='73094ms' GetListCollectionCalls='192x/44304ms' GetListCalls='81x/3688ms' IgnoredLists='1240' GetListItemsCalls='173x/16294ms' FileInfosSaved='0'/>

Extreme case - many lists

<SharePointDownload REST='False' OAuth='True' TotalTime='1215375ms' GetListCollectionCalls='282x/161684ms' GetListCalls='60145x/995196ms' IgnoredLists='1332' GetListItemsCalls='175x/44298ms' FileInfosSaved='10' NotDownloaded='10'/>
OneDrive / GoogleDrive / Box / DropBox download

Download of document headers stored in File Engines (docs themselves are downloaded by FileDownloadQueue).

<OneDriveDownloadSync TotalTime='58641ms' #ForeignFiles=1 #FileInfosSaved=3573 #NotDownloaded=2892 #Deletes=1 SaveChangesCalls=21x/595ms/>
  • Aborted: If the download was aborted
  • Failed: If the download has failed
  • TotalTime: Total time spent in the download
  • ForeignFiles: Documents refused as they do not match naming convention (<path>/<entity_name>/<record_name>_<record_id>/<file_name>)
  • FileInfosSaved: number of doc headers stored in the client DB (enqueued in FileDownloadQueue)
  • NotDownloaded: Documents skipped (exceed appSettings.MaxAttachmentSize or do not match BlobStoreFilter)
  • Deletes: Documents deleted from the client because the were deleted from the server
  • SaveChangesCalls: Internal performance counter
FileDownloadQueue
Centralized queue used for the download of SharePoint and other file documents (runs in parallel to those engines)
<FileDownloadQueue Threads='10' Aborted='true' .../>
  • Threads: number of download threads
  • Aborted: If the download queue was aborted (fatal failure is not considered as an abort)
  • TotalTime: Time spent in document queue download
  • Resumed: Docs left from the previous (unfinished) sync
  • Discarded: Usually refers to orphaned docs (documents assigned to records that are no longer in the client database)
  • RefusedForQuotaExceeded: number of docs refused based on BlobStoreFilter.Quota
  • Downloaded: number of docs downloaded
  • Waiting: number docs that remained in the queue when the download was interrupted (Will be downloaded during next sync)
  • TotalDownloadSize: Total size of downloaded docs
  • Speed: TotalSize / TotalTime

Nice speed

<FileDownloadQueue Threads='10' TotalTime='12625ms' Downloaded='256' TotalDownloadSize='56712K' Speed='35.094Mbps'/>

BlobStore quota in action

<FileDownloadQueue Threads='10' TotalTime='205750ms' RefusedForQuotaExceeded=1301 Downloaded='355' TotalDownloadSize='1034536K' Speed='39.282Mbps'/>

Slow download (reason unknown)

<FileDownloadQueue Threads='10' TotalTime='327531ms' Downloaded='2414' TotalDownloadSize='66104K' Speed='1.577Mbps'/>
Document upload
<SharePointUpload TotalTime='58641ms' ... />

Similar parameters exist for OneDrive/GoogleDrive, etc. Common document parameters are the same as for document download. The following parameters are upload-specific:

  • Uploaded: Documents uploaded to the server
  • UploadFailures: Documents which failed to upload to the server (Each failure is logged additionally as separate error)
  • Deleted: Documents deleted from the server
  • DeleteFailures: Documents which failed to be deleted from the server (Each failure is logged additionally as separate error)

Upload example

<SharePointUpload REST='False' OAuth='True' TotalTime='1109ms' Uploaded='1'/>

Errors / warnings / conflicts

These optional subsections of the summary section are omitted if there are no errors, warnings, or conflicts found.

App projects (customizations)

<DownloadCustomization Status='NewCustomization' UnpackTime='1657ms' TotalDownloadTime='1532ms' />
  • Status: NotFound, NotModified, Error, Unsupported, DownloadFailed, NewCustomization
  • LicenseError: NOT FOUND, EXPIRED, INVALID ORGANIZATION, INVALID USER, EDITION NOT ALLOWED, URL NOT ALLOWED, INVALID SIGNATURE, INSUFFICIENT}
  • License: Valid, TrialExpired, Free, Error
  • WWWsize: total size of the WWW folder in Bytes
  • WWWdownloadTime: download duration of WWW folder
  • ImagesSize: total size of images in Bytes
  • ImagesDownloadTime: image download duration
  • UnpackTime
  • TotalDownloadTime: Time spent in customization download except UnpackTime. (Customization update is not counted either.)
<UpdateCustomization Status='NewCustomization' UnpackTime='1657ms' TotalDownloadTime='1532ms' />

<UpdateCustomization Result='SchemaAndFilterUnchanged'/>
  • Result: One of: SchemaAndFilterUnchanged, CustomizationIgnored, DbUpdated, FullSyncForced
  • AnalyzeTime
  • ApplyTime
  • TotalTime

Analysis

The analysis section can contain potentially useful hints that might help improve synchronization performance.

Tip / warning More information
<Tip001>Woodford: Consider increase of '#Records / UploadRequest' to speed up the Upload.</Tip001> You can do this in Woodford Configuration. If you increase this too much and the upload speed is slow, you can run into timeouts.
<Tip002>SyncDownloader paused for 28%; consider cache size increase.</Tip002> Read more about the SyncDownloader, particularly about the parameter DownloadCacheSize.
<Tip003>Consider using 'Background File Sync' (Woodford); the user won't wait for attachments download.</Tip003> You can do this in Woodford Configuration. Applies to foreground sync. With this setting, most of the synchronization steps are done in foreground mode, except for attachments.

Alternatively, you can enable Background Download; in this case, both records and attachments are downloaded in the background.

<Tip004>Consider using 'SharePoint REST API' (Woodford); you will save GetList web calls.</Tip004> Resco supports multiple methods for connecting to SharePoint.
<Tip005>Do you need 12345 SharePoint sites? Each site requires at least 1 web call.</Tip005> Read more about SharePoint integration.
<Tip006>FileDownload: Over 1 GB of downloaded data. Consider using BlobStoreFilter to set up a data limit (quota).</Tip006> Document filters allow you to configure which cloud documents and notes attachments are downloaded to the device during sync. You either use more restrictive filters or set a hard limit (quota).
<Warn001>DEMO customization used</Warn001> The app doesn't connect to any organization/server, instead it uses built-in sample data.
<Warn002>Old customization used</Warn002> A newer customization is available, but it failed to be downloaded. The log may contain additional information about the failure.
<Warn003>FileDownload: Slow.</Warn003> Many possible reasons: slow network, slow server, slow device.
<Warn004>Minor perf problem (unneeded downloads): 1234 records were first downloaded, but they were later deleted as they did not match SyncFilter at the client. Problem is usually caused by inconsistent links in the SyncFilter definition.</Warn004> See Sync Filter and Sync Filter examples for inspiration.
<Warn005>Major perf problem (unneeded downloads): 57616 records were first downloaded, but they were later deleted as they did not match SyncFilter at the client. Problem is usually caused by inconsistent links in the SyncFilter definition.</Warn005> See Sync Filter and Sync Filter examples for inspiration.
<Warn006>Downloaded data are incomplete: Download of some entities was interrupted (Warning 'max # of objects received'). Cleanup deleted additional 12345 records which became orphaned (probably) due to missing records.</Warn006> Warn006 and Warn013 refer to the same problem - download of some entities was prematurely interrupted due to Max Sync Records limit.
  • Warn006 says that the problem happened in the current run.
  • Warn013 enumerates problematic entities, whereby it does not matter whether the problem happened in this sync run or any past sync run since the last FullSync.

The most important thing to remember is that your client data is inconsistent. You should either correct Sync Filter or increase the value of Max Sync Records.

<Warn007>Long record cleanup</Warn007> The Cleanup sync step deletes records that don't match the Sync Filter and performs also other actions.

The cleanup log contains information about which entities caused the delays. Consider simplifying your Sync Filter for these entities.

<Warn008>Many deletes in record cleanup</Warn008> As above, check your Sync Filter for affected entities. Often, there's no simple advice. The problem can be in your data model.
<Warn009>Long documents cleanup</Warn009> This warning appears when the document cleanup phase takes more than 4 seconds. Consider whether this happens frequently enough to warrant further analysis.
<Warn010>Many deletes in documents cleanup</Warn010> This warning appears if more than 100 documents are deleted. Consider whether this happens frequently enough to warrant further analysis.
<Warn011>Slow entity image download</Warn011> Dynamics only. Not much that you can do about it. Do you need these images on the client? Do you need all the records?
<Warn012>Long time spent in MarketingList download</Warn012> Integration with marketing services currently isn't supported.
<Warn013>Incomplete entities: account contact</Warn013> See Warn006.
<DownloadPerformance>0.1 ms/rec (exceptional)</DownloadPerformance> General performance rating for the record download phase of sync (weak / a bit slow / good / very good / exceptional). See Advanced sync setup (Sync Config) for more information.

API calls

The API calls section counts the number of web requests to the server. See API calls for more information.

<ApiCalls Prepare='11' Total='11' />
  • Prepare: number of web requests during connect, customization upgrade, permissions refresh
  • Layouts: (Salesforce only) number of web requests during layouts refresh
  • Uploader: number of web requests during upload phase
  • DelPlugin: number of web requests during SyncDeletes phase
  • SyncAnalyzer: number of web requests during SyncAnalyzer phase
  • Downloader: number of web requests for download of "normal" entity records
  • NNDownloader: number of web requests for download of intersect (NN) entity records
  • MarketingLists: number of web requests for download of marketing lists
  • SyncShared: number of web requests for download of shared records
  • Images: number of web requests for download of image headers
  • XrmServer: (Salesforce only) number of web requests to the XRM server (all other API calls are for Salesforce server)
  • Attachments: number of web requests during attachments download
  • Total: total number of web requests during this sync run

Other log sections

Even more detailed times for the preparation phase provides the following section. GetCustomization shows the time needed to download the customization project. DbPrepare reveals the time 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,

Exclude document locations from Sync filter

Warning: sharepointdocumentlocation SyncFilter should exclude Locations referring to these entities: opportunity quote salesorder amb_commercialcontact lead

The warning means that some entities are not enabled in the app project (they are not a part of the mobile app) and they have more than 1000 document locations. Excluding them from the document location will speed up the synchronization.

To perform sync filter for document location, see Documents#Troubleshooting.

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

Rules are the most important tool for adding business logic to your Resco Mobile CRM app. Rules are scripts that are executed when a user of the mobile app opens a new view or form, taps a button or record, modifies any value, etc. You can modify many things using the scripts, most notably, change or validate data or change the UI.

In the Rules log, you can find information about issues with executing the rules in the app. Troubleshooting a problem with rules usually requires that you have access to the rule in question.

  • If you have access to the app project and the user can describe in which UI component the issue occurred, you can check the rule itself. In the rules log, you can see e.g. what field is causing the issue.
  • If you don't have direct access to the app project, ask the customer's Woodford administrator at least for a screen shot of the rule in question.
=============================
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

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.

If your log includes a line like this: Form:sf_timesheet|Rule:1, the number at the end indicates which form rule is affected:

  • 0: OnLoad
  • 1: OnChange
  • 2: OnSave
  • 3: Execute Command
  • 4: Can Execute Command
  • 5: Execute Button Command

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 when someone tampers with the customization (when one of its files is deleted or modified). 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. The security is only checked when the project setting Enable Customization Security is enabled in Woodford configuration.

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.

Note: Some files that can be modified at app run time, for example, config.xml, have their own hash. When someone edits config.xml directly, the information is written to the crash log instead.

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).

realtime.log

This log is generated if you are using geofencing. If you set Log verbosity to "Diagnostic", the log contains details about all geofencing events, including each Enter/Exit event with an anonymous ID of the record related to the geofence.

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, the 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, contact your CRM administrator, who can check the server-side MS 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 Data" 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 the user is missing a privilege to read the entity. It means that user permissions were changed. To fix it, the 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, the 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., the user needs to use a 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.

More examples

See Exceptions for information about more problems that users and support providers can encounter when working with Resco.