Flow Designer: Could not retrieve snapshot for test

BobPaterno
Giga Contributor

I have been testing a flow for the past several days on a sandbox instance.

I'm getting the following error now when I try to run the flow.  "Could not retrieve snapshot for test"

 

The test does not run.  Any ideas on how to proceed/fix?

 

Thanks!

8 REPLIES 8

Hitoshi Ozawa
Giga Sage
Giga Sage

What I do is create another flow and keep adding steps until the error occurs.

If the error is occurring in Action, I just test that Action individually to find which statement is causing the error.

As ServiceNow recommends, try to keep divide a flow into subflows to keep the flow short so they can be individually tested.

Andy Hopper
Tera Contributor

I know this is an old question but it was the top result on Google when I searched for the 'snapshot' error, so here's what helped me... NowSupport KB0854481
As per the article, I turned on the DEBUG logging by navigating to Process Automation > Flow Administration > Properties.

I then searched the Node logs (System Logs > Utilities > Node Log File Browser) for 

"DEBUG: Flow Designer: Compiling flow <flow name>"

and then parsed through the rows until I found the culprit.

 

For me, the problem was that I had a scripted step which contained a manually coded reference to some data in   step 11 which had since moved in the Flow sequence to step 17; the step number was no longer valid and returned a null.

e.g. 'fd_data._11__for_each.item.sys_id' was now 'fd_data._17__' and needed to be updated in the code.

ViktoriaMikoova
Tera Contributor

Bad reference to something in the flow. This usually happens when you have scripted values set up and you move around some of the steps so the numbers of the steps like fd_data._26_for_each..... is no longer step 26 for example. 


Andy Hopper solution also works but if you don't want to go search the Node Log files what worked for me was to open System Diagnostics -> Session Debug -> Debug Log and once you have it open trigger the flow test again. You should see something like this Invalid reference to: fd_data._26__for_each.item: no thrown error

 

ViktoriaMikoova_0-1715970816236.png

 

You're exactly right in my case.  I'd created a flow that started with a '10 second delay'.  In the end, because of the order things were run in, I no longer needed this delay, so I deleted it.  As a result, every script reference I'd made to another part of the flow was wrong: step 4 had become step 3, step 10 had become 9, etc.  They could (and probably should) fix that automatically when the steps get renamed!