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

Exception in Subpage "Zusammenfassung" #371

Closed
gharlan opened this issue Mar 5, 2023 · 14 comments
Closed

Exception in Subpage "Zusammenfassung" #371

gharlan opened this issue Mar 5, 2023 · 14 comments
Labels
bug Something isn't working

Comments

@gharlan
Copy link
Member

gharlan commented Mar 5, 2023

Direkt nach Installation hatte ich den Menüpunkt "Zusammenfassung" angeklickt.
Dort kommt dann dieser Fehler:

Exception: Unable to graph baseline: Reading file /Users/gharlan/workspace/sites/redaxo.org/var/data/addons/rexstan/v2-type-coverage-only-in-summary-4cf04dd208bf3b8e0e9e071fea3926bb/1678032000-summary.json PHP Fatal error: Uncaught Safe\Exceptions\JsonException: Syntax error in /Users/gharlan/workspace/sites/redaxo.org/src/addons/rexstan/vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php:10 Stack trace: #0 /Users/gharlan/workspace/sites/redaxo.org/src/addons/rexstan/vendor/thecodingmachine/safe/lib/special_cases.php(35): Safe\Exceptions\JsonException::createFromPhpError() #1 /Users/gharlan/workspace/sites/redaxo.org/src/addons/rexstan/vendor/staabm/phpstan-baseline-analysis/lib/AnalyzerResultReader.php(55): Safe\json_decode('\nDeprecated: Re...', true) #2 /Users/gharlan/workspace/sites/redaxo.org/src/addons/rexstan/vendor/staabm/phpstan-baseline-analysis/lib/AnalyzerResultReader.php(16): staabm\PHPStanBaselineAnalysis\AnalyzerResultReader->readResultArray('/Users/gharlan/...') #3 /Users/gharlan/workspace/sites/redaxo.org/src/addons/rexstan/vendor/staabm/phpstan-baseline-analysis/lib/GraphApplication.php(44): staabm\PHPStanBaselineAnalysis\AnalyzerResultReader->readFile('/Users/gharlan/...') #4 /Users/gharlan/workspace/sites/redaxo.org/src/addons/rexstan/vendor/staabm/phpstan-baseline-analysis/lib/GraphTemplate.php(19): staabm\PHPStanBaselineAnalysis\GraphApplication->iterateOverFiles(Array) #5 /Users/gharlan/workspace/sites/redaxo.org/src/addons/rexstan/vendor/staabm/phpstan-baseline-analysis/lib/GraphApplication.php(22): staabm\PHPStanBaselineAnalysis\GraphTemplate->render(Object(Generator)) #6 /Users/gharlan/workspace/sites/redaxo.org/src/addons/rexstan/vendor/staabm/phpstan-baseline-analysis/bin/phpstan-baseline-graph.php(30): staabm\PHPStanBaselineAnalysis\GraphApplication->start('/Users/gharlan/...') #7 /Users/gharlan/workspace/sites/redaxo.org/src/addons/rexstan/vendor/staabm/phpstan-baseline-analysis/bin/phpstan-baseline-graph(15): require('/Users/gharlan/...') #8 /Users/gharlan/workspace/sites/redaxo.org/src/addons/rexstan/vendor/bin/phpstan-baseline-graph(120): include('/Users/gharlan/...') #9 {main} thrown in /Users/gharlan/workspace/sites/redaxo.org/src/addons/rexstan/vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php on line 10

File: src/addons/rexstan/lib/RexStan.php
Line: 110

Stacktrace
Function File Line
rexstan\RexStan::analyzeSummaryBaseline src/addons/rexstan/pages/summary.php 6
require src/core/lib/packages/package.php 280
rex_package->includeFile src/core/lib/be/controller.php 481
rex_be_controller::{closure} src/core/lib/util/timer.php 63
rex_timer::measure src/core/lib/be/controller.php 463
rex_be_controller::includePath src/core/lib/be/controller.php 431
rex_be_controller::includeCurrentPageSubPath src/addons/rexstan/pages/index.php 9
require src/core/lib/packages/package.php 280
rex_package->includeFile src/core/lib/be/controller.php 481
rex_be_controller::{closure} src/core/lib/util/timer.php 63
rex_timer::measure src/core/lib/be/controller.php 463
rex_be_controller::includePath src/core/lib/be/controller.php 414
rex_be_controller::includeCurrentPage src/core/backend.php 239
require src/core/boot.php 143
require public/redaxo/index.php 13

In der Exception-Message war also ein ganzer Stacktrace enthalten:

Bildschirm­foto 2023-03-05 um 17 16 20

Nach Reload kommt dann diese Exception:

Exception: Could not analyze baseline
File: src/addons/rexstan/pages/summary.php
Line: 10

Stacktrace
Function File Line
require src/core/lib/packages/package.php 280
rex_package->includeFile src/core/lib/be/controller.php 481
rex_be_controller::{closure} src/core/lib/util/timer.php 63
rex_timer::measure src/core/lib/be/controller.php 463
rex_be_controller::includePath src/core/lib/be/controller.php 431
rex_be_controller::includeCurrentPageSubPath src/addons/rexstan/pages/index.php 9
require src/core/lib/packages/package.php 280
rex_package->includeFile src/core/lib/be/controller.php 481
rex_be_controller::{closure} src/core/lib/util/timer.php 63
rex_timer::measure src/core/lib/be/controller.php 463
rex_be_controller::includePath src/core/lib/be/controller.php 414
rex_be_controller::includeCurrentPage src/core/backend.php 239
require src/core/boot.php 143
require public/redaxo/index.php 13
System report (REDAXO 5.14.3, PHP 8.2.3, MariaDB 10.11.2)
REDAXO
Version 5.14.3
PHP
Version 8.2.3
OPcache yes
Xdebug no
Database
Version MariaDB 10.11.2
Character set utf8
Server
OS Darwin
SAPI apache2handler
Webserver Apache/2.4.55
Request
Browser Safari/16.3
Protocol HTTP/1.1
HTTPS yes
Packages
adminer 1.9.3
backup 2.8.3
be_style 3.1.2
be_style/customizer 3.1.2
be_style/redaxo 3.1.2
cronjob 2.9.0
debug 1.2.2
developer 3.9.2
documentation dev
install 2.10.1
markitup 3.7.4
mblock 3.4.12
media_manager 2.13.3
mediapool 2.12.1
metainfo 2.9.1
phpmailer 2.11.2
project dev
quick_navigation 6.0.2
rexstan 1.0.91
sprog 1.5.1
structure 2.14.3
structure/content 2.14.3
url 1.0.1
users 2.9.2
watson 2.3.0
yakicon 1.0.0
ycom 2.1-dev
ycom/auth 2.1-dev
ycom/group 2.1-dev
ydeploy 1.1.1
yform 2.3
yform/docs 2.3
yform/email 2.3
yform/manager 2.3
yform/tools 2.3
ynewsletter 1.0
yrewrite 2.5
@staabm staabm added the bug Something isn't working label Mar 5, 2023
@christophboecker
Copy link
Member

Hatte ich auch schon mal. Habe den phpstan-Cache gelöscht und den Redaxo-Cache und dann ging es. Reinstall kann heilende Kräfte entfalten.

@staabm
Copy link
Member

staabm commented Mar 5, 2023

@gharlan funktioniert es sobald du einmalig die "webanalyse" aufgerufen hast?

@staabm
Copy link
Member

staabm commented Mar 5, 2023

oder alternativ: nachdem die settings einmalig gespeichert wurden

@gharlan
Copy link
Member Author

gharlan commented Mar 5, 2023

Scheint beides nicht zu helfen.

Oben hatte ich die Probleme mit einem Projekt mit yak-Struktur (redaxo.org).
Ich habe es jetzt aber auch nochmal mit Standard-Struktur getestet, mit gleichem Ergebnis.

Auch nach Anlegen einer Baseline (also Baseline aktivieren, und in der Analyse dann auf den roten Button klicken um alle Fehler zu ignorieren), trat der Fehler weiter auf.

@gharlan
Copy link
Member Author

gharlan commented Mar 5, 2023

Wobei meist die untere der beiden oben erwähnten Exceptions kommt ("Could not analyze baseline").
Es kam aber auch zwischendrin noch mal die obere. Da habe ich das Muster aber noch nicht ganz verstanden, wann wieder die erste Exception erscheint.

@staabm
Copy link
Member

staabm commented Mar 5, 2023

Ggf. Kannst du im whoops screen mal auf den |> knöpfen im stacktrace rechts die pfade expanden sodass die param values mehr zu sehen sind.

Ich konnte es bisher nicht nachstellen

@gharlan
Copy link
Member Author

gharlan commented Mar 5, 2023

Bildschirm­foto 2023-03-05 um 22 54 36

Aber wie gesagt nach Reload kommt dann die kürzere Exception:

Bildschirm­foto 2023-03-05 um 22 56 02

@staabm
Copy link
Member

staabm commented Mar 5, 2023

An json_decode scheint irgendwas mit Deprecated übergeben zu werden

@staabm
Copy link
Member

staabm commented Mar 5, 2023

Vllt ein php 8.2 problem

@gharlan
Copy link
Member Author

gharlan commented Mar 5, 2023

Deprecated: Return type of Safe\DateTimeImmutable::createFromMutable($dateTime): Safe\DateTimeImmutable should either be compatible with DateTimeImmutable::createFromMutable(DateTime $object): static, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/gharlan/workspace/redaxo/redaxo/src/addons/rexstan/vendor/thecodingmachine/safe/lib/DateTimeImmutable.php on line 239

Das steht in der summary json cache datei oben mit drin.

@staabm
Copy link
Member

staabm commented Mar 5, 2023

danke. upstream reported in thecodingmachine/safe#413

@staabm
Copy link
Member

staabm commented Mar 5, 2023

Das steht in der summary json cache datei oben mit drin.

sollte gefixed werden mit staabm/phpstan-baseline-analysis#100

@staabm
Copy link
Member

staabm commented Mar 6, 2023

@gharlan
Copy link
Member Author

gharlan commented Mar 6, 2023

Es scheint jetzt zu passen 👍

@gharlan gharlan closed this as completed Mar 6, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants