Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument list too long -:1.1: Document is empty #12

Open
GadgetGeekNI opened this issue Sep 19, 2023 · 10 comments
Open

Argument list too long -:1.1: Document is empty #12

GadgetGeekNI opened this issue Sep 19, 2023 · 10 comments

Comments

@GadgetGeekNI
Copy link

Hi all, I seem to be doing something wrong...
I'm pulling down a script and xml, renaming one of the parameters in the xml and pushing back up and getting the error in the title.

This is my xml, no formatting issues. Not sure where to go from here.

<?xml version="1.0" encoding="UTF-8"?>
<script>
  <name>setupYourMac.sh</name>
  <category>Enrollment</category>
  <info/>
  <notes/>
  <priority>After</priority>
  <parameters>
    <parameter4>scriptLog</parameter4>
    <parameter5>debugMode</parameter5>
    <parameter6>welcomeDialog</parameter6>
    <parameter7>completedActionOption</parameter7>
    <parameter8>requiredMinimumBuild</parameter8>
    <parameter9>outdatedOsAction</parameter9>
    <parameter10>webhookURL</parameter10>
    <parameter11>presetConfiguration</parameter11>
  </parameters>
  <os_requirements/>
</script>

I saw a different issue similar to this but I noticed I already have that hotfix as I just started using git4jamfpro in the past week or so.

@ryangball
Copy link
Contributor

That XML worked fine for me. I assume the script is just a vanilla setupyourmac script?

@GadgetGeekNI
Copy link
Author

That's correct. I'm not exactly sure what's going wrong with it. The script itself runs fine.

@GadgetGeekNI
Copy link
Author

If it helps.

This is the whole error message..

./git4jamfpro.sh: line 94: /usr/bin/xmlstarlet: Argument list too long -:1.1: Document is empty ^ Failed to encode the script xml record and script contents properly.

Do you think it could be caused by the script itself in that case?

@ryangball
Copy link
Contributor

Yes, I just tested with the script contents and received the same error. I have a thought. Is this what you are getting in your CI/CD pipeline or locally?

@GadgetGeekNI
Copy link
Author

That's in the Bitbucket Pipeline!

Mine is just using the basic example but for reference, below.

image: atlassian/default-image:3
definitions:
  services:
    docker:
      memory: 4096
  steps:
    - step: &PushChangesToJamfPro
        name: 'Pushing Changes to Jamf Pro'
        clone:
          depth: 2
        script:
          - apt-get update && apt-get install libxml2-utils xmlstarlet -y
          - chmod +x ./git4jamfpro.sh
          - ./git4jamfpro.sh --url "$JAMF_PRO_URL" --username "$API_USER" --password "$API_PASS" --push-changes-to-jamf-pro --backup-updated
        artifacts:
          - backups/**

pipelines:
  default:
    - step:
        name: Default pipeline executed
        script:
          - echo "No action taken outside of Development/Production branch."
  branches:
    development:
      - step: *PushChangesToJamfPro
    production:
      - step: *PushChangesToJamfPro

@ryangball
Copy link
Contributor

Seems to be the ARG_MAX in that image due to the size of the setupyourmac.sh script. Locally I didn't have an issue but in Bitbucket I did for that script. I can likely fix this by re-factoring a little.

@GadgetGeekNI
Copy link
Author

Happy to be a test candidate for this. Thank you for figuring it out so quickly, I can't imagine how long I would've been scratching my head over this.

@chrisgrande
Copy link

I just bumped into this with a new script that's around 4700 lines.

@hooleahn
Copy link

Same issue with the SYM script. Tried bumping the arg_max in the Github Actions runner, but no luck. Locally works fine.

@GadgetGeekNI
Copy link
Author

I don't suppose anyone made headway with this? I didn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants