GGIEnrike / surfer-browser

Surfer is a modern web browser that offers an easy, minimalistic and polished browsing experience, with inspirations taken from the Safari browser, and uses Chromium and Electron technologies.
MIT License
3 stars 1 forks source link

Error when executing #88

Open Minyar2004 opened 1 year ago

Minyar2004 commented 1 year ago

Hello! I wanted to try your module and I got this error when launching npm run start 👍

D:\electron\surfer-browser>npm run start

> surfer-browser@0.1.0 start D:\electron\surfer-browser
> npm run build && electron ./dist/main.js

> surfer-browser@0.1.0 build D:\electron\surfer-browser
> tsc

[8100:0629/161914.161:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
(node:21480) UnhandledPromiseRejectionWarning: FetchError: request to https://raw.githubusercontent.com/cliqz-oss/adblocker/master/packages/adblocker/assets/ublock-origin/annoyances.txt failed, reason: con
nect ECONNREFUSED 185.199.111.133:443
    at ClientRequest.<anonymous> (D:\electron\surfer-browser\node_modules\node-fetch\lib\index.js:1491:11)
    at ClientRequest.emit (node:events:527:28)
    at TLSSocket.socketErrorListener (node:_http_client:454:9)
    at TLSSocket.emit (node:events:527:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
(Use `electron --trace-warnings ...` to show where the warning was created)
(node:21480) 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 n
ot 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)
GGIEnrike commented 1 year ago

Hi! It looks like that's an error from the third-party adblocker module provided by cliqz. Maybe they no longer maintain it, or you need to update the module by running npm i @cliqz/adblocker-electron@latest.

If nothing works, you can simply remove the adblocking and the rest of the browser will work fine. To do it, open src/View.ts and delete lines: 5 and 6 and 46, 47, 48.

Anywhere you see adblocker or `ElectronBlocker' or anything like that, you can remove these lines, since the module simply goes 'on top' of the app and is not involved in the logic. But the places I mentioned should be everything.

I will try to work on this later today, so I'll keep you posted and maybe commit a change to the repo.

This is an outdated version of the app btw, I'm building the next iteration of this browser at https://github.com/surferbrowser/surfer. It's a bit different looking though.

PS. it is not a module, but a fully fledged (not really) app.