Litarvan/pronote-api

invalid distance too far back

chtibizoux opened this issue · 1 comments

J'ai cette erreur quand je lance mon programme:

(node:21004) UnhandledPromiseRejectionWarning: invalid distance too far back
(Use `node --trace-warnings ...` to show where the warning was created)
(node:21004) 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:21004) [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.

Voici mon programme:

const pronote = require('pronote-api');

async function main() {
    const session = await pronote.login("http://pronote.lyc-touchard-72.ac-nantes.fr/pronote/", "xxxxxx", "xxxxxx", "ac-nantes");
    const evaluations = await session.evaluations();
    console.log(evaluations);
    const menu = await session.menu();
    console.log(menu);
}
main();

et avec un catch juste ça invalid distance too far back

En fait les erreurs sont aléatoires, j'ai aussi c'est 4 la de temps en temps invalid stored block lengths, invalid block type, invalid distance code et invalid code lengths set