RienNeVaPlus / wikifolio-example

Example for the wikifolio API (https://github.com/RienNeVaPlus/wikifolio)
MIT License
2 stars 2 forks source link

Error when executing the example #2

Closed beyse closed 3 years ago

beyse commented 3 years ago

Good day to you, Sir!

When I try to run the example, I get an error. Please see the console log below:

PS C:\git\wikifolio-example> yarn start --trace-warnings
yarn run v1.22.5
$ tsc && node ./dist --trace-warnings
Your credentials will not be stored.
√ Wikifolio email ... my-email@address.com
√ Wikifolio password ... ***********
(node:8484) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '1' of null
    at Wikifolio.<anonymous> (C:\git\wikifolio-example\node_modules\wikifolio\dist\models\Wikifolio.js:292:107)
    at step (C:\git\wikifolio-example\node_modules\wikifolio\dist\models\Wikifolio.js:44:23)
    at Object.next (C:\git\wikifolio-example\node_modules\wikifolio\dist\models\Wikifolio.js:25:53)
    at fulfilled (C:\git\wikifolio-example\node_modules\wikifolio\dist\models\Wikifolio.js:16:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:8484) 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:8484) [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.
Done in 24.13s.

I am not a JavaScript or TypeScript developer, so I have very limited debugging capabilities. Any help on this issue is very much appreciated.

Best Regards!

RienNeVaPlus commented 3 years ago

Good day to you too, Sir,

thanks for letting me know.

I've upgraded the repository to use the latest version of wikifolio (v0.3.1). Make sure to git pull and yarn install before trying again.

beyse commented 3 years ago

Dear Gentleman, thank you very much!

I am curious: What caused the break of the system and might it occur again in the near future?

RienNeVaPlus commented 3 years ago

It was caused by a deprecated dependency. I will try to keep this repository up to date with the wikifolio one, but be aware that both can - and propably will - break at some point in the future.

wikifolio is not made by wikifolio.com, I have no affiliation with them. wikifolio is fetching HTML pages from wikifolio.com and extracts certain parts of them. Although I've tried to pick the identifiers as reasonable as possible, wikifolio.com would only need to rename a certain part of their code and the whole API could break down. Then again I'm an active user of wikifolio and will propably try to adapt (hopefully within a few days).

It's a classic cat-and-mouse game.

beyse commented 3 years ago

Alright, it's good to know that it was just a missing dependcy and no major problem. You said you are an active user of your wikifolio API. May I ask what you are doing with it? I understand if you wish to discuss this not in public, however.

RienNeVaPlus commented 3 years ago

There might be a little hint within the example's index. 😉 But I think there are better places to discuss this. You can send me an email, if you want to have a chat about wikifolio.

beyse commented 3 years ago

Sure, whats your email address?