Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlik Sense API DoSave() is not effective for published apps

Hi,

I have got some trouble calling the Qlik Sense API via .NET SDK that makes a published app to contain old data. I call ILocation.App(), IApp.DoReload() and IApp.DoSave(). The script fetches XML and I can see the app contains new data, but only when logging in to Qlik Sense Hub with the same user as the user who triggered API calls. Moreover a user who has got root admin permissions (and being the author of the app) gets the following exception when calling DoSave():

Qlik.Engine.MethodInvocationException: Forbidden [LOCERR_HTTP_403]:Forbidden(REST HTTP error)

   at Qlik.Engine.Communication.QlikConnection.AwaitResponseTask(T task, String methodName, CancellationToken cancellationToken)

Following can be found in the logs:

218    20160610T082915.023+0100    ERROR    WPGVQLIK01    System.Repository.Repository.Core.Repository.Common.TransactionUtility    23    1a369562-06e3-47eb-b6ec-64060c1fbd6c    NT AUTHORITY\SYSTEM    Error when committing.    Forbidden  at Repository.Core.Repository.Common.ModelRepository`1.<>c__DisplayClass4f.<ExecuteUpdate>b__4d()↵↓   at Repository.Core.Repository.Common.TransactionUtility.RunInTransaction(ITransaction transaction, IEnumerable`1 actions)    2c99dcc2-85b5-4730-8084-b1f01fc9ffc7    1a369562-06e3-47eb-b6ec-64060c1fbd6c
219    20160610T082915.023+0100    ERROR    WPGVQLIK01    System.Repository.Repository.Core.Repository.AppRepository    23    035f68b4-6770-4ac3-830e-8611a2da61fd    NT AUTHORITY\SYSTEM    Unexpected error in ExecuteUpdate    Forbidden  at Repository.Core.Repository.Common.ModelRepository`1.<>c__DisplayClass4f.<ExecuteUpdate>b__4d()↵↓   at Repository.Core.Repository.Common.TransactionUtility.RunInTransaction(ITransaction transaction, IEnumerable`1 actions)↵↓   at Repository.Core.Repository.Common.TransactionUtility.RunInTransaction(TransactionFlags flags, Action[] actions)↵↓   at Repository.Core.Repository.Common.ModelRepository`1.ExecuteUpdate(T item, T persistedItem)    2c99dcc2-85b5-4730-8084-b1f01fc9ffc7    035f68b4-6770-4ac3-830e-8611a2da61fd
220    20160610T082915.023+0100    ERROR    WPGVQLIK01    System.Repository.Repository.Core.Repository.Common.TransactionUtility    23    a43ceab4-be9e-4b58-976a-c1b8855e58ab    NT AUTHORITY\SYSTEM    Error when committing.    Forbidden  at Repository.Core.Repository.Common.ModelRepository`1.<>c__DisplayClass4f.<ExecuteUpdate>b__4d()↵↓   at Repository.Core.Repository.Common.TransactionUtility.RunInTransaction(ITransaction transaction, IEnumerable`1 actions)↵↓   at Repository.Core.Repository.Common.TransactionUtility.RunInTransaction(TransactionFlags flags, Action[] actions)↵↓   at Repository.Core.Repository.Common.ModelRepository`1.ExecuteUpdate(T item, T persistedItem)↵↓   at Repository.Core.Repository.AppRepository.InternalBaseExecuteUpdate(App item, App persistedItem)↵↓   at Repository.Core.Repository.AppRepository.<>c__DisplayClass2.<ExecuteUpdate>b__1()↵↓   at Repository.Core.Repository.Common.TransactionUtility.RunInTransaction(ITransaction transaction, IEnumerable`1 actions)    2c99dcc2-85b5-4730-8084-b1f01fc9ffc7    a43ceab4-be9e-4b58-976a-c1b8855e58ab
221    20160610T082915.023+0100    ERROR    WPGVQLIK01    System.Repository.Repository.Core.Repository.Common.TransactionUtility    23    194ccbc5-6bef-476d-b109-9ab4bfeb59e1    NT AUTHORITY\SYSTEM    Error when committing.    Forbidden  at Repository.Core.Repository.Common.ModelRepository`1.<>c__DisplayClass4f.<ExecuteUpdate>b__4d()↵↓   at Repository.Core.Repository.Common.TransactionUtility.RunInTransaction(ITransaction transaction, IEnumerable`1 actions)↵↓   at Repository.Core.Repository.Common.TransactionUtility.RunInTransaction(TransactionFlags flags, Action[] actions)↵↓   at Repository.Core.Repository.Common.ModelRepository`1.ExecuteUpdate(T item, T persistedItem)↵↓   at Repository.Core.Repository.AppRepository.InternalBaseExecuteUpdate(App item, App persistedItem)↵↓   at Repository.Core.Repository.AppRepository.<>c__DisplayClass2.<ExecuteUpdate>b__1()↵↓   at Repository.Core.Repository.Common.TransactionUtility.RunInTransaction(ITransaction transaction, IEnumerable`1 actions)↵↓   at Repository.Core.Repository.Common.TransactionUtility.RunInTransaction(TransactionFlags flags, Action[] actions)↵↓   at Repository.Core.Repository.AppRepository.ExecuteUpdate(App item, App persistedItem)↵↓   at Repository.Core.Repository.Common.ModelRepository`1.Update(T item, Boolean appendPrivileges, Int64 privilegesFilter)↵↓   at Repository.Core.Resource.AppResource.<>c__DisplayClass3a.<Bulk>b__33()↵↓   at Repository.Core.Repository.Common.TransactionUtility.RunInTransaction(ITransaction transaction, IEnumerable`1 actions)    2c99dcc2-85b5-4730-8084-b1f01fc9ffc7    194ccbc5-6bef-476d-b109-9ab4bfeb59e1

It all looks strange, like some caching was in place we can't disable. To make things even worse, a new session of the author displays stale app data even when the previous session displayed correct data. It makes me feel that app is loading some data saved a day ago.

Is there any in-depth documentation that discusses the internals of reloading and saving apps? It seems I am missing some fundamental understanding about the product. What should I do to make the published apps correctly reloaded and saved for all users of a stream?

1 Reply
Not applicable
Author

Hi,

The user executing the "DoReload" needs to have read and update privileges on the App_* and read privileges on ReloadTask_* .

On a server you not need to call DoSave apps are "auto" saved.

Best regards

Lars-Göran Book