wearefrank / ladybug-frontend

Frontend for Ladybug
Apache License 2.0
1 stars 7 forks source link

Opening ladybug within FF! produces HTTP 500 with stacktrace #529

Closed mhdirkse closed 2 months ago

mhdirkse commented 2 months ago

I tried to change the ladybug backend pom.xml to reference frontend version 0.1.0-20240722.142511. I started this ladybug code along with the FF! using the Frank!Runner. When I opened Ladybug, I got a HTTP 500 error with a stack trace. The error was that /webjars/ladybug-frontend/0.1.0-20240722.142511/index.html is not available.

image

When I unzip this ladybug-frontend .jar file, I see that index.html is available with the following path:

./META-INF/resources/webjars/ladybug-frontend/0.1.0-20240722.142511/browser/index.html

I expect that the path component browser is the culprit.

mhdirkse commented 2 months ago

Ik heb voor verschillende versies van ladybug-frontend geprobeerd of dit probleem optrad:

Versie 0.1.0-20240717.101701 werkt. Versie 0.1.0-20240718.142541 werkt. Versie 0.1.0-20240722.112043 werkt. Versie 0.1.0-20240722.113411 werkt. Versie 0.1.0-20240722.134720 werkt niet. Versie 0.1.0-20240722.142511 werkt niet.

mhdirkse commented 2 months ago

Versie 0.1.0-20240722.113411 is ladybug-frontend commit 26ad3e8271536bb0a37e3cff0ed8718a644da9e1 Versie 0.1.0-20240722.134720 is ladybug-frontend commit 730e0e7dec9d0e15642bc345e0868904f473363e

mhdirkse commented 2 months ago

Dit zijn twee opvolgende commits, geen tussenliggende commits. De commit die dit issue heeft veroorzaakt heeft commit message: "build (deps): update angular material to 18.1.1 (#526)".

mhdirkse commented 2 months ago

Ik heb documentatie gevonden over de extra directory "browser" die wordt gemaakt in de ladybug-frontend .jar. Zie https://stackoverflow.com/questions/78544888/angular-18-ng-build-without-browser-folder . Er staat hier een manier beschreven om te zorgen dat de "browser" directory niet wordt gemaakt. In angular.json moet het veld outputPath verander van een string naar een object. Maar als ik dat doe dan zegt VS Code dat de syntax van angular.json niet meer klopt. Volgens https://v17.angular.io/guide/workspace-config#output-path-configuration, over Angular 17, is de syntax met outputPath als property toegestaan.

mhdirkse commented 2 months ago

We hebben denk ik geen dringende reden om directory "browser" niet toe te staan. Ik kan ook de ladybug backend aanpassen om rekening te houden met deze extra directory. Dat ga ik maar doen; we weten nu waarom de "browser" directory er is, namelijk als gevolg van de update van Angular.

mhdirkse commented 2 months ago

Ik heb een fix gemaakt in de backend: https://github.com/wearefrank/ladybug/pull/272. Ik denk niet dat dit issue automatisch gesloten kan worden als mijn fixed gemerged is, want verschillende projecten.

MatthijsSmets commented 2 months ago

This issue does not belong here, closing it.