I have used Tinker before but suddenly it stopped working, no matter what project, what version, new or existing. I am on a macbook pro 2013, mac os Sierra, iterm2 with zsh.
I have researched all over and not found anything of relevance with exception of one reference in stack overflow to https://github.com/bobthecow/psysh/issues/382 which doesn't show resolution, is not laravel specific but seems to be involving the psy shell (all other artisan commands are fine):
vagrant@homestead:~/Code/application$ php artisan tinker
[ErrorException]
Writing to /home/vagrant/.config/psysh is not allowed.
Is the error I am shown. Vagrant is set up through virtual box running homestead-7.
When I ssh into vagrant and ls -la I see the .config folder but cannot access it nor can I mkdir mvdir due to access denied errors. (Which if I am learning from the stack trace below is where the error is being triggered? Top of the trace where the touchfilemkdir is at?) The folder itself is owned by vagrant. I can make out where the error is triggering but I don't know why it could possibly be triggering regardless of what version of laravel I use, whether it is an existing project or a new download.
Within the laravel projects themselves, I have
"laravel/tinker": "~1.0",
in the composer.json and
/*
* Package Service Providers...
*/
Laravel\Tinker\TinkerServiceProvider::class
is located in app/cofig/app.php.
I did run a verbose stack trace though I'm not exactly sure just what it is pointing to as to what has broken or why.
Exception trace:
() at
/home/vagrant/Code/lightpointLP/vendor/psy/psysh/src/Psy/ConfigPaths.php:213
Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() at n/a:n/a
trigger_error() at /home/vagrant/Code/lightpointLP/vendor/psy/psysh/src/Psy/ConfigPaths.php:213
Psy\ConfigPaths::touchFileWithMkdir() at /home/vagrant/Code/lightpointLP/vendor/psy/psysh/src/Psy/Configuration.php:361
Psy\Configuration->setHistoryFile() at /home/vagrant/Code/lightpointLP/vendor/psy/psysh/src/Psy/Configuration.php:409
Psy\Configuration->getHistoryFile() at /home/vagrant/Code/lightpointLP/vendor/psy/psysh/src/Psy/Configuration.php:546
Psy\Configuration->getReadline() at /home/vagrant/Code/lightpointLP/vendor/psy/psysh/src/Psy/Shell.php:82
Psy\Shell->__construct() at /home/vagrant/Code/lightpointLP/vendor/laravel/tinker/src/Console/TinkerCommand.php:53
Laravel\Tinker\Console\TinkerCommand->handle() at n/a:n/a
call_user_func_array() at /home/vagrant/Code/lightpointLP/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() at /home/vagrant/Code/lightpointLP/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
Illuminate\Container\BoundMethod::callBoundMethod() at /home/vagrant/Code/lightpointLP/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
Illuminate\Container\BoundMethod::call() at /home/vagrant/Code/lightpointLP/vendor/laravel/framework/src/Illuminate/Container/Container.php:539
Illuminate\Container\Container->call() at /home/vagrant/Code/lightpointLP/vendor/laravel/framework/src/Illuminate/Console/Command.php:182
Illuminate\Console\Command->execute() at /home/vagrant/Code/lightpointLP/vendor/symfony/console/Command/Command.php:264
Symfony\Component\Console\Command\Command->run() at /home/vagrant/Code/lightpointLP/vendor/laravel/framework/src/Illuminate/Console/Command.php:167
Illuminate\Console\Command->run() at /home/vagrant/Code/lightpointLP/vendor/symfony/console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at /home/vagrant/Code/lightpointLP/vendor/symfony/console/Application.php:228
Symfony\Component\Console\Application->doRun() at /home/vagrant/Code/lightpointLP/vendor/symfony/console/Application.php:130
Symfony\Component\Console\Application->run() at /home/vagrant/Code/lightpointLP/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:122
Illuminate\Foundation\Console\Kernel->handle() at /home/vagrant/Code/lightpointLP/artisan:35
If any other information may be required I'll be glad to provide it, I'm truly at a loss as to what has happened or how to fix it. Thank you
UPDATE AUGUST 31 So I have found that when I am in vagrant@homestead and I sudo su when I then am in root@homestead:/home/vagrant# and I enter .config there is a configstore directory and a psysh directory but it was owned by root. I changed the owner to vagrant, exited, reloaded vagrant and the same error.
drwx------ 2 root root 4096 May 4 00:55 configstore
drwxr-xr-x 2 vagrant vagrant 4096 Aug 31 23:37 psysh
So then I tried sudo -i and got root@homestead but found that the contents of .config were different. This time it has a .composer directory and no psysh existing. So I added the psysh directory with vagrant as owner
drwxr-xr-x 2 root root 4096 Feb 26 2017 composer
drwxr-xr-x 2 vagrant vagrant 4096 Aug 31 23:59 psysh
but this still also does not work. I also exited, reloaded vagrant, I config:cleared on both but I get the same unable to write error. Of course the last was a last ditch attempt as the path is the first one root@homestead:/home/vagrant#
I am so at a loss, any insight would help, please. Thanks!