"Add Source" fails with TypeError: undefined is not an object
I just installed Chronograf 1.2.0 beta 8 on Ubuntu 16.04 using the Debian/Ubuntu package. when I try to configure it for the first time it fails. I get this in the JS console:
TypeError: undefined is not an object (evaluating 'newSource.links.self')
This happens when I click on "Add Source" and on Safari on macOS Sierra.
Downgrading to 1.2.0 beta 7 fixes the problem.
Hi gpolitis, thanks for reporting this.
I'd made a change to the initial source creation page in beta 8, so I have an idea for what could be causing this. I'll try to replicate the problem this weekend.
Verify this works in master
This happens if someone tries to add a source without entering anything into the form. I ported the code over from the add source page in beta 8, to make the behavior consistent between the two, so it inherited that existing bug. I'm working on a fix for this now.
Seems like this bug is still alive in v1.3.8.3-1 binaries for Debian. I also try to Add Source, Connection String and Name fields are filled.
Error is
Uncaught TypeError: Cannot read property 'self' of undefined
at updateSource (index.js:83)
at Object.handleSubmit (CreateSource.js:110)
at Object.handleSubmitForm (SourceForm.js:46)
at Object.invokeGuardedCallback (ReactErrorUtils.js:26)
at executeDispatch (EventPluginUtils.js:85)
at Object.executeDispatchesInOrder (EventPluginUtils.js:108)
at executeDispatchesAndRelease (EventPluginHub.js:43)
at executeDispatchesAndReleaseTopLevel (EventPluginHub.js:54)
at Array.forEach (<anonymous>)
at forEachAccumulated (forEachAccumulated.js:24)
newSource object is
{
default: true,
insecureSkipVerify: false,
metaUrl: undefined,
name: "Influx",
password: "",
telegraf: "telegraf",
url: "http://localhost:8086",
username: "",
__proto__: Object
}
newSource.links is undefined.