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

Issue with logs/{info,error} pages - Cannot read property 'iso' of undefined #1112

Closed
1 task
rizzla22 opened this issue Jun 15, 2019 · 6 comments
Closed
1 task
Labels
state:wont-fix Won’t be fixed with a clearly stated reason

Comments

@rizzla22
Copy link

rizzla22 commented Jun 15, 2019

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Dashboard!

  • You're running version >=1.3.3 of Parse Dashboard.

Environment Setup

Google app engine is where parse server is - dashboard is running locally

Steps to reproduce

Open up dashboard and navigate to logs page, this error appears.

Logs/Trace

dashboard.bundle.js:formatted:16049 TypeError: Cannot read property 'iso' of undefined
    at au (dashboard.bundle.js:formatted:51414)
    at Qa (dashboard.bundle.js:formatted:14861)
    at Di (dashboard.bundle.js:formatted:15505)
    at Go (dashboard.bundle.js:formatted:17128)
    at Vo (dashboard.bundle.js:formatted:17152)
    at Is (dashboard.bundle.js:formatted:17554)
    at Ns (dashboard.bundle.js:formatted:17508)
    at xs (dashboard.bundle.js:formatted:17435)
    at $o (dashboard.bundle.js:formatted:17368)
    at Object.enqueueSetState (dashboard.bundle.js:formatted:14416)

Clicking on the first error link brings me to this nugget of code here on line 51414

, au = function(e) {
        var t, n, r, a = e.text, i = void 0 === a ? "" : a, o = e.timestamp, s = (t = i,
        n = ru(),
        {
            time: r = t.match(n) ? t.match(n)[0] : "",
            content: t.replace(r, ""),
            error: nu(t)
        }), c = [eu.a.entry, s.error ? eu.a.error : ""];
        return l.a.createElement("li", {
            className: c.join(" ")
        }, l.a.createElement("span", {
            className: eu.a.time
**line 51414 ========>>>>>   }, o.iso** || o, " - "), l.a.createElement("span", {
            className: eu.a.content
        }, s.content))
    }

Aside from that everything is great, would love a solution to this though

@dplewis
Copy link
Member

dplewis commented Jun 19, 2019

Can you update to the latest version of Parse-Server and post if the issue persists?

@stale
Copy link

stale bot commented Aug 3, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the state:wont-fix Won’t be fixed with a clearly stated reason label Aug 3, 2019
@TomWFox TomWFox closed this as completed Aug 3, 2019
@saulogt
Copy link

saulogt commented Aug 26, 2019

I'm having the same issue with most recent version (1.4.3) of parse dashboard

@acinader
Copy link
Contributor

@saulogt what version of parse-server are you using? Can you upgrade to the latest parse-server version and see if the problem persists?

@saulogt
Copy link

saulogt commented Aug 26, 2019

I'm using 3.3.0. I'll try upgrading it.
BTW... I cloned parse dashboard to debug the error and found the error happens in LogViewEntry.react.js:L47 because LogViewEntry receives timestamp as undefined. Most log entries are related to beforeSave hooks.
Doing something like timestamp && timestamp.iso || timestamp made the log screen to render

let LogViewEntry = ({
  text = '',
  timestamp,
}) => {
  let logEntryInfo = getLogEntryInfo(text);
  let classes = [styles.entry, logEntryInfo.error ? styles.error: ''];
  return (
    <li className={classes.join(' ')}>
      {/* handle the timestamp format used by both Parse Server and Parse.com */}
      <span className={styles.time}>{timestamp.iso || timestamp} - </span> <<<<< HERE!!!
      <span className={styles.content}>{logEntryInfo.content}</span>
    </li>
  );
}

@saulogt
Copy link

saulogt commented Aug 26, 2019

Updating parse server to 3.7.2 solved the problem. I thought the problem was in the dashboard version I was using. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:wont-fix Won’t be fixed with a clearly stated reason
Projects
None yet
Development

No branches or pull requests

5 participants