Cannot import MockHRService.mpk in Mendix Studio Pro 10.0.0

0
I am taking the crash course of mendix studio pro. I'm encountering a "BadZipFileException" when trying to import MockHRService.mpk package into the Mendix Modeler. The specific error message is: Mendix.Modeler.Packages.Metadata.Exceptions.BadZipFileException: The file 'C:\Users\jian.yuming\Downloads\MockHRService_10_0_0.mpk' is not a valid ZIP file. ---> Ionic.Zip.ZipException: Cannot read that as a ZipFile ---> Ionic.Zip.BadReadException: Could not read block - no data!  (position 0x00F39DA7)   at Ionic.Zip.SharedUtilities._ReadFourBytes(Stream s, String message)   at Ionic.Zip.ZipEntry.HandleUnexpectedDataDescriptor(ZipEntry entry)   at Ionic.Zip.ZipEntry.ReadEntry(ZipContainer zc, Boolean first)   at Ionic.Zip.ZipFile.ReadIntoInstance_Orig(ZipFile zf)   at Ionic.Zip.ZipFile.ReadIntoInstance(ZipFile zf)   --- End of inner exception stack trace ---   at Ionic.Zip.ZipFile.ReadIntoInstance(ZipFile zf)   at Ionic.Zip.ZipFile.Read(String fileName, TextWriter statusMessageWriter, Encoding encoding, EventHandler`1 readProgress)   at Ionic.Zip.ZipFile.Read(String fileName)   at Mendix.Modeler.Packages.Metadata.PackageImporter.ReadZipFile(String packageFilePath) in Mendix.Modeler.Packages.Metadata\PackageImporter.cs:line 23   --- End of inner exception stack trace ---   at Mendix.Modeler.Packages.Metadata.PackageImporter.ReadZipFile(String packageFilePath) in Mendix.Modeler.Packages.Metadata\PackageImporter.cs:line 27   at Mendix.Modeler.ProjectHandling.View.Packages.ProjectPackageImporterUI.Import(String packageFilePath, CreateProjectConfig config, String processTitle, Boolean isNewProject) in Mendix.Modeler.ProjectHandling.View\Packages\ProjectPackageImporterUI.cs:line 95   It appears the Modeler is unable to read the .mpk file as a valid ZIP archive. The Ionic.Zip library is throwing an error indicating it couldn't read a data block within the file. What I've tried: Redownloaded the .mpk file multiple times. Tried downloading from different browsers. Verified that my internet connection is stable during the download. Checked the file size against any available information (if provided by the source). Temporarily disabled my antivirus software. Tried saving the file to different locations on my hard drive. My Questions: Has anyone else encountered this "BadZipFileException" when importing .mpk files? Are there any known issues with specific versions of the Mendix Modeler that might cause this? I am currently using [Insert your Mendix Modeler version here]. Could there be an issue with the .mpk file itself (e.g., corrupted at the source)? Are there any other troubleshooting steps I should try? Any help or suggestions would be greatly appreciated! Thanks in advance.
asked
2 answers
0

If this is a project mpk file (not a module), try opening the file from Studio pro rather than importing.

answered
0

Hi Jian Yuming,

I just successfully downloaded and imported the mpk file, so we can eliminate the option of a corrupt source. I tried both Mx StudioPro 10.0.0 and 10.23.0, so probably not related to a specific version either.

Make sure to follow the steps as written in the learning path!

Of course there might be an issue when you download the file, but that is not something I can check. What I could do is send you the file via eg WeTransfer. You can go to my profile and contact me, so I then have your contact details.

image.png

If that does not work either, you may need to look into the access rights on the drive where your project is stored.

answered