Error importing site with file more than 2 GB on macOS

Issue Summary

Importing a site with files >2 GB results in an error. For example:

Error: UNKNOWN: unknown error, copyfile '/var/folders/vk/89c8t7xd0mxcz5w0m1h2k4cr0000gp/T/local-by-flywheel-Kpz_ITcBjC/carms-temp/local.sql' -> '/Users/bknight/Local Sites/christensenarms/app/sql/local.sql'
    at Object.copyFileSync (fs.js:1790:3)
    at Object.func [as copyFileSync] (electron/js2c/asar.js:140:31)
    at copyFile (%%appPath%%/node_modules/fs-extra/lib/copy-sync/copy-sync.js:66:8)
    at onFile (%%appPath%%/node_modules/fs-extra/lib/copy-sync/copy-sync.js:51:37)
    at getStats (%%appPath%%/node_modules/fs-extra/lib/copy-sync/copy-sync.js:46:44)
    at startCopy (%%appPath%%/node_modules/fs-extra/lib/copy-sync/copy-sync.js:36:10)
    at Object.copySync (%%appPath%%/node_modules/fs-extra/lib/copy-sync/copy-sync.js:31:10)
    at %%appPath%%/main/importer/ImporterGeneric.js:1:2816
    at Array.forEach (<anonymous>)
    at ImporterGeneric.moveFiles (%%appPath%%/main/importer/ImporterGeneric.js:1:2785)

This is likely caused by this issue in libuv: unix: refactor uv__fs_copyfile() logic by cjihrig · Pull Request #2533 · libuv/libuv · GitHub

This issue was resolved in:

From the Changelog for Local, it seems to be using Electron v9. The last mention of Electron is in the 5.8.1 release (upgrading to Electron 9): https://localwp.com/releases/5.8.1/

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?

All sites containing a file >2 GB

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?

Yes

Replication

Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!

  • use local on macOS
  • try import a site with a file (e.g. database file) >2 GB

System Details

  • Which version of Local is being used?

v 5.10.1+5267

  • What Operating System (OS) and OS version is being used?

    • _For example: macOS Catalina (10.15.5)
  • Attach the Local Log. See this Community Forum post for instructions on how to do so:

local-lightning.log (189.5 KB)

Is there a repo for Local where a fix can be contributed for this? Thanks!

Hey @bknight – Thanks for writing in and letting us know! We don’t have a public repo for Local core – but let me verify that I understand things correctly so I can replicate and write a good bug report!

Is the issue that there is one file that is larger than 2GB within the site backup, or is it that a site backup that is larger than 2GB will cause issues?

Thanks for the info.

The issue happens when there is 1 file that is >2GB. We encountered this when including our database export as part of the import.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.