Symbolic link causes stall on Export

Howdy!

Just a quick note on something I fixed with a work-around, but perhaps needs to be worked out in the Local app. However, I would like to know if there is something I missed in my config of Local that would make this work.

When attempting to export a WordPress site, I was getting an initial zip file created, then stalled at about 53kb. The Local app continued to say it was exporting, but just stalled for an hour before I re-started the site to clear the export. The local-by-flywheel.log showed an error:

  • info: [main/exportSite] {“errno”:-2,“code”:“ENOENT”,“syscall”:“stat”,“path”:"/Users/xxxxx/Local Sites/flywheeltest1/app/public/wp-content/db.php"}

That file is a symbolic link created by the Query Monitor plugin for WordPress.

I tried renaming the file, but got the same error, so I deleted it and copied the actual file from the link location to the wp-content directory.

Once I did that, the export went through in about 45 seconds.

Any ideas on how Local’s export handles symbolic links?

BTW- Using the copied db.php file didn’t work for the plugin, so it has to be a symbolic link to continue to work properly.
https://github.com/johnbillion/query-monitor/wiki/db.php-Symlink

Hey there,

Sorry for the trouble!

I’ll make a note of this in our bug tracker.

Just chiming in to say I had this happen today as well. Using query monitor as well.

The export was failing.

Gonna paste my error here in case I google this again in a few months :slight_smile:

error: [worker: export-site-worker] ENOENT: no such file or directory, stat

/app/public/wp-content/db.php

Deactivating Query Monitor Plugin removes the symlink. You can then export.

Just ran into this exact problem.

I don’t think deactivating Query Monitor should be the solution to this. Instead, the exporter should just understand how to cope with symbolically linked files.

Here’s the relevant lines from local-by-flywheel.log

May 23, 2018, 1:18 PM CDT - info: [main/waitForMySQL] Querying MySQL
May 23, 2018, 1:18 PM CDT - error: [worker: export-site-worker] ENOENT: no such file or directory, stat '/path/to/local/edd/app/public/wp-content/db.php'
Error: ENOENT: no such file or directory, stat '/path/to/local/edd/app/public/wp-content/db.php'
    at fs.statSync (fs.js:973:11)
    at Object.fs.statSync (ELECTRON_ASAR.js:280:16)
    at Object.realpathSync (fs.js:1659:12)
    at Object.fs.realpathSync (ELECTRON_ASAR.js:321:29)
    at _0x412542.(anonymous function)._0x510208 (/Applications/Local by Flywheel.app/Contents/Resources/app.asar/main/exporters/Exporter.js:1:5729)
    at Array.forEach (native)
    at (anonymous function)._0x412542 (/Applications/Local by Flywheel.app/Contents/Resources/app.asar/main/exporters/Exporter.js:1:5502)
    at <anonymous>

Hey @JJJ,

Thanks for the log snippet!

This is resolved in Local by Flywheel 2.3.1 (Pre-release)

1 Like

Alright! Thanks Clay!