Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Error when publishing mobile offline profile

Posted on by Microsoft Employee

The article about the preview of mobile offline says "When your admin has enabled mobile offline, the next time you access the mobile app [...]" (https://docs.microsoft.com/en-us/dynamics365/customer-engagement/mobile-app/work-in-offline-mode).

What is ment by enabling moblie offline? I had the idea that this might be about setting up a mobile offline profile. When I try to publish a mobile offline profile I get an exception:

<s:Envelope xmlns:s="schemas.xmlsoap.org/.../envelope"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring xml:lang="en-US">Profile publish returned non-success code: BadRequest</faultstring><detail><OrganizationServiceFault xmlns="schemas.microsoft.com/.../Contracts" xmlns:i="www.w3.org/.../XMLSchema-instance"><ActivityId>b9efdb89-2e77-4b3f-86a8-ea8a33930ec1</ActivityId><ErrorCode>-2147220970</ErrorCode><ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic"><KeyValuePairOfstringanyType><a:key>ApiExceptionSourceKey</a:key><a:value xmlns:b="www.w3.org/.../XMLSchema" i:type="b:string">Plugin/Microsoft.Crm.WebServices.PublishXmlService</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiOriginalExceptionKey</a:key><a:value xmlns:b="www.w3.org/.../XMLSchema" i:type="b:string">Microsoft.Crm.CrmException: Profile publish returned non-success code: BadRequest ---&gt; Microsoft.Crm.CrmException: Profile publish returned non-success code: BadRequest
   at Microsoft.Crm.ObjectModel.DataSyncService.DataSyncServiceProvider.&lt;&gt;c__DisplayClass13_0.&lt;&lt;PublishProfilesAsync&gt;b__0&gt;d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.&lt;ExecuteAsync&gt;d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.&lt;ExecuteAsync&gt;d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Crm.ObjectModel.DataSyncService.DataSyncServiceProvider.&lt;PublishProfilesAsync&gt;d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.&lt;ExecuteRootAsync&gt;d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.&lt;ExecuteRootAsync&gt;d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Crm.ObjectModel.MobileOfflineProfilePublisher.&lt;&gt;c__DisplayClass13_1.&lt;&lt;PublishProfilesToDataSyncService&gt;b__0&gt;d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Crm.ObjectModel.MobileOfflineProfilePublisher.PublishProfilesToDataSyncService(List`1 profileDefinitions)
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
   at Microsoft.Crm.ObjectModel.MobileOfflineProfilePublisher.PublishMobileOfflineEntities(Dictionary`2 mobileOfflineProfileDictionary)
   at Microsoft.Crm.ObjectModel.MobileOfflineProfilePublisher.PublishMobileOfflineProfiles(Dictionary`2 entitiesTable)
   at Microsoft.Crm.ObjectModel.MobileOfflineProfilePublisher.&lt;&gt;c__DisplayClass7_0.&lt;Publish&gt;b__0()
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
   at Microsoft.Crm.ObjectModel.SqlAppLockUtility.&lt;&gt;c__DisplayClass1_0.&lt;ExecuteInTransactionWithAppLock&gt;b__0()
   at Microsoft.Crm.ObjectModel.CustomizationSqlLockManager.ExecuteInLock(String operationName, Int32 errorCode, Action action)
   at Microsoft.Crm.ObjectModel.SqlAppLockUtility.ExecuteInTransactionWithAppLock(String operationName, ExecutionContext context, Action action, ProcessDependenciesOption processDependenciesOption, FlushCacheOption flushCacheOption)
   at Microsoft.Crm.ObjectModel.PublishXml.&lt;&gt;c__DisplayClass29_2.&lt;PublishInternal&gt;b__0()
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
   at Microsoft.Crm.ObjectModel.PublishXml.PublishInternal(String objectsString, Boolean flushCache, ExecutionContext context)
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
   at Microsoft.Crm.WebServices.PublishXmlService.Publish(String entities, ExecutionContext context)
   --- End of inner exception stack trace ---
   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.Pipeline.&lt;&gt;c__DisplayClass2_1.&lt;Execute&gt;b__0()</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiStepKey</a:key><a:value xmlns:b="schemas.microsoft.com/.../Serialization" i:type="b:guid">5dcbbb1b-ea3e-db11-86a7-000a3a5473e8</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiDepthKey</a:key><a:value xmlns:b="www.w3.org/.../XMLSchema" i:type="b:int">1</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiActivityIdKey</a:key><a:value xmlns:b="schemas.microsoft.com/.../Serialization" i:type="b:guid">b9efdb89-2e77-4b3f-86a8-ea8a33930ec1</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiPluginSolutionNameKey</a:key><a:value xmlns:b="www.w3.org/.../XMLSchema" i:type="b:string">System</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiStepSolutionNameKey</a:key><a:value xmlns:b="www.w3.org/.../XMLSchema" i:type="b:string">System</a:value></KeyValuePairOfstringanyType></ErrorDetails><Message>Profile publish returned non-success code: BadRequest</Message><Timestamp>2019-05-06T09:40:53.0875074Z</Timestamp><ExceptionRetriable>false</ExceptionRetriable><ExceptionSource i:nil="true"/><InnerFault><ActivityId>b9efdb89-2e77-4b3f-86a8-ea8a33930ec1</ActivityId><ErrorCode>-2147220970</ErrorCode><ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic"/><Message>Profile publish returned non-success code: BadRequest</Message><Timestamp>2019-05-06T09:40:53.0875074Z</Timestamp><ExceptionRetriable>false</ExceptionRetriable><ExceptionSource i:nil="true"/><InnerFault i:nil="true"/><OriginalException i:nil="true"/><TraceText i:nil="true"/></InnerFault><OriginalException i:nil="true"/><TraceText i:nil="true"/></OrganizationServiceFault></detail></s:Fault></s:Body></s:Envelope>

My D365 organization is completely fresh set up (Version 1710 (9.1.0.4435) online) and I am system administrator.

Categories:
  • Suggested answer
    Johnny Gong Profile Picture
    Johnny Gong 6,482 on at
    RE: Error when publishing mobile offline profile

    Hi Martype,

    When you configure Mobile offline, you should refer to this doc article:

    [View:https://docs.microsoft.com/en-us/dynamics365/customer-engagement/mobile-app/setup-mobile-offline-for-admin#step-23-set-conflict-detection-for-mobile-offline:750:50]

    Some steps which should take care:

    1. Enable entities for mobile offline synchronization from Solution Panel

    2. Publish a mobile offline profile to determine what entity & user will be available while offline

    3. Enable related Hub app module for offline

    After Admin successfully configured the above steps. The specified users defined in the mobile offline profile could go to the latest version of the Dynamics 365 for phones and tablet app from the app store. For iOS, version 13.19043.32 or later is supported; for Android, version 4.3.19043.33 or later supported.

    There would be one Offline Updates Available dialog box pop out when you login the Hub app like below:

    MO2.png    MO2.png

    Then you could update and download customizations as following suggested as end user.

    docs.microsoft.com/.../work-in-offline-mode

    When a green Wi-Fi icon next to the entity name indicates that it is available in offline mode like above 2nd screenshot. Thanks.

    Regards

    Johnny

  • KiranV Profile Picture
    KiranV 10 on at
    RE: Error when publishing mobile offline profile

    Is It a Production instance?

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error when publishing mobile offline profile

    Ok, the error occured because there was something wrong with settings of my mobile offline profile. My profile is published, now.

    However, I didn't get the "Offline Updates Available" dialog box and there was no "Offline Status" menu entry for me.

    I had to set "Enable Mobile Offline" for my app. Thanks to crmtipoftheday.com/.../dynamics-365-mobile-offline-is-back

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans