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

Fails to run test (Error: ERR_FAILED (-2) loading) #9

Open
fduraibi opened this issue Feb 21, 2022 · 11 comments
Open

Fails to run test (Error: ERR_FAILED (-2) loading) #9

fduraibi opened this issue Feb 21, 2022 · 11 comments

Comments

@fduraibi
Copy link

It fails with the default settings/image when pressing the "Click to Start" button

Console output:

[me@fedora unredacter]$ npm start

> unredacter@1.0.0 start
> npm run build && electron ./dist/main.js


> unredacter@1.0.0 build
> tsc

(node:42136) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(node:42175) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Error occurred in handler for 'redact': Error: ERR_FAILED (-2) loading '  data:text/html;charset=utf-8,   <HTML/>   <body style="padding: 8px 0px 0px 8px; background-color:white;">   <span style="padding 0px 0px 0px 0px; font-weight: normal; line-spacing: 0px; word-spacing: 0px; white-space: pre; margin: 0; font-size: 32px; font-family:'Arial'">a</span><span style="padding 0px 0px 0px 0px; margin: 0; color: blue; font-size: 32px; font-family:'Arial'">█</span>   </body>   </HTML>   '
    at rejectAndCleanup (electron/js2c/browser_init.js:225:1288)
    at WebContents.stopLoadingListener (electron/js2c/browser_init.js:225:1673)
    at WebContents.emit (events.js:223:5) {
  errno: -2,
  code: 'ERR_FAILED',
  url: `  data:text/html;charset=utf-8,   <HTML/>   <body style="padding: 8px 0px 0px 8px; background-color:white;">   <span style="padding 0px 0px 0px 0px; font-weight: normal; line-spacing: 0px; word-spacing: 0px; white-space: pre; margin: 0; font-size: 32px; font-family:'Arial'">a</span><span style="padding 0px 0px 0px 0px; margin: 0; color: blue; font-size: 32px; font-family:'Arial'">█</span>   </body>   </HTML>   `
}

System: Fedora 35

@dan-bishopfox
Copy link
Member

That's weird. Not sure what that error means. Did you run npm install first?

@yangxin325
Copy link

I am also the same problems, i run npm install first. @dan-bishopfox

@dan-bishopfox
Copy link
Member

Looks like the error is in loading the HTML itself. No idea why that would happen, honestly.

@fduraibi
Copy link
Author

@dan-bishopfox yes I did run the install and it worked with no errors

@fduraibi
Copy link
Author

it seems to be an issue when running it inside a sandbox, disable this feature to make it work:

    webPreferences: {
      sandbox: false,

@royarisse
Copy link

I think the HTML is invalid; This is p00p: <HTML/>.

@w3ich3rt
Copy link

I think the HTML is invalid; This is p00p: <HTML/>.

Changing that did not help... error is still there

@PeanTaster
Copy link

Anyone solved this problem?

@fduraibi
Copy link
Author

@PeanTaster

Anyone solved this problem?

See if this workaround helps: #9 (comment)

@6iioii9
Copy link

6iioii9 commented Mar 11, 2023

샌드박스 내에서 실행할 때 문제가 되는 것 같습니다. 작동하려면 이 기능을 비활성화하세요.

    webPreferences: {
      sandbox: false,

where can I find sandbox?

@zcsernak
Copy link

샌드박스 내에서 실행할 때 문제가 되는 것 같습니다. 작동하려면 이 기능을 비활성화하세요.

    webPreferences: {
      sandbox: false,

where can I find sandbox?

In the main.ts file's 173rd row.
Setting it to false, solved the problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants