question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

telegraf error undefined undefined Error: next(ctx) called with invalid context

See original GitHub issue
telegraf error undefined undefined Error: next(ctx) called with invalid context
    at execute (/Users/polly/Web/activecollab-telegram-bot/node_modules/telegraf-inline-menu/node_modules/telegraf/composer.js:303:33)
    at /Users/polly/Web/activecollab-telegram-bot/node_modules/telegraf-inline-menu/node_modules/telegraf/composer.js:300:14
    at execute (/Users/polly/Web/activecollab-telegram-bot/node_modules/telegraf/composer.js:315:13)
    at Promise.resolve.handler (/Users/polly/Web/activecollab-telegram-bot/node_modules/telegraf/composer.js:315:49)
    at execute (/Users/polly/Web/activecollab-telegram-bot/node_modules/telegraf/composer.js:315:13)
    at Promise.resolve.handler (/Users/polly/Web/activecollab-telegram-bot/node_modules/telegraf/composer.js:315:49)
    at /Users/polly/Web/activecollab-telegram-bot/node_modules/telegraf/session.js:24:12
    at execute (/Users/polly/Web/activecollab-telegram-bot/node_modules/telegraf/composer.js:315:13)
    at Promise.resolve.handler (/Users/polly/Web/activecollab-telegram-bot/node_modules/telegraf/composer.js:315:49)
    at /Users/polly/Web/activecollab-telegram-bot/node_modules/telegraf/composer.js:116:56

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
EdJoPaTocommented, Jan 28, 2019

I had no luck with recreating it. I simply generated a new project, installed telegraf-inline-menu and ran a copy of example.js.

I also used older versions of telegraf and older versions of telegraf-inline-menu without any errors.

I doubt it is a startup error as on the startup of telegraf-inline-menu no telegraf is involved. I assume there was a message that was not yet handled before the start so it happened while handling the first updates (after bot.startPolling() was called).

Any ideas how to recreate this error?

1reaction
alirezaaccommented, Jan 26, 2019

upgrading telegraf package fixed mine

Read more comments on GitHub >

github_iconTop Results From Across the Web

telegraf error undefined undefined Error: next(ctx) called with ...
I doubt it is a startup error as on the startup of telegraf-inline-menu no telegraf is involved. I assume there was a message...
Read more >
javascript - Stage.enter doesn't start the wizard - Stack Overflow
I created an application which display a survey wizard to the user. When the user launch the /start command, I call the AddProject...
Read more >
telegraf.js - v4.11.2
If middleware throws an error or times out, Telegraf calls bot.handleError . If it rethrows, update source closes, and then the error is...
Read more >
telegraf/README.md - UNPKG
The CDN for telegraf. ... 42, bot.hears('hi', (ctx) => ctx.reply('Hey there')) ... 242, If middleware throws an error or times out, Telegraf calls...
Read more >
Sessions and Storing Data (built-in) - grammY
function getSessionKey(ctx: Context): string | undefined { // Give every user their one personal session storage per chat with the bot // (an ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found