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

401 After Using wt update to Update a CRON Webtask #157

Open
NotMyself opened this issue Sep 25, 2017 · 3 comments
Open

401 After Using wt update to Update a CRON Webtask #157

NotMyself opened this issue Sep 25, 2017 · 3 comments
Assignees

Comments

@NotMyself
Copy link
Contributor

A customer reported issue: https://auth0.zendesk.com/agent/tickets/28116

Steps to Reproduce

Via CLI

  1. wt cron schedule "* * * * *" test_case
  2. Let the CRON schedule execute.
  3. wt cron history test_case - Note the task completes as expected
  4. wt update test_case test_case.js
  5. Let the CRON schedule execute.
  6. wt cron history test_case

Result

scheduled_at:      2017-09-25T16:25:00.000Z
started_at:        2017-09-25T16:25:00.437Z
completed_at:      2017-09-25T16:25:00.587Z
type:              error
statusCode:        401
body:              {"message":"Unauthenticated extensibility point","statusCode":401}

Expected Result

scheduled_at:      2017-09-25T16:24:00.000Z
started_at:        2017-09-25T16:24:00.580Z
completed_at:      2017-09-25T16:24:00.744Z
type:              success
statusCode:        200
body:              {"hello":"Anonymous"}
@steve-a-jones
Copy link

Was getting this same issue as well.

My work-around was to first create the webtask in the cli and then update the scheduler in the webtask gui.

@rwtombaugh rwtombaugh added add and removed add labels Jan 22, 2018
@NotMyself
Copy link
Contributor Author

This is still a bug. The workflow has changed.

  1. wt cron create --schedule 1m task.js --name cron-test
  2. Let the CRON schedule execute.
  3. wt cron history cron-test - Note the task completes as expected
  4. wt update cron-test task.js
    1. Let the CRON schedule execute.
  5. wt cron history cron-test

Results are the same as above.

@HemalR
Copy link

HemalR commented Sep 30, 2018

Hmm.. Getting a similar error, but sporadic. Not sure why. And not sure if related, but when loading the webtask using the web portal, the console gives this error (which I can't make out what it means):

{ Error: Not Found
at Request.callback (/data/_verquire/sandboxjs/3.6.1/node_modules/sandboxjs/node_modules/superagent/lib/node/index.js:696:15)
at IncomingMessage.parser (/data/_verquire/sandboxjs/3.6.1/node_modules/sandboxjs/node_modules/superagent/lib/node/index.js:906:18)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickDomainCallback (internal/process/next_tick.js:219:9) statusCode: 404 }

This happens even if I modify the code and simplify it to:

module.exports = async (ctx, cb) => {
	console.log('Running');
}

micalevisk added a commit to micalevisk/gist-auto-update that referenced this issue Feb 27, 2019
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

6 participants