Error when creating zip backup on Windows 10 - Chrome

I have…

  • [X ] Checked the logs and have uploaded a log file and provided a link because I found something suspicious there. Please do not post the log file in the topic because very often something important is missing.

I’m submitting a…

  • Regression (a behavior that stopped working in a new release)
  • Bug report
  • Performance issue
  • Documentation issue or request

Current behavior

Backup of Squidex app created a faulty/corrupt backup zip file on Windows 10, using Chrome version 122

Expected behavior

Zip backup archive should ideally be created as a valid zip file that can be imported into another Squidex cms.

Minimal reproduction of the problem

  1. Log into our self hosted Squidex instance (IIS self hosted) (Logging in with an administrative user)
  2. Choose the app in the top menu - > app settings → backup
  3. Press the backup button, wait for the backup to complete
  4. Put the backup onto a web server that´s reachable for the cms in which the backup should be restored.
  5. In the next CMS, choose to restore the backup, this produced the error message below
2024-04-03T14:50:56Z: Started. The restore process has the following steps:
2024-04-03T14:50:56Z: * Download backup
2024-04-03T14:50:56Z: * Restore events and attachments.
2024-04-03T14:50:56Z: * Restore all objects like app, schemas and contents
2024-04-03T14:50:56Z: * Complete the restore operation for all objects
2024-04-03T14:50:56Z: Downloading Backup
2024-04-03T14:50:57Z: Failed with internal error.
  1. Since the UI error message only gave a general error message, I inspected the log output from docker, which gave a ““message”: “End of Central Directory record could not be found.”,”.

The entire entry for the above message is:

 "logLevel": "Error",
  "message": "Backup with job id fd9ad51d-f76b-436d-b984-0dbf311ee67b from URL \u0027http://uv-fpark-w3prod01.uio.no/www-data-pub\
lic/back.zip\u0027 failed.",
  "backupId": "fd9ad51d-f76b-436d-b984-0dbf311ee67b",
  "url": "http://uv-fpark-w3prod01.uio.no/www-data-public/back.zip",
  "timestamp": "2024-04-03T14:40:58Z",
  "app": {
    "name": "Squidex",
    "version": "7.13.0.0",
    "sessionId": "0600d3e5-15e4-4210-b6e8-24dc2466f79c"
  },
  "category": "Squidex.Domain.Apps.Entities.Backup.RestoreJob",
  "exception": {
    "type": "System.IO.InvalidDataException",
    "message": "End of Central Directory record could not be found.",
    "stackTrace": "   at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory()\n   at System.IO.Compression.ZipArchive..ct\
or(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding)\n   at Squidex.Domain.Apps.Entities.Backup.\
BackupReader..ctor(IJsonSerializer serializer, Stream stream) in /src/src/Squidex.Domain.Apps.Entities/Backup/BackupReader.cs:lin\
e 42\n   at Squidex.Domain.Apps.Entities.Backup.TempFolderBackupArchiveLocation.OpenReaderAsync(Uri url, DomainId id, Cancellatio\
nToken ct) in /src/src/Squidex.Domain.Apps.Entities/Backup/TempFolderBackupArchiveLocation.cs:line 66\n   at Squidex.Domain.Apps.\
Entities.Backup.TempFolderBackupArchiveLocation.OpenReaderAsync(Uri url, DomainId id, CancellationToken ct) in /src/src/Squidex.D\
omain.Apps.Entities/Backup/TempFolderBackupArchiveLocation.cs:line 78\n   at Squidex.Domain.Apps.Entities.Backup.RestoreJob.Downl\
oadAsync(JobRunContext run, State state, CancellationToken ct) in /src/src/Squidex.Domain.Apps.Entities/Backup/RestoreJob.cs:line\
 254\n   at Squidex.Domain.Apps.Entities.Backup.RestoreJob.RunAsync(JobRunContext context, CancellationToken ct) in /src/src/Squi\
dex.Domain.Apps.Entities/Backup/RestoreJob.cs:line 123"

Environment

  • [X ] Destination CMS Self hosted with docker (The CMS to which the backup should be restored)
  • Source CMS - Self hosted with IIS (The CMS from which the backup originates)
  • Self hosted with other version
  • Cloud version

Destination CMS Version: Squidex version 7.13.0.0 (Reported through the /api/info route)
Source CMS version: Squidex version version":"6.0.1.0

Browser:

  • Chrome (desktop) - Source OS was Windows 10 in the first attempt that created corrupt zip file.
  • Chrome (Android)
  • Chrome (iOS)
  • [ X] Firefox - Destination OS that was used to import the backup in the first failed attempt was Firefox on Sonoma
  • Safari (desktop)
  • Safari (iOS)
  • IE
  • Edge

Others:
Workaround by doing the export on Firefox/MacOS sonoma created no error message (valid zip archive file)

Edit: I’ve put the full log output here:

http://uv-fpark-w3prod01.uio.no/www-data-public/dockeroutput.txt

The zip archive is not valid and corrupt, but this is not a problem of the restore feature. Not sure what to do here.

Maybe it’s actually a problem of the backup feature rather than the import feature. Can check if it’s a problem to make the backup in another browser/platform…

Actually, the problem was with the backup export, not the import/recreate function, so will change the case text accordingly.

In any case, I did the following to make it work:

  1. On MacOS Sonoma, open Firefox
  2. Visit the Squidex CMS with the admin user
  3. Using Firefox, choose the app settings, then use the backup function. This produced a zip file that seemingly isn´t corrupt.
  4. In the other Squidex CMS, use the import functionality.

Result was:

``2024-04-04T09:16:10Z: Started. The restore process has the following steps:
2024-04-04T09:16:10Z: * Download backup
2024-04-04T09:16:10Z: * Restore events and attachments.
2024-04-04T09:16:10Z: * Restore all objects like app, schemas and contents
2024-04-04T09:16:10Z: * Complete the restore operation for all objects
2024-04-04T09:16:10Z: Downloading Backup
2024-04-04T09:16:11Z: Downloaded Backup
2024-04-04T09:16:11Z: Creating Users
2024-04-04T09:27:59Z: Reading 30547/306 events and 14422 attachments completed.
2024-04-04T09:27:59Z: Restored Apps
2024-04-04T09:28:00Z: Restored Assets
2024-04-04T09:28:00Z: Restored Rules
2024-04-04T09:28:00Z: Restored Schemas
2024-04-04T09:28:01Z: Restored Contents
2024-04-04T09:28:01Z: Completed Apps
2024-04-04T09:28:01Z: Completed Assets
2024-04-04T09:28:01Z: Completed Rules
2024-04-04T09:28:01Z: Completed Schemas
2024-04-04T09:28:01Z: Completed Contents
2024-04-04T09:28:01Z: Assigned current user.
2024-04-04T09:28:01Z: Completed, Yeah!`

In other words, the exported zip archive was finally valid.
1 Like