flood-io / cli

The Flood Command Line Interface
MIT License
4 stars 0 forks source link

internal server errors causing segfault #13

Open lachie opened 6 years ago

lachie commented 6 years ago

cli verify nicole.ts --host http://localhost:5000 --verbose

message (*floodchrome.TestResult_Lifecycle_) label:"clearBrowserCookies" lifecycle:<event:BeforeStepAction > 
message (*floodchrome.TestResult_Lifecycle_) label:"clearBrowserCookies" lifecycle:<event:AfterStepAction > 
message (*floodchrome.TestResult_Lifecycle_) label:"setCacheDisabled" lifecycle:<event:BeforeStepAction > 
message (*floodchrome.TestResult_Lifecycle_) label:"setCacheDisabled" lifecycle:<event:AfterStepAction > 
message (*floodchrome.TestResult_Lifecycle_) label:"My Jewellery New M2: Home" lifecycle:<event:BeforeStep > 
    My Jewellery New M2: Home
message (*floodchrome.TestResult_Lifecycle_) label:"visit" lifecycle:<event:BeforeStepAction > 
        visit()
message (*floodchrome.TestResult_Lifecycle_) label:"visit" lifecycle:<event:AfterStepAction > 
message (*floodchrome.TestResult_Lifecycle_) label:"wait" lifecycle:<event:BeforeStepAction > 
        wait()
message (*floodchrome.TestResult_Error_) message:"internal error while running step" label:"My Jewellery New M2: Home" error:<message:"internal error" internal:true > 
        Script Error

internal error
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x86ef93]

goroutine 1 [running]:
github.com/flood-io/cli/cmd/verify.(*LoggingTest).ScriptError(0xc420057310, 0x9a2354, 0x11, 0xc4201b6100)
    /home/lachie/.virtualgo/cli/src/github.com/flood-io/cli/cmd/verify/test_logging.go:60 +0x1f3
github.com/flood-io/cli/cmd/verify.(*state).handleStepError(0xc42015c600, 0xc42022c0c0, 0xc4201b6100, 0x0)
    /home/lachie/.virtualgo/cli/src/github.com/flood-io/cli/cmd/verify/state_handlers.go:154 +0x91
github.com/flood-io/cli/cmd/verify.(*state).handleStep(0xc42015c600, 0xc42022c0c0, 0x10)
    /home/lachie/.virtualgo/cli/src/github.com/flood-io/cli/cmd/verify/state_handlers.go:124 +0xd0
github.com/flood-io/cli/cmd/verify.(*state).(github.com/flood-io/cli/cmd/verify.handleStep)-fm(0xc42022c0c0, 0xa8)
    /home/lachie/.virtualgo/cli/src/github.com/flood-io/cli/cmd/verify/state_handlers.go:91 +0x34
github.com/flood-io/cli/cmd/verify.(*state).next(0xc42015c600, 0xc42022c0c0, 0xc4201d9b38, 0x2)
    /home/lachie/.virtualgo/cli/src/github.com/flood-io/cli/cmd/verify/state.go:20 +0x46
github.com/flood-io/cli/cmd/verify.(*VerifyCmd).Run(0xc96f00, 0xc4200183c0, 0x40, 0x7fff539868fe, 0x9, 0x0, 0x5ce320)
    /home/lachie/.virtualgo/cli/src/github.com/flood-io/cli/cmd/verify/verify.go:90 +0x470
github.com/flood-io/cli/cmd.glob..func5(0xc8e9c0, 0xc4200702c0, 0x1, 0x4)
    /home/lachie/.virtualgo/cli/src/github.com/flood-io/cli/cmd/verify.go:39 +0x4cd
github.com/spf13/cobra.(*Command).execute(0xc8e9c0, 0xc420070240, 0x4, 0x4, 0xc8e9c0, 0xc420070240)
    /home/lachie/.virtualgo/cli/src/github.com/spf13/cobra/command.go:702 +0x2c6
github.com/spf13/cobra.(*Command).ExecuteC(0xc8e7a0, 0x1, 0xc420065f70, 0x405ea4)
    /home/lachie/.virtualgo/cli/src/github.com/spf13/cobra/command.go:783 +0x30e
github.com/spf13/cobra.(*Command).Execute(0xc8e7a0, 0x13, 0x9baf19)
    /home/lachie/.virtualgo/cli/src/github.com/spf13/cobra/command.go:736 +0x2b
main.main()
    /home/lachie/go/src/github.com/flood-io/cli/main.go:21 +0x31
exit status 2
lachie commented 6 years ago

script

import {
  step,
  TestSettings,
  Until,
  By,
  MouseButtons,
  Device,
  Driver
} from "@flood/chrome";
import * as assert from "assert";
export const settings: TestSettings = {
  loopCount: 100,
  description: "My Jewellery New M2",
  screenshotOnFailure: true,
  disableCache: true,
  //clearCache: true,
  clearCookies: true,
  actionDelay: 1.5,
  stepDelay: 2.5
};
/**
 * My Jewellery New M2
 * Version: 1.1
 */
export default () => {
  step("My Jewellery New M2: Home", async browser => {
    await browser.visit("http://newmyjewellery.hypernode.io:8888/");
    let pageTextVerify = By.visibleText(
      "Shop je sieraden, horloges, accessoires, kleding en schoenen in onze webshop."
    );
    await browser.wait(Until.elementIsVisible(pageTextVerify));
  });
};