Closed lajennylove closed 1 week ago
Gracias, @lajennylove!
@wojtekn can you take a look? Thanks!
Thanks for reporting the issue @lajennylove and for including detailed steps.
I tried to reproduce it in Studio 1.0.3 but couldn't, as it failed earlier in the flow:
Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.0.30-dev. in /var/www/html/wp-content/themes/sage-vite/vendor/composer/platform_check.php on line 24
I reproduced it with 8.2 and tracked it to the code from https://github.com/illuminate/filesystem/blob/70487deb0aabbf0ac2f79d4f86e1b2c539f0bbfc/Filesystem.php#L225:
// Fix permissions of tempPath because `tempnam()` creates it with permissions set to 0600...
if (! is_null($mode)) {
chmod($tempPath, $mode);
} else {
chmod($tempPath, 0777 - umask());
}
$mode
is null, umask()
returns 0777
, so the file ends up with permissions set to 0.
As a quick workaround, I propose adding umask(022);
in wp-config.php
before pulling and installing the theme.
@adamziel any thoughts on that? Should we set default umask for PHP-WASM?
Should we set default umask for PHP-WASM?
I think we should do the same thing as native PHP – is that the default PHP behavior?
I think we should do the same thing as native PHP – is that the default PHP behavior?
I think it's more related to the operating system, and not PHP itself. It seems that 022 is a common default value on the UNIX system. Reference:
As a quick workaround, I propose adding umask(022); in wp-config.php before pulling and installing the theme.
The workaround seems good. At the Playground platform level, it seems like an Emscripten-level issue:
We'll need either an Emscripten PR or a Playground-level patch.
Hey there guys, is there any update regarding this issue? I've seen a few updates on the Studio App so I've been updating since then and checking if the issue is solved but I guess you are still working on it.
That's pretty much it, I just wanted to keep track on this issue because this is stopping me from start using this app as my local dev environment.
Best regards.
@lajennylove we don't have a fix yet, but it's on our radar.
Heads up that this issue will be solved via https://github.com/Automattic/studio/pull/555.
Quick summary
I don't know if this is related to the new implementation regarding the PHP selector, but as soon as I tried to use it I found permission issues.
Here's the screenshot:
I tried to do the following to fix the issue:
Then I though it wouldn't work and I stopped trying.
Steps to reproduce
What you expected to happen
The theme gets activated with no issues like if you were using any other LAMP environment.
What actually happened
I get the following error and I think it could affect to all the users that require composer's cache packages or related:
Impact
Most (> 50%)
Available workarounds?
No and the app is unusable
Platform
Mac Silicon
Logs or notes
No response