chronograf icon indicating copy to clipboard operation
chronograf copied to clipboard

"Add Source" fails with TypeError: undefined is not an object

Open gpolitis opened this issue 9 years ago • 5 comments

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.

gpolitis avatar Apr 20 '17 23:04 gpolitis

Downgrading to 1.2.0 beta 7 fixes the problem.

gpolitis avatar Apr 20 '17 23:04 gpolitis

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.

imogenkinsman avatar Apr 22 '17 23:04 imogenkinsman

Verify this works in master

nhaugo avatar Apr 25 '17 16:04 nhaugo

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.

imogenkinsman avatar Apr 26 '17 18:04 imogenkinsman

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.

withkittens avatar Oct 03 '17 21:10 withkittens