'Script did not return expected data" error in actions

When building our integration, we're seeing the error

"Script did not return expected data. Did you call build_result/end_script? Check DebugOutput for details"
in a couple of actions that had previously been working correctly. It seems like the expected output variables (like `is_success`) are not being populated. What's even more confusing is that we are calling SiemplifyAction.end() with the correct values - when we log what we've been passing, it all seems correct. We're passing true for the result_value, passing a valid message, passing a valid execution_status, etc.. Are there any changes to the SOAR SDK that would explain this? It broke without any code changes on our side
 
0 10 211
10 REPLIES 10

@jonahbf Can you post what your sending via SiemplifyAction.end()? It would be helpful to see some of your code to help identify what might be wrong. Is there anything in debug output?

Here's a screenshot that encapsulates it

jonahbf_0-1745862388995.png

Basically with these logging and end statements

    siemplify.LOGGER.info('output_message is ' + str(output_message))
    siemplify.LOGGER.info('connectivity_result is ' + str(connectivity_result))
    siemplify.LOGGER.info('status is ' + str(status))

    siemplify.end(output_message, connectivity_result, status)
    siemplify.LOGGER.info('Successfully called "end"')

I get the following logs

[2025-04-28,17:45:49,000 INFO] ----------------- Main - Param Init -----------------
[2025-04-28,17:45:49,000 INFO] Reading configuration from Server
[2025-04-28,17:45:49,000 INFO] Reading configuration from Server
[2025-04-28,17:45:49,000 INFO] Reading configuration from Server
[2025-04-28,17:45:49,000 INFO] ----------------- Main - Started -----------------
[2025-04-28,17:45:50,000 INFO] Connection to API established, performing action Ping
[2025-04-28,17:45:50,000 INFO] output_message is Connection Established.
[2025-04-28,17:45:50,000 INFO] connectivity_result is True
[2025-04-28,17:45:50,000 INFO] status is 0

And I replicate the error in my original post

This action is a simple ping action, but it's been affecting a few of our other actions as well

Thanks for your help!

I don't think line 6 in your code will ever execute according to the docs. "No other code after the end() function is executed". 

Hey @James_E  you're correct, but that line was mostly just in there for testing purposes. It's not really relevant to the overall problem

@jonahbf I don't see the error in this message did this action fail with the same error? 

Hi @ddiserens, I should clarify we didn't get this error in a stack trace of log message, it was the output of the action. See the below screenshot

jonahbf_0-1745937514450.png

The action(s) itself appears to work correctly, but if run in a playbook it will return a failure message. We're trying to figure out why, given that we pass all of the correct values to SiemplifyAction.end()

@jonahbf Is there a way you can share with me the code so I can do some testing on my end. If its code you don't want to share publicly you can DM it to me.

@ddiserens this code is available on the marketplace as the community integration "RecordedFutureIntelligence." I've been testing the "ping" action mostly, but this issue has been affecting a few other actions as well

@jonahbf This specific integration does quite a bit to validate that you have an API configured and the you are using something that looks like a recorded future api key. When I did comment out most of the code to bypass all of the checks for an api token it did work. I think to take a look at this more closely I would suggest raising a support ticket. 

Hey @ddiserens when you say it worked, did "is_successful" return the expected output? 

Unfortunately we're a partner so we don't have access to support, but we'll raise it with our partner rep