laravel-tinker: Uncaught ErrorException: touch(): Utime failed: Invalid argument

Hi. I get an error with the message below, every time I execute a code in Tinker console. It doesn’t matter what the statement is.

Uncaught ErrorException: touch(): Utime failed: Invalid argument in D:\www\mosharekat-laravel\vendor\psy\psysh\src\ConfigPaths.php:250

I’ve attached full error text as a text file for you. error.txt

Environment:

  • IDE & Version: PHPStorm 2020.2.1
  • PHP Version: 7.4.5
  • OS: Windows 10
  • Laravel Tinker plugin version : 1.2.0
  • Interpreter Type: Local
  • Laravel Version: 7.28.3
  • Tinker version: 2.4.2

I’ve also tried reinstalling the plugin, but it didn’t help.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 27 (13 by maintainers)

Most upvoted comments

@amirzpr You might confuse nul with null - since null is not a windows file driver (like con or nul). At first I wrote the history to ‘/dev/null’ on unix and ‘null’ in windows. Then I updated the plugin because it made null files in windows.

Here I have a possible fix - tries to check for /dev/null, then nul, then system-tempdir/LTHisxxxx, lastly ./LTHisxxxx. On the last 2 options the file gets removed after executing.

So… The fullest range of possibilities have been combed out this time! See my PR #44 to see what I tried 😂

Laravel Tinker-2.0.0-24-attempt.zip

This one works for me - I spun up a windows VM just to check this 😂