Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: e is undefined #28120

Closed
Berbe opened this issue Oct 8, 2020 · 8 comments · Fixed by #28226
Closed

TypeError: e is undefined #28120

Berbe opened this issue Oct 8, 2020 · 8 comments · Fixed by #28226
Assignees
Labels
area/frontend needs investigation for unconfirmed bugs. use type/bug for confirmed bugs, even if they "need" more investigating type/bug

Comments

@Berbe
Copy link
Contributor

Berbe commented Oct 8, 2020

What happened:
TypeError errors pop up in console, sometimes making a Dashboard crash.

No error spawned by the server run with a debug log level: definitely seems like a frontend error bug.

Error displayed when a Dashboard crashes
An unexpected error happened
TypeError: e is undefined

    in t
    in P
    in div
    in t
    in t
    in t
    in t
    in t
    in f
    in t
    in div
    in t
    in div
    in t
    in div
    in t
    in div
    in t
    in x
    in div
    in o
    in DraggableCore
    in t
    in div
    in ReactGridLayout
    in Unknown
    in SizeMeReferenceWrapper
    in SizeMeRenderer(Component)
    in SizeMe(Component)
    in t
    in div
    in div
    in div
    in t
    in t
    in div
    in div
    in t
    in x
    in r
    in Unknown
    in t
    in Unknown
    in h
    in Unknown
    in Unknown
    in t
    in t
    in l
Examples of console error on Dashboard crash
Crash 1
TypeError: e is undefined
    $r urlParser.ts:24
    getValueForUrl urlParser.ts:8
    getValueForUrl urlParser.ts:6
    getValueForUrl adapter.ts:35
    fillVariableValuesForUrl template_srv.ts:314
    Lodash 2
        ut
        ua
    fillVariableValuesForUrl template_srv.ts:304
    getDataLinkUIModel link_srv.ts:324
    getLinks linkSuppliers.ts:144
    getLinks linkSuppliers.ts:143
    getInfoContent PanelHeaderCorner.tsx:50
    value Popover.tsx:82
    render Popper.js:159
    React 17
        Xa
        Ya
        Su
        yc
        hc
        ic
        Xo
        unstable_runWithPriority
        Wo
        Xo
        Yo
        se
        Ar
        Tr
        kr
        unstable_runWithPriority
        _r
react-dom.production.min.js:196:194
Crash 2
TypeError: e is undefined
    $r urlParser.ts:24
    getValueForUrl urlParser.ts:8
    getValueForUrl urlParser.ts:6
    getValueForUrl adapter.ts:35
    fillVariableValuesForUrl template_srv.ts:314
    Lodash 2
        ut
        ua
    fillVariableValuesForUrl template_srv.ts:304
    getDataLinkUIModel link_srv.ts:324
    getLinks linkSuppliers.ts:144
    getLinks linkSuppliers.ts:143
    getInfoContent PanelHeaderCorner.tsx:50
    value Popover.tsx:82
    render Popper.js:159
    React 17
        Xa
        Ya
        Su
        yc
        hc
        ic
        Xo
        unstable_runWithPriority
        Wo
        Xo
        Yo
        se
        Ar
        Tr
        kr
        unstable_runWithPriority
        _r
react-dom.production.min.js:196:194
    React 20
        fu
        callback
        Oi
        mi
        mc
        unstable_runWithPriority
        Wo
        gc
        ic
        Xo
        unstable_runWithPriority
        Wo
        Xo
        Yo
        se
        Ar
        Tr
        kr
        unstable_runWithPriority
        _r
Example of console error while Dashboard did _not_ crash
Uncaught (in promise) TypeError: e is undefined
    $r urlParser.ts:24
    getValueForUrl urlParser.ts:8
    getValueForUrl urlParser.ts:6
    getValueForUrl adapter.ts:35
    Y actions.ts:540
    X actions.ts:453
urlParser.ts:24:2
    ne http://127.0.0.1:3000/public/build/app.9f3acd666ba6dad3e060.js:2
    c http://127.0.0.1:3000/public/build/app.9f3acd666ba6dad3e060.js:2

What you expected to happen:
No error, no crash

How to reproduce it (as minimally and precisely as possible):
Fiddling with template variables in order to make a Dashboard refresh, sometimes not doing anything other than hovering over Panels.

Anything else we need to know?:
Other potentially related issues

v6.6.1
Error already encountered with v6.6.1

Console error v6.6.1
TypeError: e is undefined
    escapeDelimiter plugin_page_ctrl.ts:23
    getValueForUrl plugin_page_ctrl.ts:18
    getValueForUrl plugin_page_ctrl.ts:18
    getValueForUrl plugin_page_ctrl.ts:17
    fillVariableValuesForUrl template_srv.ts:364
    Lodash 2
        Ye
        qa
    fillVariableValuesForUrl template_srv.ts:354
    getDataLinkUIModel link_srv.ts:278
    getLinks linkSuppliers.ts:149
    getLinks linkSuppliers.ts:149
    getInfoContent PanelHeaderCorner.tsx:52
    render useLokiLabels.ts:31
    render Popper.js:159
    React 7
        Za
        $a
        Tu
        Ts
        Os
        ms
        i
    unstable_runWithPriority scheduler.production.min.js:18
    React 7
        Gi
        $i
        Ki
        st
        Cn
        An
        Tn
    unstable_runWithPriority scheduler.production.min.js:18
    r React
react-dom.production.min.js:196:186
    React 5
        pu
        callback
        _o
        wo
        Ps
    unstable_runWithPriority scheduler.production.min.js:18
    React 4
        Gi
        Ps
        ms
        i
    unstable_runWithPriority scheduler.production.min.js:18
    React 7
        Gi
        $i
        Ki
        st
        Cn
        An
        Tn
    unstable_runWithPriority scheduler.production.min.js:18
    r React

Environment:

  • Grafana version: v7.2.0 (error already encountered with v6.6.1)
  • Data source type & version: Prometheus
  • OS Grafana is installed on: Debian Buster equivalent
  • User OS & Browser: Debian Buster equivalent & Mozilla Firefox 78.3.0esr
@aknuds1 aknuds1 added area/frontend needs investigation for unconfirmed bugs. use type/bug for confirmed bugs, even if they "need" more investigating type/bug labels Oct 8, 2020
@aknuds1 aknuds1 added this to Needs triage in Platform Backlog via automation Oct 8, 2020
@dprokop dprokop removed this from Needs triage in Platform Backlog Oct 9, 2020
@mckn
Copy link
Contributor

mckn commented Oct 9, 2020

@Berbe so the issues you have referenced is due to a different reason. I can see why you could think that they are related due to the error message but that is somewhat a standard error.

However the error you have posted has to do with the parsing of the URL. Could you share how the query string looks for your dashboard that crashes? That would help us resolve this.

@Berbe
Copy link
Contributor Author

Berbe commented Oct 9, 2020

Thanks for this piece of information.
Maybe could it be an idea to make those error messages more specific, if that is possible? It would help both reporters & solvers.


For all the following errors, the URL was http://127.0.0.1:3000/d/<dashboard UID>/<dashboard name>?orgId=1&refresh=1m

  1. Before crash
Crash
Uncaught (in promise) TypeError: e is undefined
    $r urlParser.ts:24
    getValueForUrl urlParser.ts:8
    getValueForUrl urlParser.ts:6
    getValueForUrl adapter.ts:35
    Y actions.ts:540
    X actions.ts:453
urlParser.ts:24:2
    ne http://127.0.0.1:3000/public/build/app.9f3acd666ba6dad3e060.js:2
    c http://127.0.0.1:3000/public/build/app.9f3acd666ba6dad3e060.js:2
  1. After crash
Crash 1
TypeError: e is undefined
    $r urlParser.ts:24
    getValueForUrl urlParser.ts:8
    getValueForUrl urlParser.ts:6
    getValueForUrl adapter.ts:35
    fillVariableValuesForUrl template_srv.ts:314
    Lodash 2
        ut
        ua
    fillVariableValuesForUrl template_srv.ts:304
    getDataLinkUIModel link_srv.ts:324
    getLinks linkSuppliers.ts:144
    getLinks linkSuppliers.ts:143
    getInfoContent PanelHeaderCorner.tsx:50
    value Popover.tsx:82
    render Popper.js:159
    React 17
        Xa
        Ya
        Su
        yc
        hc
        ic
        Xo
        unstable_runWithPriority
        Wo
        Xo
        Yo
        se
        Ar
        Tr
        kr
        unstable_runWithPriority
        _r
react-dom.production.min.js:196:194
    React 20
        fu
        callback
        Oi
        mi
        mc
        unstable_runWithPriority
        Wo
        gc
        ic
        Xo
        unstable_runWithPriority
        Wo
        Xo
        Yo
        se
        Ar
        Tr
        kr
        unstable_runWithPriority
        _r
Crash 2
Error: Couldn't find variable with id:platform
    i selectors.ts:14
    e actions.ts:482
    c runtime.js:45
    _invoke runtime.js:271
    t runtime.js:97
    z app.9f3acd666ba6dad3e060.js:2
    i app.9f3acd666ba6dad3e060.js:2
actions.ts:494:12

@mckn
Copy link
Contributor

mckn commented Oct 9, 2020

Thanks for this piece of information.
Maybe could it be an idea to make those error messages more specific, if that is possible? It would help both reporters & solvers.

For all the following errors, the URL was http://127.0.0.1:3000/d/<dashboard UID>/<dashboard name>?orgId=1&refresh=1m

  1. Before crash

Crash

Uncaught (in promise) TypeError: e is undefined
    $r urlParser.ts:24
    getValueForUrl urlParser.ts:8
    getValueForUrl urlParser.ts:6
    getValueForUrl adapter.ts:35
    Y actions.ts:540
    X actions.ts:453
urlParser.ts:24:2
    ne http://127.0.0.1:3000/public/build/app.9f3acd666ba6dad3e060.js:2
    c http://127.0.0.1:3000/public/build/app.9f3acd666ba6dad3e060.js:2
  1. After crash

Crash 1

TypeError: e is undefined
    $r urlParser.ts:24
    getValueForUrl urlParser.ts:8
    getValueForUrl urlParser.ts:6
    getValueForUrl adapter.ts:35
    fillVariableValuesForUrl template_srv.ts:314
    Lodash 2
        ut
        ua
    fillVariableValuesForUrl template_srv.ts:304
    getDataLinkUIModel link_srv.ts:324
    getLinks linkSuppliers.ts:144
    getLinks linkSuppliers.ts:143
    getInfoContent PanelHeaderCorner.tsx:50
    value Popover.tsx:82
    render Popper.js:159
    React 17
        Xa
        Ya
        Su
        yc
        hc
        ic
        Xo
        unstable_runWithPriority
        Wo
        Xo
        Yo
        se
        Ar
        Tr
        kr
        unstable_runWithPriority
        _r
react-dom.production.min.js:196:194
    React 20
        fu
        callback
        Oi
        mi
        mc
        unstable_runWithPriority
        Wo
        gc
        ic
        Xo
        unstable_runWithPriority
        Wo
        Xo
        Yo
        se
        Ar
        Tr
        kr
        unstable_runWithPriority
        _r

Crash 2

Error: Couldn't find variable with id:platform
    i selectors.ts:14
    e actions.ts:482
    c runtime.js:45
    _invoke runtime.js:271
    t runtime.js:97
    z app.9f3acd666ba6dad3e060.js:2
    i app.9f3acd666ba6dad3e060.js:2
actions.ts:494:12

Could you share a copy of your dashboard json? Just so I can see what template variables you have setup?

@Berbe
Copy link
Contributor Author

Berbe commented Oct 9, 2020

I am a bit unsettled about giving out potentially sensitive data.
Hence, I anonymised the variables parts of the export JSON and will provide it to you through a share meant to expire within a day or so through a sharing mechanism available out there.

Here is that share (removed).
Please be mindful about that piece of information, use it for the purposes of this issue only & swiftly discard it as soon as not required anymore.

@torkelo
Copy link
Member

torkelo commented Oct 11, 2020

You seem to have a data link that is causing this, need the panel json for the panel in order to replicate this

@Berbe
Copy link
Contributor Author

Berbe commented Oct 12, 2020

Share (removed) (1d expiration)

I noticed some errors happened when I tried to update the template variables. In particular, I noticed requests to http://127.0.0.1:3000/api/datasources/proxy/1/api/v1/metadata ending up with HTTP 404. Is that expected?

@mckn
Copy link
Contributor

mckn commented Oct 13, 2020

@Berbe thanks for reporting this! I have opened a fix for this.

@dprokop dprokop moved this from Bugs to In progress in Frontend Platform Backlog Oct 14, 2020
Frontend Platform Backlog automation moved this from In progress to Done Oct 14, 2020
@Berbe
Copy link
Contributor Author

Berbe commented Oct 16, 2020

Thanks a lot @torkelo, @mckn!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend needs investigation for unconfirmed bugs. use type/bug for confirmed bugs, even if they "need" more investigating type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants