All Apps and Add-ons

Linking to flashtimeline with sid from a sideview HTML Module

chris
Motivator

When I try to redirect to the flashtimeline using the sid in an HTML Module:

<module name="HTML">
    <param name="html"><![CDATA[
        <a href=flashtimeline?sid=$results.sid$> View Results</a>
    ]]></param>
</module>

I get errors like theese:

The job appears to have expired or has been canceled. Splunk could not retrieve data for this search.

[SimpleResultsTable module] [HTTP 404] https://127.0.0.1:8089/services/search/jobs/1367928740.698/results?count=10&time_format=%25s.%25Q&ou...; [{'code': None, 'text': 'Unknown sid.', 'type': 'FATAL'}]

The job is created in the filesystem and there is no time issue as described in the flashtimeline view:

http://splunk-base.splunk.com/answers/22969/getting-an-error-banner-http-404-textunknown-sidcode-non...

I can even view the job in https://:8089/services/search/jobs/ as long as I do not click on the link.

As soon as I click on the link something seems to break.

1 Solution

chris
Motivator

The problem was that I had set onunloadCancelJobs="true" in the first line of the view xml:

<view isSticky="False" isVisible="true" onunloadCancelJobs="true" template="dashboard.html">

Setting the value to false fixed/works around the problem

The issue only occurs when using Firefox as the Browser as described in /share/splunk/search_mrsparkle/exposed/js/init.js:

// currently this only works on firefox.

// It could be made to work on IE if we removed SplunkPatchWindowUnload or reworked it somehow.
// and I cannot find a way to get this working on safari.
$(window).unload(function() {
if(Splunk.Globals.Jobber && Splunk.util.normalizeBoolean($(document.body).attr("s:onunloadcanceljobs") || false)){
Splunk.Globals.Jobber.listJobs(function(job){
return (job.canBeAutoCancelled());
}).cancel();

}
$(document).unbind();
$(this).unbind();

});

View solution in original post

chris
Motivator

The problem was that I had set onunloadCancelJobs="true" in the first line of the view xml:

<view isSticky="False" isVisible="true" onunloadCancelJobs="true" template="dashboard.html">

Setting the value to false fixed/works around the problem

The issue only occurs when using Firefox as the Browser as described in /share/splunk/search_mrsparkle/exposed/js/init.js:

// currently this only works on firefox.

// It could be made to work on IE if we removed SplunkPatchWindowUnload or reworked it somehow.
// and I cannot find a way to get this working on safari.
$(window).unload(function() {
if(Splunk.Globals.Jobber && Splunk.util.normalizeBoolean($(document.body).attr("s:onunloadcanceljobs") || false)){
Splunk.Globals.Jobber.listJobs(function(job){
return (job.canBeAutoCancelled());
}).cancel();

}
$(document).unbind();
$(this).unbind();

});

chris
Motivator

Hi Nick, it's not just the comment (at least not on my Computer). It took me a while to find out that the problem is browser specific because I randomly switch between Browsers when creating views so I run into (visual) problems quickly.

0 Karma

sideview
SplunkTrust
SplunkTrust

As it's most likely author, I would not necessarily take that comment at face value. I think the comment dates from a very long time ago and may very well not have been updated as frequently as the code itself. Although it is interesting that you're reporting that the onUnloadCancelJobs feature does indeed only work on Firefox. I'll check that out. If that's still happening it really should be addressed because it'll reduce concurrent load a lot for users predominantly using IE/safari.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Build the Future of Agentic AI: Join the Splunk Agentic Ops Hackathon

AI is changing how teams investigate incidents, detect threats, automate workflows, and build intelligent ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...