Splunk Enterprise

Why is moment.js not available in splunk 9.1.x+?

jabezds
Path Finder

Hi,

In the splunk 9.1.x version and above,  we are noticing that the moment.js is missing in the following location, /opt/splunk/share/splunk/search_mrsparkle/exposed/js/contrib/moment.js

Due to this our custom app functionalities are not working and we are getting error as attached, Please let us know if this is a known issues and any resolutions for this.

In spite of  placing the moment.js in our app folder we still notice the app is trying to use the default moment js in this location "/opt/splunk/share/splunk/search_mrsparkle/exposed/js/contrib/moment.js" 
We have also tried other solution from the community by  placing  var moment = require('moment'); but still its returning error. 

Can you please provide any possible  solution to resolve this issue.

image (1).png

Tags (1)

norbertt911
Communicator

Hello,

First of all, I'm far far away from Java scripting. But maybe those who know this could help:

Seems to me Splunk removed the moment.js after the update. For me, it's still can be found in  /opt/splunk/quarantined_files/share/splunk/search_mrsparkle/exposed/js/contrib/ folder.

The new(?) version is supposed to be here:

/opt/splunk/share/splunk/search_mrsparkle/exposed/js/contrib/moment/lang/ , but it seems now "localised"

Or I'm totally wrong 🙂 Please share your thoughts, I faced the same issue with Cisco Cloud Security App

 

Regards, Norbert

0 Karma

norbertt911
Communicator

... I tested it if you copy back the moment.js from /opt/splunk/quarantined_files/share/splunk/search_mrsparkle/exposed/js/contrib/ 

to 

/opt/splunk/share/splunk/search_mrsparkle/exposed/js/contrib/

The Cisco app works. But this is a hack and Splunk will complain about the file integrity. I think Cisco needs to update its app.

0 Karma

dimasfs
Explorer

Same issue here

0 Karma

jabezds
Path Finder

jabezds_0-1694674913165.png

http://...@b6436b649711.1/js/contrib/moment.js it seems moment.js is missing in this location , we verified in splunk 9.1.x+ this internal splunk file seems to be missing...

avishowman
Engager

I am also facing same issue. did you find any solution?  

norbertt911
Communicator

Hi All,

I opened a ticket at Cisco support and they promised that the app will be updated soon.

KR

0 Karma

Gewch
Engager

Any update on this?

I installed v 1.0.40 and still have the same problem with moment.js.

0 Karma

norbertt911
Communicator

Hello,

1.0.40 working fine for me.

- clear your browser cache or use a different browser/incognito mode

Note: the configuration changed. You need to set a new API key even for the Overview dashboards....

0 Karma
Get Updates on the Splunk Community!

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...

Splunk App Dev Community Updates – What’s New and What’s Next

Welcome to your go-to roundup of everything happening in the Splunk App Dev Community! Whether you're building ...

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco + Splunk! We’ve ...