recca0120/vscode-phpunit

Unhandled method TestRunStartedEvent

Closed this issue · 5 comments

Hi,

when an error is reported by my unit test, Test Exlporer cannot execute any test again.
I have to close "Visual Studio Code" and reopen it to be able to execute the test again. This is really nerve wracking.
But since "PHPUnit Test Explorer" is such nice to use, I would really like to keep using it.

Error message after executing the test is:

events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: UNKNOWN: unknown error, open '\\C:\Users\D053084\php\phpunit-9.5.11.phar\phpunit\Framework\TestCase.php'
Emitted 'error' event on ReadStream instance at:
    at internal/fs/streams.js:147:14
    at FSReqCallback.oncomplete (fs.js:171:23) {
  errno: -4094,
  code: 'UNKNOWN',
  syscall: 'open',
  path: '\\\\C:\\Users\\D053084\\php\\phpunit-9.5.11.phar\\phpunit\\Framework\\TestCase.php'
}

When re-executing I am getting:

(node:23304) UnhandledPromiseRejectionWarning: Error: Unhandled method TestRunStartedEvent-5af67e471baa591dc4771e08292b5c11
    at c:\Users\D053084\.vscode\extensions\recca0120.vscode-phpunit-2.0.76\server\out\server.js:1:9133
    at c:\Users\D053084\.vscode\extensions\recca0120.vscode-phpunit-2.0.76\server\out\server.js:1:9427
    at Immediate.<anonymous> (c:\Users\D053084\.vscode\extensions\recca0120.vscode-phpunit-2.0.76\server\out\server.js:1:9788)
    at processImmediate (internal/timers.js:461:21)
(Use `Code --trace-warnings ...` to show where the warning was created)
(node:23304) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:23304) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Please find full trace attached: trace.txt

I am using the following versions:

PS C:\Users\D053084\GitHub\Sonos> C:\Users\D053084\php\php-7.4.0-Win32-vc15-x64\php.exe -version
PHP 7.4.0 (cli) (built: Nov 27 2019 10:14:18) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Xdebug v2.9.4, Copyright (c) 2002-2020, by Derick Rethans
PS C:\Users\D053084\GitHub\Sonos> C:\Users\D053084\php\php-7.4.0-Win32-vc15-x64\php.exe C:\Users\D053084\php\phpunit-9.5.11.phar --version
PHPUnit 9.5.11 by Sebastian Bergmann and contributors.

image
image

Any idea what might be causing these issues?
Do you need any further information?

Thanks,
Thorsten

I'm having the same issue

Same issue, with PHPUnit Test Explorer v2.0.76 and VS Code

Version: 1.71.2 (user setup)
Commit: 74b1f979648cc44d385a2286793c226e611f59e7
Date: 2022-09-14T21:03:37.738Z
Electron: 19.0.12
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19044

0-sv commented

Same

I have the same problem

try version 3.0