manga-download / haruneko

Prototype of HakuNeko based on NW.js + TypeScript
https://haruneko-docs.pages.dev
118 stars 32 forks source link

CloudFlare enabled website now crashing Haruneko #750

Open MikeZeDev opened 3 weeks ago

MikeZeDev commented 3 weeks ago

Doesnt seems to crash when cookies has ben transmitted from Chrome.

I got that using NWJS.

ronny1982 commented 3 weeks ago

Which NWjs versions are causing this issue

MikeZeDev commented 3 weeks ago
    "nw": "0.90.0-sdk",
MikeZeDev commented 3 weeks ago

image

Crash caused by debugger instruction from CF script (??) while executing MediaPlugin.Initialize(): Promise

  public async Initialize(): Promise<void> {
        const request = new Request(this.URI.href);
        return FetchWindowScript(request, ''); //<< THIS
    }
MikeZeDev commented 3 weeks ago

Its a consequence of the NWJS bug mentioned here https://github.com/manga-download/haruneko/issues/621.

We reject the promise with 'Failed to open window (invalid content)!', then we run into NWJS code :

image

that "resumeparser" is crashing the whole app.

https://github.com/search?q=repo%3Anwjs%2Fnw.js+block_parser&type=code

MikeZeDev commented 3 weeks ago

I made a dummy app that is just doing this.

async function OpenWindow() {
    await nw.Window.open('https://hivetoon.com');

    await new Promise((resolve) => { setTimeout(resolve, 5000);});

    nw.App.closeAllWindows();
    nw.App.quit();
}
OpenWindow();

//nwjs-sdk-v0.84.0-win-x64 : load properly
//nwjs-sdk-v0.85.0-win-x64 : dont load, dont crash
//nwjs-sdk-v0.86.0-win-x64 : dont load, dont crash
//nwjs-sdk-v0.87.0-win-x64 : dont load, dont crash
//nwjs-sdk-v0.88.0-win-x64 : dont load, dont crash
//nwjs-sdk-v0.89.0-win-x64 : dont load, dont crash
//nwjs-sdk-v0.90.0-win-x64 : dont load + crash
MikeZeDev commented 3 weeks ago

Tracked Here