Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory not empty #29

Closed
jcsoriano opened this issue Oct 18, 2017 · 2 comments
Closed

Directory not empty #29

jcsoriano opened this issue Oct 18, 2017 · 2 comments

Comments

@jcsoriano
Copy link

jcsoriano commented Oct 18, 2017

Environment

Laravel version: 5.4.36
Tinker version: ^1.0
PHP version: 7.0.9

Problem

Cannot access tinker

This problem is also experienced by other people:
https://stackoverflow.com/q/46801515/5156885
https://stackoverflow.com/q/46792892/5156885

Steps to Replicate

Type php artisan tinker in cmd

Error

ErrorException: rmdir(C:\Users\JC\AppData\Local\Temp\php-xdg-runtime-dir-fallback-): Directory not empty in C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\dnoegel\php-xdg-base-dir\src\Xdg.php:110

Stack Trace

#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'rmdir(C:\\Users\\...', 'C:\\wamp\\www\\Mag...', 110, Array)
#1 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\dnoegel\php-xdg-base-dir\src\Xdg.php(110): rmdir('C:\\Users\\JC\\App...')
#2 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\psy\psysh\src\Psy\ConfigPaths.php(139): XdgBaseDir\Xdg->getRuntimeDir(false)
#3 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\psy\psysh\src\Psy\Configuration.php(348): Psy\ConfigPaths::getRuntimeDir()
#4 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\psy\psysh\src\Psy\Shell.php(173): Psy\Configuration->getRuntimeDir()
#5 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\symfony\console\Application.php(1163): Psy\Shell->getDefaultCommands()
#6 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\symfony\console\Application.php(431): Symfony\Component\Console\Application->init()
#7 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\psy\psysh\src\Psy\Shell.php(134): Symfony\Component\Console\Application->add(Object(Illuminate\Foundation\Console\ClearCompiledCommand))
#8 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\symfony\console\Application.php(415): Psy\Shell->add(Object(Illuminate\Foundation\Console\ClearCompiledCommand))
#9 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\laravel\tinker\src\Console\TinkerCommand.php(54): Symfony\Component\Console\Application->addCommands(Array)
#10 [internal function]: Laravel\Tinker\Console\TinkerCommand->handle()
#11 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(29): call_user_func_array(Array, Array)
#12 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#13 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#14 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\laravel\framework\src\Illuminate\Container\Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#15 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\laravel\framework\src\Illuminate\Console\Command.php(182): Illuminate\Container\Container->call(Array)
#16 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\symfony\console\Command\Command.php(262): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#17 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\laravel\framework\src\Illuminate\Console\Command.php(167): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#18 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\symfony\console\Application.php(888): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\symfony\console\Application.php(224): Symfony\Component\Console\Application->doRunCommand(Object(Laravel\Tinker\Console\TinkerCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\symfony\console\Application.php(125): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 C:\wamp\www\MagisGit\MagisCMS_Staging\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 C:\wamp\www\MagisGit\MagisCMS_Staging\artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 {main}  

Temporary work-around

The temporary workaround is to delete the contents of the php-xdg-runtime-dir-fallback- folder (which is usually just the psysh folder). However, it does not seem the right solution as we would be deleting it every time we want to access php artisan tinker

This seems to be a fairly recent problem, as the timestamp of the two links (https://stackoverflow.com/q/46801515/5156885 and https://stackoverflow.com/q/46792892/5156885) as of this writing is 9 hours and 23 hours ago, respectively.

@bobthecow
Copy link
Contributor

This is a bug with an underlying library on Windows. See bobthecow/psysh#430 for a temporary fix until a workaround is released.

@jcsoriano
Copy link
Author

jcsoriano commented Oct 24, 2017

Did a composer update and saw that psysh version was bumped up
image

I tried php artisan tinker again and can verify that this issue is now resolved. Thanks @bobthecow for the quick action!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants