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

Mac build not passing patch comparison check on latest release #41

Open
lukenamop opened this issue Mar 18, 2021 · 5 comments
Open

Mac build not passing patch comparison check on latest release #41

lukenamop opened this issue Mar 18, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@lukenamop
Copy link

lukenamop commented Mar 18, 2021

Error: Current Blitz version caused patch comparison check to fail. Look for a new patcher release or create a new issue on Github!

    at Object.modifyFileAtLine (/snapshot/blitz-app-adblock-3.0.3/io.js)
    at start (/snapshot/blitz-app-adblock-3.0.3/blitz-app-adblock.js)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Manually building v3.0.3.

@lulzsun
Copy link
Owner

lulzsun commented Mar 19, 2021

Patcher appears to still be working on Windows. Not exactly sure why it Blitz versions would be different between Windows and Mac.

Could you provide the 'app.asar' file so that I could check for differences?

@lulzsun lulzsun added the bug Something isn't working label Mar 19, 2021
@lukenamop
Copy link
Author

lukenamop commented Mar 20, 2021

Here's the current app.asar for Version 1.13.141.1617 (zipped into a folder because GitHub wouldn't let me upload the file directly).
app.asar.zip

@lukenamop lukenamop changed the title New Mac Blitz Version 1.13.140.1557 New Mac Blitz Version 1.13.141.1617 Mar 20, 2021
@lulzsun
Copy link
Owner

lulzsun commented Mar 21, 2021

After manually taking a look at your app.asar, I came to conclusion that both Mac and Windows have the exact same app.asar, or at least the file that needs patching (createWindow.js) are the same.

I think there might be an issue where the string check can fail on MacOS?

The string check is in place to make sure that lines 118 and 105 are empty to prevent any issues with patching over necessary lines of code. If something exists there then that means the patch may fail so it throws the patch comparison error message instead of patching. By removing the third argument from modifyFileAtLine, it will just override those lines without checking.

If you are manually building, fetch latest commit and try removing the third argument from these two lines in blitz-app-adblock.js like so:

(56)            io.modifyFileAtLine(js.filterEngine, `${appPath}/app/src/createWindow.js`, 118);
(57)            io.modifyFileAtLine('session: true,', `${appPath}/app/src/createWindow.js`, 105);

@lukenamop
Copy link
Author

lukenamop commented Mar 21, 2021

Adjusting lines 56 and 57 as you suggested, building, and running worked with no issues. Blitz is now open with no ads again! Thanks for the help.

I'll continue using this edited version of the code and I'll just reinstall if it breaks Blitz or anything! Feel free to close this issue, or keep following up if you want to try to dig deeper for more info.

@lukenamop
Copy link
Author

For more information for your own debugging purposes, I am on an M1 Mac but I am running Terminal on Intel architecture via Rosetta (npm fails to build when I try to compile natively, but that's just an npm issue and not related to your code).

newaroundhere referenced this issue Mar 23, 2021
Added instructions on how to run on Mac #39
@lulzsun lulzsun changed the title New Mac Blitz Version 1.13.141.1617 Mac build not passing patch comparison check on latest release May 31, 2021
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

2 participants