galen
galen copied to clipboard
java.lang.IndexOutOfBoundsException on generate
How to reproduce:
galen dump "homepage.gspec" --url "http://testapp.galenframework.com/\#login" --size "1024x768" --export "homepage-dump" --max-width "200" --max-height "200"
galen generate homepage-dump/page.json --export login.gspec
Exception in thread "main" java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: Index 0 out-of-bounds for length 0 at com.galenframework.GalenMain.execute(GalenMain.java:60) at com.galenframework.GalenMain.main(GalenMain.java:78) Caused by: java.lang.IndexOutOfBoundsException: Index 0 out-of-bounds for length 0 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) at java.base/java.util.Objects.checkIndex(Objects.java:372) at java.base/java.util.ArrayList.get(ArrayList.java:440) at com.galenframework.generator.model.GmPageSpec.create(GmPageSpec.java:42) at com.galenframework.generator.SpecGenerator.generateSpecSections(SpecGenerator.java:228) at com.galenframework.generator.SpecGenerator.generatePageSpec(SpecGenerator.java:239) at com.galenframework.actions.GalenActionGenerate.execute(GalenActionGenerate.java:43) at com.galenframework.GalenMain.execute(GalenMain.java:58) ... 1 more
Thanks! Will investigate it.
I couldn't reproduce it. Could you please share the contents of both: the original homepage.gspec
file and homepage-dump/page.json
?
Thanks for your help @ishubin. The problem was sitting behind the Computer :) (my homepage.gspec was empty)
Well, that is still a minor bug in Galen though ;) it should just not generate anything in this case.