Describe the bug
trying to export
Statup v0.74
'
statup export
Statup v0.74 Exporting Static 'index.html' page...
INFO: Database connection to 'status1' was successful.
INFO: Service Google Successful Response: 184.49 ms | Lookup in: 0.64 ms
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x98 pc=0x57e5b6]goroutine 1 [running]:
github.com/jinzhu/gorm.(DB).clone(0x0, 0xc0004f3980)
/go/src/github.com/jinzhu/gorm/main.go:760 +0x26
github.com/jinzhu/gorm.(DB).Model(0x0, 0xb01d20, 0xc0004f3980, 0xc00054b220)
/go/src/github.com/jinzhu/gorm/main.go:471 +0x2b
github.com/hunterlong/statup/core/notifier.SelectNotification(0xc92cc0, 0x13293f 8, 0x13293f8, 0xc92cc0, 0x13293f8)
/ext-go/1/src/github.com/hunterlong/statup/core/notifier/notifiers.go:20 0 +0x9f
github.com/hunterlong/statup/core/notifier.isEnabled(0xb0ed80, 0x13293f8, 0xa45a 80)
/ext-go/1/src/github.com/hunterlong/statup/core/notifier/notifiers.go:38 0 +0x59
github.com/hunterlong/statup/core/notifier.OnSuccess(0xc000168580)
/ext-go/1/src/github.com/hunterlong/statup/core/notifier/events.go:44 +0 xeb
github.com/hunterlong/statup/core.recordSuccess(0xc00000e598)
/ext-go/1/src/github.com/hunterlong/statup/core/checker.go:243 +0x2ac
github.com/hunterlong/statup/core.(Service).checkHttp(0xc00000e598, 0x1, 0x0)
/ext-go/1/src/github.com/hunterlong/statup/core/checker.go:216 +0x7d7
github.com/hunterlong/statup/core.(Service).Check(0xc00000e598, 0xc00036c801)
/ext-go/1/src/github.com/hunterlong/statup/core/checker.go:225 +0x95
github.com/hunterlong/statup/core.ExportIndexHTML(0xc000020084, 0x10)
/ext-go/1/src/github.com/hunterlong/statup/core/export.go:38 +0xd0
main.CatchCLI(0xc00000c090, 0x1, 0x1, 0xc00015cb80, 0x4)
/ext-go/1/src/github.com/hunterlong/statup/cmd/cli.go:94 +0xe13
main.main()
/ext-go/1/src/github.com/hunterlong/statup/cmd/main.go:65 +0x27f
'
This feature is brand new, but I did recently add a test to check the export HTTP route, which seems to be passing. I'll comment back here once I can confirm export and import functions
I'm seeing this issue as well.
If you can give me some pointers, I'll be happy to look at this and send a PR if I can fix it
I have the JSON schema exporting correct, below is a list of fields available.
I'm stilling working on the import functionality, I'll keep this issue updated.
What's the point of export.json?
To reimport with the command: statping import backupfile.json
Most helpful comment
I have the JSON schema exporting correct, below is a list of fields available.
I'm stilling working on the import functionality, I'll keep this issue updated.