Error 405 when save with Ajax

Hi Everybody !

I detect an issue with Local app on macOS.

On an fresh wordpress installation with Local,
When I try to save a big post it does not work.
I get the error 405 (not allowed).

In the browser console, I can isolate the issue.
It appears only when the Content-Length of the request is highter than 10469.
> this value is different if the site is different…

It seems the issue is an limitation for an ajax request about nginx configuration in Local. But I don’t know which configuration…

I have a linux computer, where I create a website with Local for test purpose, and everything works fine.
I try to export the website from Local Linux to import in Local macOS and the issue appears…

I discover Local since some weeks and I hope we can resolve this quickly…

Thank you.

Technical information:
macOS: 10.15.1
Local version: 5.0.7+1117
Wordpress version: test with 5.3 and 5.2.4

Other information:
For the same post, if i try with Firefox, the content-length must be 10469 max.
When i try with Chrome, it must be 10430 max…

I don’t understand why it works like this… :confused:

I try to reup this topic, 3days and only 14 views.
I hope we can found a tips to fix this issue… I can’t use local now because my posts contain too much text and I can’t save it.

Anyone else have this issue ?

1 Like

Anyone else have this issue ?

It seems that a few other people are having similar issues, me included:
[Local] Cannot add new media - Support - Local Community (I’m experiencing the same)
Duplicator Pro 405 Not Allowed NGINX - #4 by Pierre - Support - Local Community

It seems that the root cause is nginx being quite fussy regarding POST requests and their origin - but this shouldn’t be an issue for dynamic requests from wordpress/php.

Even the rather horrible hack of redirecting 405 errors to 200 messages as suggested here:

is not working.

Even a suggestion to work around this issue would be appreciated.

Alright - tried both older Wordpress and Local installs, and I’m still experiencing the same issue. I can only assume this is due to some changes in Catalina.

1 Like

I tried to re-install Flywheel and the error is still here.

I tried to re-install Flywheel after renaming the folder config (I don’t have the path in mind, I’m not on the mac). Like this, the fresh install create the new folder and… it works !

Like this, the fresh install create the new folder and… it works !

Not very surprising, considering that the issue seems to appear on Mac Os 10.15 only. Just tried the same wp install on a mac running High Sierra, no issues.

It’s a long shot, but this could be related to the new permission model for the home directories.

It looks like the issue has been fixed using 5.2.0+local-beta-1870. I can’t trigger it anymore under Catalina.

Hey Dodo, I’m glad you got it figured out. Can you explain in more detail exactly what you did to which folder to get this to work?

Alright I was able to fix my issue of no media or theme uploads and constant “405 Not Allowed” errors, by

• exporting all my sites out of Local (5.2.3 Lightning) with right click > export
• Uninstalling Local (Including the directory: Application Support/Local)
• Reinstalling from scratch
• Importing my sites back into local with File > Import
• For reference, I have Mac OS Catalina (this is likely the cause of the issue)