galen icon indicating copy to clipboard operation
galen copied to clipboard

java.lang.IndexOutOfBoundsException on generate

Open Fishkob opened this issue 6 years ago • 4 comments

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

Fishkob avatar Nov 30 '18 08:11 Fishkob

Thanks! Will investigate it.

ishubin avatar Nov 30 '18 09:11 ishubin

I couldn't reproduce it. Could you please share the contents of both: the original homepage.gspec file and homepage-dump/page.json?

ishubin avatar Dec 02 '18 15:12 ishubin

Thanks for your help @ishubin. The problem was sitting behind the Computer :) (my homepage.gspec was empty)

Fishkob avatar Dec 03 '18 07:12 Fishkob

Well, that is still a minor bug in Galen though ;) it should just not generate anything in this case.

ishubin avatar Dec 03 '18 08:12 ishubin