Error upon loading analysis in Scheduled Updates "Prompting is not allowed for shareable documents"

Error upon loading analysis in Scheduled Updates "Prompting is not allowed for shareable documents"

book

Article ID: KB0083943

calendar_today

Updated On:

Products Versions
Spotfire Web Player All versions

Description

It is common that the following two tests are performed to ensure that an analysis works on the targeted environment:

When you open an analysis using the installed Analyst client, it works as expected and you see no prompts.
When you try to open the same analysis saved to the library, in the Web Player, it works as expected and you see no prompts.

Based on these results, you want to schedule your analysis in Scheduled Updates to ensure that it is always cached and reached by the consumers faster. When Scheduled Updates tries to load it however it fails, and when looking into the logs for the Web Player you see the following error listed: 

ERROR;2017-05-29T14:18:14,679+02:00;2017-05-29 12:18:14,679;99079edb-3a1f-460a-9bd0-6f10d4334e5c;1911396a4aFCnk;WorkThread 97;scheduledupdates@SPOTFIRESYSTEM;Spotfire.Dxp.Web.Library.ScheduledUpdates;"Load of '/Folder/AnalysisFile e3a89225-4058-444f-aa74-4e3e7da2ffa7' (e3a89225-4058-444f-aa74-4e3e7da2ffa7) failed (JobDefinitionId=0bfa78c7-ebaf-4d91-8749-e2bf19dd910b, JobInstanceId=48786ce3-4f29-4882-a68d-c70bbd5e042e)"
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Prompting is not allowed for shareable documents.
at Spotfire.Dxp.Web.WebAnalysisRoot.OpenShareableMasterDocument(PartiallyOpenedDocument partiallyOpenedDocument, Boolean calculateStats, StatsBundle statsBundle, DocumentViewManager masterDocumentViewManager)
at Spotfire.Dxp.Web.Library.ScheduledUpdates.Item.<>c__DisplayClass40.<>c__DisplayClass42.<InternalPerformUpdate>b__3a()
at Spotfire.Dxp.Web.WebProgressService.Spawn(String title, String description, ProgressOperation operation, Boolean showCancelButton)
--- End of inner exception stack trace ---
at Spotfire.Dxp.Framework.ApplicationModel.ProgressService.ExecuteWithProgressCancelable(String title, String description, ProgressOperation operation, Boolean showCancelButton)
at Spotfire.Dxp.Web.Library.ScheduledUpdates.Item.<>c__DisplayClass40.<InternalPerformUpdate>b__39()
at Spotfire.Dxp.Web.WebApplicationThread.Invoke(ApplicationInvocation method, Boolean performLogging)
--- End of inner exception stack trace ---
at Spotfire.Dxp.Web.WebApplicationThread.Invoke(ApplicationInvocation method, Boolean performLogging)
at Spotfire.Dxp.Web.WebApplicationThread.Invoke(ApplicationInvocation method, Boolean performLogging)
at Spotfire.Dxp.Web.Library.ScheduledUpdates.Item.InternalPerformUpdate(UserSession userSession, UpdateFileInfoCache cacheUpdater, DateTime startTime)
at Spotfire.Dxp.Web.Library.ScheduledUpdates.Item.PerformUpdate(UserSession userSession, UpdateFileInfoCache cacheUpdater)

The cause to the above error is that the Scheduled Updates user, the user executing all loads and refreshes, does not have sufficient privileges on the folders containing the required items for the analysis in question. When using Information Services, it is only required to have Access privileges to the folders containing the Information Model. In the case of Data Connectors it needs both Browse + Access privileges to the folders containing the data sources / connections involved in the analysis. If this is not given, it will try and used the cached version of the sources / connections inside the analysis and will therefore have to ask for the credentials which is does by prompting the user. But as this is executed by Scheduled Updates, prompting is not supported and it fails with the above error.

Issue/Introduction

When trying to load an analysis in the Scheduled Updates cache, where the data has been imported using Data Connectors and the credentials are saved, you might notice that it fails and when looking at the error message you see the following error: System.InvalidOperationException: Prompting is not allowed for shareable documents.

Resolution

Ensure that the Scheduled Updates user (IIS Application Pool user in 7.0.x and below, scheduledupdates@SPOTFIRESYSTEM in 7.5 and forward) has at least Browse + Access to the folder containing the data source / connection used in the analysis