sleroq / nhentai-telegram-bot

Telegram bot for nhentai
57 stars 48 forks source link

Persistent instant view issue with a certain comic. #11

Closed pseudokawaii closed 3 years ago

pseudokawaii commented 3 years ago

No matter how much I try, I can't get the comic 178983 as instant view. It returns as a normal Telegraph link without the instant view button (mobile version screenshot). It doesn't even show up in the search (by name, author or tag). Here's what I tried ~

None of them worked. The fixing feature throws this error (not only for this comic) ~

Repl.it :

(node:253) UnhandledPromiseRejectionWarning: ReferenceError: manga is not defined
    at module.exports.fixInstantView (/home/runner/nhentai-telegram-bot/bot/buttons/fix_instant_view.js:28:20)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async module.exports.cb_query (/home/runner/nhentai-telegram-bot/bot/buttons/index.js:37:5)
    at async /home/runner/nhentai-telegram-bot/server.js:85:43
    at async execute (/home/runner/nhentai-telegram-bot/node_modules/telegraf/lib/composer.js:458:17)
    at async /home/runner/nhentai-telegram-bot/node_modules/telegraf/lib/composer.js:459:21
    at async execute (/home/runner/nhentai-telegram-bot/node_modules/telegraf/lib/composer.js:458:17)
    at async /home/runner/nhentai-telegram-bot/node_modules/telegraf/lib/composer.js:459:21
    at async execute (/home/runner/nhentai-telegram-bot/node_modules/telegraf/lib/composer.js:458:17)
    at async /home/runner/nhentai-telegram-bot/node_modules/telegraf/lib/composer.js:459:21
    at async execute (/home/runner/nhentai-telegram-bot/node_modules/telegraf/lib/composer.js:458:17)
    at async /home/runner/nhentai-telegram-bot/node_modules/telegraf/lib/composer.js:459:21
    at async execute (/home/runner/nhentai-telegram-bot/node_modules/telegraf/lib/composer.js:458:17)
    at async /home/runner/nhentai-telegram-bot/node_modules/telegraf/lib/composer.js:459:21
    at async execute (/home/runner/nhentai-telegram-bot/node_modules/telegraf/lib/composer.js:458:17)
    at async /home/runner/nhentai-telegram-bot/node_modules/telegraf/lib/composer.js:459:21
(node:253) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:253) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Heroku :

2021-06-20T05:43:12.598686+00:00 app[web.1]: ReferenceError: manga is not defined

2021-06-20T05:43:12.598687+00:00 app[web.1]:     at module.exports.fixInstantView (/app/bot/buttons/fix_instant_view.js:28:20)

2021-06-20T05:43:12.598687+00:00 app[web.1]:     at runMicrotasks (<anonymous>)

2021-06-20T05:43:12.598688+00:00 app[web.1]:     at processTicksAndRejections (node:internal/process/task_queues:94:5)

2021-06-20T05:43:12.598688+00:00 app[web.1]:     at async module.exports.cb_query (/app/bot/buttons/index.js:37:5)

2021-06-20T05:43:12.598689+00:00 app[web.1]:     at async /app/server.js:85:43

2021-06-20T05:43:12.598689+00:00 app[web.1]:     at async execute (/app/node_modules/telegraf/lib/composer.js:458:17)

2021-06-20T05:43:12.598689+00:00 app[web.1]:     at async /app/node_modules/telegraf/lib/composer.js:459:21

2021-06-20T05:43:12.598690+00:00 app[web.1]:     at async execute (/app/node_modules/telegraf/lib/composer.js:458:17)

2021-06-20T05:43:12.598690+00:00 app[web.1]:     at async /app/node_modules/telegraf/lib/composer.js:459:21

2021-06-20T05:43:12.598690+00:00 app[web.1]:     at async execute (/app/node_modules/telegraf/lib/composer.js:458:17)

2021-06-20T05:43:12.598691+00:00 app[web.1]:     at async /app/node_modules/telegraf/lib/composer.js:459:21

2021-06-20T05:43:12.598691+00:00 app[web.1]:     at async execute (/app/node_modules/telegraf/lib/composer.js:458:17)

2021-06-20T05:43:12.598692+00:00 app[web.1]:     at async /app/node_modules/telegraf/lib/composer.js:459:21

2021-06-20T05:43:12.598692+00:00 app[web.1]:     at async execute (/app/node_modules/telegraf/lib/composer.js:458:17)

2021-06-20T05:43:12.598692+00:00 app[web.1]:     at async /app/node_modules/telegraf/lib/composer.js:459:21

2021-06-20T05:43:12.598693+00:00 app[web.1]:     at async execute (/app/node_modules/telegraf/lib/composer.js:458:17)

2021-06-20T05:43:12.684623+00:00 heroku[web.1]: Process exited with status 1
sleroq commented 3 years ago

Thanks for the bug report! I fixed ReferenceError: manga is not defined in ff20b2a The problem was misspelling of the variable. So now you should be able to "fix" instant view page.