Skip to content
New issue

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

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

Already on GitHub? # to your account

Uncaught Error: Call to undefined function _HumbugBox44cdd6d36ff3\array_any() for 6.8.1 release #11322

Closed
chenrui333 opened this issue Feb 20, 2025 · 7 comments

Comments

@chenrui333
Copy link

👋 while testing psalm.phar 6.8.1 release, seeing some crash issue as below:

==> /home/linuxbrew/.linuxbrew/Cellar/psalm/6.8.1/bin/psalm --init
  Uncaught Error: Call to undefined function _HumbugBox44cdd6d36ff3\array_any() in phar:///home/linuxbrew/.linuxbrew/Cellar/psalm/6.8.1/libexec/psalm/src/Psalm/Internal/Fork/PsalmRestarter.php:52
  Stack trace:
  #0 phar:///home/linuxbrew/.linuxbrew/Cellar/psalm/6.8.1/libexec/psalm/vendor/composer/xdebug-handler/src/XdebugHandler.php(116): Psalm\Internal\Fork\PsalmRestarter->requiresRestart(false)
  #1 phar:///home/linuxbrew/.linuxbrew/Cellar/psalm/6.8.1/libexec/psalm/src/Psalm/Internal/Cli/Psalm.php(645): _HumbugBox44cdd6d36ff3\Composer\XdebugHandler\XdebugHandler->check()
  #2 phar:///home/linuxbrew/.linuxbrew/Cellar/psalm/6.8.1/libexec/psalm/src/Psalm/Internal/Cli/Psalm.php(234): Psalm\Internal\Cli\Psalm::restart(Array, 1, 1, Object(Psalm\Progress\LongProgress))
  #3 phar:///home/linuxbrew/.linuxbrew/Cellar/psalm/6.8.1/libexec/psalm/psalm(7): Psalm\Internal\Cli\Psalm::run(Array)
  #4 /home/linuxbrew/.linuxbrew/Cellar/psalm/6.8.1/libexec/psalm(14): require('phar:///home/li...')
  #5 /home/linuxbrew/.linuxbrew/Cellar/psalm/6.8.1/bin/psalm(2): require('/home/linuxbrew...')
  #6 {main}
  (Psalm 6.8.1@f12f96cde537a424fe2a9366105b5e[71](https://github.com/Homebrew/homebrew-core/actions/runs/13414729294/job/37472910776?pr=208273#step:4:72)46d4fc23 crashed due to an uncaught Throwable)
  Calculating best config level based on project files
  Error: psalm: failed
  An exception occurred within a child process:
    Minitest::Assertion: Expected: 0
    Actual: 1

relates to Homebrew/homebrew-core#208273

Copy link

Hey @chenrui333, can you reproduce the issue on https://psalm.dev? These will be used as phpunit tests when implementing the feature or fixing this bug.

@majoskorec
Copy link

I have the same problem on several of my projects. it started with version 6.8.0

@pereorga
Copy link
Contributor

pereorga commented Feb 20, 2025

I can still reproduce it with 6.8.2:

$ vendor/bin/psalm.phar --threads=1 --no-cache --no-progress
Uncaught Error: Call to undefined function _HumbugBoxd84cf39e5d32\array_any() in phar:///Users/pere/dev/REDACTED/vendor/psalm/phar/psalm.phar/src/Psalm/Internal/Fork/PsalmRestarter.php:52
Stack trace:
#0 phar:///Users/pere/dev/REDACTED/vendor/psalm/phar/psalm.phar/vendor/composer/xdebug-handler/src/XdebugHandler.php(117): Psalm\Internal\Fork\PsalmRestarter->requiresRestart(false)
#1 phar:///Users/pere/dev/REDACTED/vendor/psalm/phar/psalm.phar/src/Psalm/Internal/Cli/Psalm.php(645): _HumbugBoxd84cf39e5d32\Composer\XdebugHandler\XdebugHandler->check()
#2 phar:///Users/pere/dev/REDACTED/vendor/psalm/phar/psalm.phar/src/Psalm/Internal/Cli/Psalm.php(234): Psalm\Internal\Cli\Psalm::restart(Array, 1, 10, Object(Psalm\Progress\VoidProgress))
#3 phar:///Users/pere/dev/REDACTED/vendor/psalm/phar/psalm.phar/psalm(7): Psalm\Internal\Cli\Psalm::run(Array)
#4 /Users/pere/dev/REDACTED/vendor/psalm/phar/psalm.phar(14): require('phar:///Users/p...')
#5 /Users/pere/dev/REDACTED/vendor/bin/psalm.phar(119): include('/Users/pere/dev...')
#6 {main}
(Psalm 6.8.2@720ed6b578ac24f9543c65c3d4cecea0ff348ccd crashed due to an uncaught Throwable)
Script vendor/bin/psalm.phar --threads=1 --no-cache --no-progress handling the psalm event returned with error code 1

$ vendor/bin/psalm.phar --version
Psalm 6.8.2@720ed6b578ac24f9543c65c3d4cecea0ff348ccd

@danog
Copy link
Collaborator

danog commented Feb 20, 2025

Fixed, now builds are also reproducible.

@danog danog closed this as completed Feb 20, 2025
@bastienrossi
Copy link

bastienrossi commented Feb 21, 2025

Hi, the problem still seems to be present.
In my case i use the following command :

psalm --no-diff --no-cache --monochrome --long-progress
      --report=.psalm-reports/report.console
      --report=.psalm-reports/report.sarif
      --report=.psalm-reports/report.junit.xml

Rollback to 6.7.1 fix the problem.

@danog
Copy link
Collaborator

danog commented Feb 21, 2025

What version of php and psalm are you using?

@bastienrossi
Copy link

bastienrossi commented Feb 21, 2025

vimeo/psalm (6.8.6) and psalm/plugin-phpunit (0.19.2).
This bug occurs in my CI running tests on php 8.2 and php 8.3.
Same error on both versions.

$ composer exec -- vendor/bin/psalm --no-diff --no-cache --monochrome --long-progress --report=.psalm-reports/report.console --report=.psalm-reports/report.sarif --report=.psalm-reports/report.junit.xml
Uncaught Error: Call to undefined function array_any() in /builds/my-project/vendor/vimeo/psalm/src/Psalm/Internal/Fork/PsalmRestarter.php:82
Stack trace:
#0 /builds/my-project/vendor/composer/xdebug-handler/src/XdebugHandler.php(135): Psalm\Internal\Fork\PsalmRestarter->requiresRestart(true)
#1 /builds/my-project/vendor/vimeo/psalm/src/Psalm/Internal/Cli/Psalm.php(968): Composer\XdebugHandler\XdebugHandler->check()
#2 /builds/my-project/vendor/vimeo/psalm/src/Psalm/Internal/Cli/Psalm.php(287): Psalm\Internal\Cli\Psalm::restart(Array, 1, 1, Object(Psalm\Progress\LongProgress))
#3 /builds/my-project/vendor/vimeo/psalm/psalm(9): Psalm\Internal\Cli\Psalm::run(Array)
#4 /builds/my-project/vendor/bin/psalm(119): include('/builds/leteleg...')
#5 {main}
(Psalm 6.8.6@34ba9e1e5ea2e7396d3e2e644ee3e3a1d4336603 crashed due to an uncaught Throwable)
Script vendor/bin/psalm handling the __exec_command event returned with error code 1

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

No branches or pull requests

5 participants