Splunk Search

Why am I getting error "Cannot find viewstate with vsid="XXXXXXXXX""? while saving searches?

Kaushikkatta03
Explorer

I'm trying to save the search, but getting this error:

Saved Search - Cisco -
Error - Encountered the following error while trying to update: In handler 'savedsearch': Cannot find viewstate with vsid="XXXXXXXXX"
0 Karma

scruse
Path Finder

Do you see any errors in splunkd.log or splunkd_access.log related to the "missing" viewstate? Perhaps there is some indication of a failure to create that viewstate.

Additionally, you need to have the ability to modify viewstates in any app where you want to save searches, even private saved searches. (IE: Write permissions) This is why apps like the search app (for example) make viewstates world-writable.

The relevant bit of configuration goes into $SPLUNK_HOME/etc/apps/your-app/metadata/default.meta. For example, in $SPLUNK_HOME/etc/apps/search/metadata/default.meta:

 ### VIEWSTATES: even normal users should be able to create shared viewstates
 [viewstates]
 access = read : [ * ], write : [ * ]
 export = system
Get Updates on the Splunk Community!

Splunk Enterprise Security(ES) 7.3 is approaching the end of support. Get ready for ...

Hi friends!    At Splunk, your product success is our top priority. With Enterprise Security (ES), we're here ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...