Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloudFlare enabled website now crashing Haruneko #750

Open
MikeZeDev opened this issue Aug 16, 2024 · 12 comments
Open

CloudFlare enabled website now crashing Haruneko #750

MikeZeDev opened this issue Aug 16, 2024 · 12 comments
Assignees
Labels
Bug Something isn't working

Comments

@MikeZeDev
Copy link
Contributor

MikeZeDev commented Aug 16, 2024

  • Select any Cf website
  • try to refresh manga list / fetch chapters
  • Hakuneko crashes

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

I got that using NWJS.

@MikeZeDev MikeZeDev added the Bug Something isn't working label Aug 16, 2024
@ronny1982
Copy link
Contributor

Which NWjs versions are causing this issue

@MikeZeDev
Copy link
Contributor Author

MikeZeDev commented Aug 17, 2024

    "nw": "0.90.0-sdk",
  • It seems reproducible, try refreshing manga list for hiperdex they have CF activated right now

  • No crash with Electron.

  • Cant confirm there is no problem when we have clearance cookie before initiating request

@MikeZeDev
Copy link
Contributor Author

MikeZeDev commented Aug 17, 2024

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
Copy link
Contributor Author

MikeZeDev commented Aug 17, 2024

Its a consequence of the NWJS bug mentioned here #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
Copy link
Contributor Author

MikeZeDev commented Aug 17, 2024

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
Copy link
Contributor Author

Tracked Here

@ronny1982
Copy link
Contributor

Seems to be fixed with NW 0.95.0 but was neither mentioned in release notes, nor in the related ticket.

@MikeZeDev
Copy link
Contributor Author

MikeZeDev commented Feb 3, 2025

Still crashing.

@forestpas3
Copy link

when viewing chapter from likemanga it crashes too

fetch list without issue
likemanga works with electron

@MikeZeDev MikeZeDev marked this as a duplicate of #1014 Feb 7, 2025
@ronny1982
Copy link
Contributor

ronny1982 commented Feb 8, 2025

Still crashing.

Can you provide steps to reproduce?
I tested some known CloudFlare websites and they didn't crash with NW 0.95.0-sdk

@MikeZeDev
Copy link
Contributor Author

MikeZeDev commented Feb 8, 2025

Tursntile window dont crash anymore.

Its crashing when i try FetchMangas.

  1. Select any website where test is nulled because of CloudFlare. Lets say, Casacomic
  2. Open website window : Endless loop turnstile (fine)
  3. Try to fetch manga list : crash

I made sure that i am using 0.95.0 sdk.

@MikeZeDev
Copy link
Contributor Author

MikeZeDev commented Feb 8, 2025

Error occurs in FetchWindowPreloadScript , on await win.Open(request, this.featureFlags.VerboseFetchWindow.Value, preload);

Even doing this

 const win = CreateRemoteBrowserWindow();
 await win.Open(request, this.featureFlags.VerboseFetchWindow.Value, preload);

Make it crash. Perhaps there is something CF doesnt like with CreateRemoteBrowserWindow

Since there is no crash when opening website window by clicking on the button, it must be on our end.

@ronny1982 ronny1982 self-assigned this Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants