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

Client error when defining Action trend #351

Closed
alex-ketch opened this issue Mar 13, 2020 · 1 comment
Closed

Client error when defining Action trend #351

alex-ketch opened this issue Mar 13, 2020 · 1 comment
Assignees

Comments

@alex-ketch
Copy link

alex-ketch commented Mar 13, 2020

Describe the bug
Attempting to define 'Action trends' on a new account results in errors, making it impossible(?) to create reports.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Trends' view
  2. See error in console
  3. Add an action filter
  4. No data graph is presented

Expected behavior

  1. Go to 'Trends' view
  2. Add an action filter
  3. See a graph of the results

Screenshots

Kapture 2020-03-13 at 10 04 46


Kapture 2020-03-13 at 9 44 26-314


Screen Shot 2020-03-13 at 09 31 14

Desktop (please complete the following information):

  • OS: macOS 10.15.3
  • Browser: Safari
  • Version: 13.0.5

Additional context

This is on the hosted PostHog instance.

Seems to be due to directly accessing the id the last actions.results item when the results list is empty (line 51).
Not familiar enough with the project to say whether that's a client or backend issue though.

fetchActions() {
api.get('api/action').then(actions => {
if (!this.state.filters.actions)
this.setFilters({
actions: [
{ id: actions.results[actions.results.length - 1].id },
],
})
this.setState({ actions: actions.results })
})
}

@timgl timgl closed this as completed in f1ab9a5 Mar 13, 2020
timgl added a commit that referenced this issue Mar 13, 2020
…-defined

Closes #351 client error when no actions defined
@timgl
Copy link
Collaborator

timgl commented Mar 13, 2020

@alex-ketch Thanks Alex, that is fixed. The reason for this is we normally load in some example actions, but that didn't happen with your account (due to the same issue that caused your token not to be set).

Once you create an action, you should be on your way!

yakkomajuri pushed a commit that referenced this issue Oct 1, 2021
* Rename "retry" to "jobs", improve API for scheduling jobs.

* refactor jobs test

* more debug for redlock

* turn the job code around

* add `.runAt` method

* add tests for the three methods: runNow, runAt and runIn

* use variable delay

* fix unintentionally broken test

* better ways to throw errors

* log a bit more on error in tests

* use graphile url for consumer, refactor queues slightly

* move connect to server

* silence warning for now

* fix default config in GH tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants