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 importing Apps #146

Closed
MBstatsara opened this issue Jun 9, 2023 · 5 comments
Closed

Error importing Apps #146

MBstatsara opened this issue Jun 9, 2023 · 5 comments

Comments

@MBstatsara
Copy link

Hi

I am struggling to get apps to import, this seemed to work before, id make the intune.win file, rename it to the name of the app, then export the json and reimport with the application location, sometimes it wouldnt accept the file in Azure, and take its time doing so, but now it seems to stop everytime.
I cant even upload the intune.win file using the upload button.

All i get is this

Exception calling "OpenRead" with "1" argument(s): "End of Central Directory record could not be found."

Its trying to dump some files into a temp location and then still not working..

Here is a screengrab of the errors.

Thanks

Exception calling "OpenRead" with "1" argument(s): "End of Central Directory record could not be found."
At C:\M365Data\IntuneManagement-3.9.0.1\Extensions\IntuneAppManagement.psm1:29 char:5
+     $zip = [IO.Compression.ZipFile]::OpenRead($intunewinFile)
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidDataException

You cannot call a method on a null-valued expression.
At C:\M365Data\IntuneManagement-3.9.0.1\Extensions\IntuneAppManagement.psm1:36 char:5
+     $zip.Dispose()
+     ~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Exception calling "OpenRead" with "1" argument(s): "End of Central Directory record could not be found."
At C:\M365Data\IntuneManagement-3.9.0.1\Extensions\IntuneAppManagement.psm1:29 char:5
+     $zip = [IO.Compression.ZipFile]::OpenRead($intunewinFile)
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidDataException

Exception calling "ExtractToFile" with "3" argument(s): "Value cannot be null.
Parameter name: source"
At C:\M365Data\IntuneManagement-3.9.0.1\Extensions\IntuneAppManagement.psm1:33 char:9
+         [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_,  ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException

You cannot call a method on a null-valued expression.
At C:\M365Data\IntuneManagement-3.9.0.1\Extensions\IntuneAppManagement.psm1:36 char:5
+     $zip.Dispose()
+     ~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Get-Item : Cannot find path 'C:\Users\AzureMethods\AppData\Local\Temp\2\foxit.intunewin'
because it does not exist.
At C:\M365Data\IntuneManagement-3.9.0.1\Extensions\IntuneAppManagement.psm1:240 char:27
+             sizeEncrypted = (Get-Item $tmpIntunewinFile).Length
@Micke-K
Copy link
Owner

Micke-K commented Jun 9, 2023

Hello!

You should not have to rename the file. The file name is in the json info.

The error looks a bit weird. Like it can get the info from the file. I'll try to have a look at this on the weekend or next week.

Cheers!

@MBstatsara
Copy link
Author

The reason we rename the file in both json and the file name, is because we have lots of apps all the same..
So foxit.intunewin would be in the json file, as would notepad++ for example

Thanks!

@Micke-K
Copy link
Owner

Micke-K commented Jun 9, 2023

Hello,

That makes sense.

I tried an upload and had no issues.

"End of Central Directory record could not be found"

Sound like something is wrong with the intunewin file. Some suggestions in the link below. Can you rename to .zip and see if you can extract it?

https://stackoverflow.com/questions/20960403/end-of-central-directory-record-could-not-be-found

Cheers!

@Micke-K
Copy link
Owner

Micke-K commented Oct 22, 2023

Any update on this or can we close the issue?

Cheers!

@MBstatsara
Copy link
Author

Lets close this one off thanks!
Seems the intune.win files dont seem to work very well, we are now using winget to push them anyways, so thats a much simpler route, does mean we dont have ready apps deployed, but the actual tasks work! Little bit more time but nothing major

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

2 participants