Splunk Dev

Error: "There was an error processing the upload..."

alex_huffman
Engager

I'm using Splunk Enterprise 9.2.0.  We are able to update our app, which is run on a VM in vSphere, using a .tar.gz file from GitLab...  [our_app_name].tar.gz

So, it works just fine on that VM, but when I try to update the one we have running in a cloud environment in AWS, I get the following error after I upload a .tar.gz file:

There was an error processing the upload.Invalid app contents: archive contains more than one immediate subdirectory: and [our_app_name]

Any advice on what might be the fix for that, or how I should start troubleshooting, I would appreciate.  Thank you.

0 Karma
1 Solution

victor_menezes
Communicator

Hey Alex,
You mean you are trying to use your tar.gz from gitlab, it can be the case git itself is appending any other folders to the root dir structure in that tar.gz? Check the content to see if that is the case (including hidden ones). It may be the case to simple remove them and try again.

View solution in original post

0 Karma

alex_huffman
Engager

Thanks.  OK, yeah, I just had to use the tar -C flag/option to unzip to a new directory, to make sure it unzipped *ONLY* the archive files there, and then I just zip it back up normally.  So, just create a new dir, and then use the -C flag/option on the tar command to unzip.  That's the easy fix.  Good to go.

0 Karma

isoutamo
SplunkTrust
SplunkTrust
Hi
I have always Makefile which generates deployment ready xxx.spl files from current clients all apps into one directory + combined tar file. Those are easy to transfer and use where they are needed.
r. Ismo
0 Karma

deepakc
Builder

adding to @victor_menezes  said. 

When uploading apps to Splunk cloud you must pass various checks. Splunk Appinspect has various standards. (On premise is different)

When you upload the app it will run check_package_compression checks, and in there you can't have . or __MACOSX type for when on Mac

"Splunk App does not contain any directories or files that start with a ., or directories that start with __MACOSX"

 

So, check your app compressed app file and remove any hidden folders or files it may even have a leading /.  

tar -tzf your_file.tar.gz

You may be able to use the git archive command (but need to ensure you remove hidden folder etc)

It’s worth looking here for latest cloud check  updates, as this criterion for cloud does change

https://dev.splunk.com/enterprise/docs/relnotes/relnotes-appinspectcli/whatsnew/ 

https://dev.splunk.com/enterprise/reference/appinspect/appinspectcheck/ 

victor_menezes
Communicator

Hey Alex,
You mean you are trying to use your tar.gz from gitlab, it can be the case git itself is appending any other folders to the root dir structure in that tar.gz? Check the content to see if that is the case (including hidden ones). It may be the case to simple remove them and try again.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...