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

Error message: Cannot validate argument on parameter 'Body'. #3

Closed
demesg opened this issue Oct 18, 2020 · 11 comments
Closed

Error message: Cannot validate argument on parameter 'Body'. #3

demesg opened this issue Oct 18, 2020 · 11 comments

Comments

@demesg
Copy link

demesg commented Oct 18, 2020

Have created an 3.2 gb intunewin file and creating the app with :

Add-IntuneWin32App -FilePath $IntuneWinFile.Path -DisplayName $DisplayName -Description $DisplayName -Publisher $appVendor -InstallExperience system -RestartBehavior suppress -DetectionRule $DetectionRule -RequirementRule $RequirementRule -InstallCommandLine $InstallCommandLine -UninstallCommandLine $UninstallCommandLine -Icon $Icon -Verbose

It starts :

VERBOSE: Current authentication token expires in (minutes): 16                                                                                                                                          
VERBOSE: Attempting to gather additional meta data from .intunewin file: C:\temp\AutoCAD_Architecture_2021\Deploy-Application.intunewin                                                                 
VERBOSE: Successfully gathered additional meta data from .intunewin file                                                                                                                                
VERBOSE: Start constructing basic layout of Win32 app body                                                                                                                                              
VERBOSE: Constructed the basic layout for 'EXE' Win32 app body type                                                                                                                                     
VERBOSE: Detection rule objects passed validation checks, attempting to add to existing Win32 app body                                                                                                  
VERBOSE: Retrieving default set of return codes for Win32 app body construction                                                                                                                         
VERBOSE: Adding array of return codes to Win32 app body construction                                                                                                                                    
VERBOSE: Attempting to create Win32 app using constructed body converted to JSON content                                                                                                                
VERBOSE: POST https://graph.microsoft.com/Beta/deviceAppManagement/mobileApps                                                                                                                          
VERBOSE: Successfully created Win32 app with ID: ac10fde8-8ee6-40e0-87c4-b5511dc87133                                                                                                                   
VERBOSE: Attempting to create contentVersions resource for the Win32 app                                                                                                                                
VERBOSE: POST https://graph.microsoft.com/Beta/deviceAppManagement/mobileApps/***-8ee6-40e0-87c4-b5511dc87133/microsoft.graph.win32LobApp/contentVersions                                          
VERBOSE: Successfully created contentVersions resource with ID: 1                                                                                                                                       
VERBOSE: Constructing Win32 app content file body for uploading of .intunewin file                                                                                                                      
VERBOSE: POST https://graph.microsoft.com/Beta/deviceAppManagement/mobileApps/***-8ee6-40e0-87c4-b5511dc87133/microsoft.graph.win32LobApp/contentVersions/1/files                                  
VERBOSE: Waiting for Intune service to process contentVersions/files request 
.....
2 min later:
.....
VERBOSE: Uploading file to Azure Storage blob, processing chunk '264' of '526'
VERBOSE: PUT
https://***.blob.core.windows.net/*-c771-44b5-97c7-67fc43cf0b9f/*-70cf-463b-9637-9d85819b1bec/***-7b01-4f4e-b01f-cc74d5ac1519.intunewin.bin?sv=2016-05-31&sr=b&si=-62917231&si
g=****=&comp=block&blockid=MDI2Mw== with -1-byte payload
VERBOSE: received 0-byte response of content type
WARNING: An error occurred while creating the Win32 application. Error message: Cannot validate argument on parameter 'Body'. The argument is null or empty. Provide an argument that is not null or
empty, and then try the command again.```


All variables has working values.
App is created in Intune, Settings seems ok,  but "Your app is not ready yet. If app content is uploading.. 

(Get-IntuneWin32AppMetaData -FilePath Deploy-Application.intunewin).ApplicationInfo  =

xsd : http://www.w3.org/2001/XMLSchema
xsi : http://www.w3.org/2001/XMLSchema-instance
ToolVersion : 1.4.0.0
Name : Deploy-Application.exe
UnencryptedContentSize : 3304008521
FileName : IntunePackage.intunewin
SetupFile : Deploy-Application.exe
EncryptionInfo : EncryptionInfo

Version 1.2.0
edit: Forgot to mention that it stops on diffrent chunks each time.. the upload works in browser upload to intune. 
Any Ideas ?
 
@gspsteve
Copy link

Same here.
If it try to upload file with a size > 200 MB i getting the error.

Have you ever found a solution!?

@demesg
Copy link
Author

demesg commented Jan 7, 2021

No solution found, I still have the same problem.

@ghost
Copy link

ghost commented Jan 15, 2021

Can confirm that I'm experiencing the same issue. The file size varies but it's around the 230 ~ 300 MB mark that it fails.

Would be great to see some sort of workaround to this.

@ghost
Copy link

ghost commented Feb 25, 2021

@NickolajA Have you had the time to examine this issue? It would be so great to start using this tool but as of now we're hindered by the file size issue. :-(

Kind regards,
Frida

@NickolajA
Copy link
Member

I've been trying to replicate this issue, however I cannot get it to fail that all of you're describing. I tested with a 700MB+ file just now and it ran through just fine. I noticed though that it ran through the first ~60 out of 129 chunks relatively quickly, but then after that it took about 2 seconds per chunk (I'm on a 500/500 Mbps connection).

I'll have to do some more testing before I can even start to understand why it's failing, however it's hard as I can't get it to fail.

@NickolajA
Copy link
Member

Good news! I just made my test content even bigger, now around 1.5GB and I was able to reproduce the error. I'll look into it and get back once I know more.

@NickolajA
Copy link
Member

I have a working theory, that it's related to the SAS Uri renewal timer that's forcing the renewal function. Could any of you attempt to time from when the first chunk starts uploading to when the module fails? It should be approximately 7min.

@NickolajA
Copy link
Member

Just verified it myself:

VERBOSE: SAS Uri renewal is required, attempting to renew WARNING: An error occurred while creating the Win32 application. Error message: Cannot validate argument on parameter 'Body'.

@NickolajA
Copy link
Member

NickolajA commented Mar 15, 2021

This looks much better, now the SAS Uri is renewed fine, was a slight error in the empty body content not defining JSON correctly:

VERBOSE: Uploading file to Azure Storage blob, processing chunk '8' of '321' VERBOSE: PUT https://<blobblob.core.windows.net/<redacted>/<redacted>/<redacted>.intunewin.bin?sv=2016-05-31&sr=b&si=-562225987&sig =/<redacted>== with -1-byte payload VERBOSE: received 0-byte response of content type VERBOSE: SAS Uri renewal timer has elapsed: 0 minute 5 seconds VERBOSE: SAS Uri renewal is required, attempting to renew VERBOSE: POST https://graph.microsoft.com/Beta/deviceAppManagement/mobileApps/44761075-bb48-430e-9aed-351f509ec1bb/microsoft.graph.win32LobApp/contentVersions/1/files/ce620a33-8945-44ad-912a-d24227f8e76f/renewUpload VERBOSE: GET https://graph.microsoft.com/Beta/deviceAppManagement/mobileApps/<appID>/microsoft.graph.win32LobApp/contentVersions/1/files/ce620a33-8945-44ad-912a-d24227f8e76f VERBOSE: Intune service request for operation 'AzureStorageUriRenewal' is in pending state, sleeping for 10 seconds VERBOSE: GET https://graph.microsoft.com/Beta/deviceAppManagement/mobileApps/<appID>/microsoft.graph.win32LobApp/contentVersions/1/files/ce620a33-8945-44ad-912a-d24227f8e76f VERBOSE: Intune service request for operation 'AzureStorageUriRenewal' was successful with uploadState: azureStorageUriRenewalSuccess VERBOSE: Uploading file to Azure Storage blob, processing chunk '9' of '321' VERBOSE: PUT https://<blob>.blob.core.windows.net/<id>.intunewin.bin?sv=2016-05-31&sr=b&si=-562225987&sig=/<redacted> with -1-byte payload VERBOSE: received 0-byte response of content type VERBOSE: SAS Uri renewal timer has elapsed: 0 minute 0 seconds VERBOSE: Uploading file to Azure Storage blob, processing chunk '10' of '321'

@NickolajA
Copy link
Member

Would someone be kind and try to update their module with these two files that was just committed and updated in this repo:

Private\Invoke-AzureStorageBlobUploadRenew.ps1
Private\Invoke-AzureStorageBlobUpload.ps1

The fix for this issue are in here, please verify :)

@NickolajA
Copy link
Member

IntuneWin32App version 1.2.1 pushed to PSGallery which includes this fix.

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

3 participants