blitz-app-adblock icon indicating copy to clipboard operation
blitz-app-adblock copied to clipboard

Blitz crashes after patching

Open buttmuncher420 opened this issue 3 years ago • 35 comments

There is no error message, it just closes immediately upon opening with this adblocker installed.

buttmuncher420 avatar Jun 08 '21 07:06 buttmuncher420

Same here, it tries to launch but just ends poppin into close.

MortyMcFly420 avatar Jun 09 '21 11:06 MortyMcFly420

To elaborate more on this issue as it's crashing for many... here is an example log output from running the patcher on a fresh install of blitz. Checking for Blitz... win32 Extracting app.asar... Downloading ad & tracking filters... Patching... C:\Users\Redacted\AppData\Local\Programs\Blitz\resources/app/src/createWindow.js => Writing to line 276: try {const fs = require('fs');const { FiltersEngine, Request } = require('./adblocker.umd.min.js');const filters =fs.readFileSync(require.resolve('./easylist.txt'), 'utf-8') + '\n' +fs.readFileSync(require.resolve('./easyprivacy.txt'), 'utf-8') + '\n' +fs.readFileSync(require.resolve('./ublock-ads.txt'), 'utf-8') + '\n' +fs.readFileSync(require.resolve('./ublock-privacy.txt'), 'utf-8') + '\n' +fs.readFileSync(require.resolve('./peter-lowe-list.txt'), 'utf-8') + '\ngoogleoptimize.com\n';const engine = FiltersEngine.parse(filters);windowInstance.webContents.session.webRequest.onBeforeRequest({ urls: ['*://*/*'] }, (details, callback) => {const {match} = engine.match(Request.fromRawDetails({ url: details.url }));if (match == true) {log.info('BLOCKED:', details.url);callback({cancel: true});} else {callback({cancel: false});}});} catch (error) {log.error(error);} C:\Users\Redacted\AppData\Local\Programs\Blitz\resources/app/src/createWindow.js => Writing to line 103: session: true, Repacking app.asar... Cleaning up directory... `Patching complete! GLHF :)` Press ENTER to quit...

Opening blitz will just crash without a warning visible. Checking event viewer we find this: Faulting application name: Blitz.exe, version: 1.14.18.625, time stamp: 0x600b6b52 Faulting module name: ntdll.dll, version: 10.0.19041.964, time stamp: 0xb7db0838 Exception code: 0xc0000005 Fault offset: 0x0005f563 Faulting process id: 0xe74 Faulting application start time: 0x01d75d40a5ef7ed2 Faulting application path: C:\Users\Redacted\AppData\Local\Programs\Blitz\Blitz.exe Faulting module path: C:\Windows\SYSTEM32\ntdll.dll Report Id: a7f9dcf9-1bcf-4b0a-82f4-aa45c96e6bc3 Faulting package full name: Faulting package-relative application ID:

zach-v avatar Jun 09 '21 15:06 zach-v

Confirmed, not working.

GoldenLumia avatar Jun 13 '21 05:06 GoldenLumia

idem

MauroCastro1705 avatar Jun 16 '21 21:06 MauroCastro1705

Can confirm, it is not working.

majorcyto avatar Jun 19 '21 23:06 majorcyto

same its still broken

hellabump avatar Jul 01 '21 21:07 hellabump

Can confirm its refusing to start up

Sarm1X avatar Jul 10 '21 16:07 Sarm1X

I'm having the same issue. So do we know exactly why this is happening? A fix from blitz, or?? Thank you for any input.

IamKevio avatar Jul 23 '21 06:07 IamKevio

Same issue here - crashing when running Blitz

BroManDudeGuyPhD avatar Jul 24 '21 03:07 BroManDudeGuyPhD

Can confirm. Latest release of the Adblock breaks Blitz after installed.

TMKCRepo avatar Aug 01 '21 23:08 TMKCRepo

Any updates regarding the issue dev? :)

Sarm1X avatar Aug 06 '21 20:08 Sarm1X

I believe there is some file signature check, because any type of modification to the app.asar file will cause this crash/close on launch.

Here are the things that I have tested:

  1. Extracting app.asar to /app and deleting app.asar using 7zip
  2. Modify app.asar without extracting and repacking using 7zip
  3. Extracting app.asar (making no changes), and repacking using 7zip

All of the above causes a crash on startup, which leads me to believe it is a signature check. I'm not sure if its an electron feature or if it is something that Blitz has done to prevent things like this, it could even be something completely unrelated to any sort of security feature as well. I haven't looked into it any deeper than the tests I have done, it is not in my priorities to dive any deeper than this.

However, there are possible ways to go around this issue. One idea that I've thought about trying is to just inject javascript into the electron renderer. Here's an example of someone doing this. If anyone wants to test out something like this, I'd like to know the results, as I am currently no longer motivated to fix this on my own time.

lulzsun avatar Aug 06 '21 22:08 lulzsun

I have found a workaround with the following steps:

  1. Install Blitz
  2. Install Blit App Adblock
  3. Navigate to C:\users\YourWindowsUsername\AppData\Local\blit-update *
  4. Run installer.exe

Then the application seems to run ok. I am not seeing ads.

With default windows settings the AppData folder may not be visible. If you hit your windows key then type 'folder settings' and press enter -> view panel on top -> tick 'show hidden folders' option - then AppData folders will be visible.

adamski90 avatar Aug 14 '21 07:08 adamski90

I have found a workaround with the following steps:

1. Install Blitz

2. Install Blit App Adblock

3. Navigate to C:\users\YourWindowsUsername\AppData\Local\blit-update *

4. Run installer.exe

Then the application seems to run ok. I am not seeing ads.

With default windows settings the AppData folder may not be visible. If you hit your windows key then type 'folder settings' and press enter -> view panel on top -> tick 'show hidden folders' option - then AppData folders will be visible.

Did the following steps, but as it seems to patch blitz right back, the application ads are still showing on my end. Not working for me.

Sarm1X avatar Aug 14 '21 12:08 Sarm1X

I have found a workaround with the following steps:

  1. Install Blitz
  2. Install Blit App Adblock
  3. Navigate to C:\users\YourWindowsUsername\AppData\Local\blit-update *
  4. Run installer.exe

Then the application seems to run ok. I am not seeing ads.

With default windows settings the AppData folder may not be visible. If you hit your windows key then type 'folder settings' and press enter -> view panel on top -> tick 'show hidden folders' option - then AppData folders will be visible.

This worked for me, the app opens normally after restarting and the ads are nowhere to be found! Thanks @adamski90

AEPGANGSTER32 avatar Aug 14 '21 21:08 AEPGANGSTER32

Any hope for update and fix this?

czullo avatar Aug 26 '21 07:08 czullo

I fixed this issue in a recent PR for windows #60

appkins avatar Aug 28 '21 00:08 appkins

I am still having issues getting blitz-app-adblock to work on my PC. Installing blitz-app-adblock-win.exe, and then opening the Blitz application normally after that is still causing it to crash out every time. I have also tried the workaround orginally posted by
adamski90.

-Full close Blitz -Run the adblock installer -Then navigate and run the installer.exe file under C:/Users/username/AppData/Local/blitz-updater

Blitz does boot back up without crashing after following those directions, but the ads are still loading up as well.

IamKevio avatar Aug 28 '21 01:08 IamKevio

Kevio, that's because the pull request has not been merged yet so you do not have the updated version that Appkins is talking about. @lulzsun has to merge his changes first before it would work for you again on PC.

majorcyto avatar Aug 28 '21 02:08 majorcyto

@majorcyto Kevio is talking about doing the process manually. Which is what the pull request does automatically. I've tried doing the same process and it also didn't work on my end. But I'll give it another shot later with the pull request.

lulzsun avatar Aug 28 '21 02:08 lulzsun

Ah yeah, I see what you mean. My bad. I tried it manually before and it didn't work for me either. Not sure what is different about his set-up.

majorcyto avatar Aug 28 '21 02:08 majorcyto

I fixed this issue in a recent PR for windows #60

I also tried building with your changes, but ads still appear however. I didn't review what the changes were, but I noticed that the installer runs as part of the process now.

SonicGold avatar Aug 28 '21 17:08 SonicGold

Not sure if this helps, but I'm using the version of the Blitz app distributed through winget package manager. After running winget install blitz and running the script in my PR, Blitz runs without ads.

appkins avatar Aug 30 '21 15:08 appkins

There are some other factors that could come into play. You probably need to do a clean install of Blitz, because I've noticed that Blitz stages new versions of the app with their own asar file to be patched into the application. This directory should not exist if you do a clean install.

appkins avatar Aug 30 '21 15:08 appkins

So I think we need to identify a new part of the Blitz ecosystem to fully resolve the issue: Blitz Updater.

If you're running this against a Blitz app that has already run, the patcher is most likely in place. The patcher's responsibility is to replace parts of the Blitz app with new files, one of those being the asar archive. The program will either need to patch this archive, or wipe the contents of the update directory. I think both solutions will completely resolve the issue

appkins avatar Aug 31 '21 15:08 appkins

There has to be some sort of integrity check done. Even if you don't repackage the asar and just change a comment block in a hex editor (without changing file size ofc) it still refuses to launch, so I guess we'll have to find exactly where this happens, and then patch it.

EDIT: I tried creating a TTD trace of the main EXE, but when doing that it actually booted without crashing. This makes me think it tried to do some network call before verifying the files, which then timed out (and was apparently fine with it timing out) because TTD is kind of slow. Not sure how helpful that knowledge is, but I guess it's good to know that it most likely gets it's info from the web and it's not a bundled hash value or something inside the application.

The crash always happens after the second window pops up and it establishes a connection (e.g. after the "retry connection" thing pops up if it's having connectivity issues)

I guess the easiest thing would be if someone had an earlier version of the app.asar package that worked with ad blocking to see what exactly changed. And if nothing changed we can at least rule out that it is happening in the JS application.

gr3ger avatar Sep 01 '21 09:09 gr3ger

This is the console output that differs between a modified app.asar and the original one.

The following only happens to the unpatched asar file.

[10992:0901/141551.380:INFO:CONSOLE(178)] "Setting ads to banners", source: https://blitz-desktop.blitz.gg/1.15.35/static/js/main.b9b7a72f.js (178)
[10992:0901/141551.472:INFO:CONSOLE(178)] "Updating app version to 1.15.35", source: https://blitz-desktop.blitz.gg/1.15.35/static/js/main.b9b7a72f.js (178)
[10992:0901/141551.560:INFO:CONSOLE(178)] "Debug: tcloaded", source: https://blitz-desktop.blitz.gg/1.15.35/static/js/main.b9b7a72f.js (178)
[10992:0901/141551.759:INFO:CONSOLE(113)] "APP CORE VERSION 1.15.35", source:  (113)
[10992:0901/141551.794:INFO:CONSOLE(0)] "Error: unauthorized: unauthenticated", source:  (0)

With the exception of [10992:0901/141551.759:INFO:CONSOLE(113)] "APP CORE VERSION 1.15.35", source: (113) being added to the bottom of the patched one as well.

This is when launching the application without being logged in.

I will keep investigating

EDIT: If anyone wants to try with older versions etc, you can download them by going to https://blitz-stable.blitz.gg/ and if you want to download a specific version, just put the <Key> value in the path, like https://blitz-stable.blitz.gg/Blitz-1.14.9.exe and it should download. Then just use 7zip or something similar to unpack it without installing, that way you can get the asar file from whichever version you want.

Another thing worth noting is that the application takes three arguments that could be useful. --debug --dev --verbose

gr3ger avatar Sep 01 '21 11:09 gr3ger

Not sure if this helps, but I'm using the version of the Blitz app distributed through winget package manager. After running winget install blitz and running the script in my PR, Blitz runs without ads.

Thank man! And It's still showing ads in my case! Hope to get a better solution

kotobuki09 avatar Sep 06 '21 14:09 kotobuki09

Well.. This is work for me: Run blitz > Press Privacy > REJECT ALL ADS > SAVE AND EXIT.. Done, the picture its just for proof :) Blitz_YBhPjJdMpz

If it works for you, i will like to hear it!

Vaxie avatar Oct 15 '21 17:10 Vaxie

Well.. This is work for me: Run blitz > Press Privacy > REJECT ALL ADS > SAVE AND EXIT.. Done, the picture its just for proof :) Blitz_YBhPjJdMpz

If it works for you, i will like to hear it!

I don't have the red privacy button on my version, what version are you on?

Niravpatel129 avatar Oct 18 '21 08:10 Niravpatel129