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

Category not verified. Need API About category. #199

Closed
billychou opened this issue Jul 2, 2019 · 7 comments
Closed

Category not verified. Need API About category. #199

billychou opened this issue Jul 2, 2019 · 7 comments
Labels

Comments

@billychou
Copy link

Summary

I create event with api /api/app/create_event/v1 request, then if the category is not valid, the app crashed when job executed.

Can you supply the event category api? Thus i can verify the event。 Thanks.

Steps to reproduce the problem

Your Setup

version: 0.8.28

Operating system and version?

CentOS 7.2

Node.js version?

$node --version v8.9.1

Cronicle software version?

Are you using a multi-server setup, or just a single server?

a single server

Are you using the filesystem as back-end storage, or S3/Couchbase?

NAS filesystem

Can you reproduce the crash consistently?

YES

Log Excerpts

TypeError: Cannot read property 'max_children' of null
    at /home/admin/tian-ji-cronicle/target/tian-ji-cronicle/lib/job.js:122:17
    at /home/admin/tian-ji-cronicle/target/tian-ji-cronicle/node_modules/_async@2.6.0@async/dist/async.js:3874:9
    at /home/admin/tian-ji-cronicle/target/tian-ji-cronicle/node_modules/_async@2.6.0@async/dist/async.js:473:16
    at replenish (/home/admin/tian-ji-cronicle/target/tian-ji-cronicle/node_modules/_async@2.6.0@async/dist/async.js:993:25)
    at iterateeCallback (/home/admin/tian-ji-cronicle/target/tian-ji-cronicle/node_modules/_async@2.6.0@async/dist/async.js:983:17)
    at /home/admin/tian-ji-cronicle/target/tian-ji-cronicle/node_modules/_async@2.6.0@async/dist/async.js:958:16
    at /home/admin/tian-ji-cronicle/target/tian-ji-cronicle/node_modules/_async@2.6.0@async/dist/async.js:3871:13
    at /home/admin/tian-ji-cronicle/target/tian-ji-cronicle/lib/job.js:102:6
    at /home/admin/tian-ji-cronicle/target/tian-ji-cronicle/node_modules/_pixl-server-storage@2.0.19@pixl-server-storage/list.js:630:7
    at /home/admin/tian-ji-cronicle/target/tian-ji-cronicle/node_modules/_async@2.6.0@async/dist/async.js:958:16
@billychou billychou changed the title Category not verified. Need API Category not verified. Need API About category. Jul 2, 2019
@jhuckaby jhuckaby added the bug label Jul 4, 2019
@jhuckaby
Copy link
Owner

jhuckaby commented Jul 4, 2019

Thanks for the bug report!

@regevbr
Copy link

regevbr commented Nov 27, 2019

Same here...

@regevbr
Copy link

regevbr commented Nov 27, 2019

For anyone trying to solve it -

  1. Stop the server
  2. Set the enabled flag in global/state.json to false (located in whatever filesystem you configured)
  3. Start the server
  4. Delete all events that has a bad category set on them
  5. Enable the scheduling in the UI

@jhuckaby is there a quick way to avoid such an issue by enforcing the category exists upon creation of event (and also disable the ability to remove a category if there are events attached to it)?
If it is straight forward I wouldn't mind setting a PR for it

@jhuckaby
Copy link
Owner

Working on this right now -- sorry for the delay. Should have a new build by this weekend.

@jhuckaby
Copy link
Owner

Fixed in v0.8.36.

...and also disable the ability to remove a category if there are events attached to it?

@regevbr Please note that this has always been the case. You cannot delete any categories that have any events attached to them. This is enforced both in the UI, and in the API.

@regevbr
Copy link

regevbr commented Nov 27, 2019

@jhuckaby thanks for the quick fix! I think you should also address the error that causes the entire server to crash. What do you think?

@jhuckaby
Copy link
Owner

@regevbr Sure, fixed in v0.8.37. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants