GooseMod is a new store-driven Discord mod.
goosemod / openasar Goto Github PK
View Code? Open in Web Editor NEWOpen-source alternative of Discord desktop's app.asar
Home Page: https://openasar.dev
License: GNU Affero General Public License v3.0
Open-source alternative of Discord desktop's app.asar
Home Page: https://openasar.dev
License: GNU Affero General Public License v3.0
GooseMod is a new store-driven Discord mod.
Original and current OA do:
Potential rewrite to do first and second checks (fetching) parallel.
Develop plugins system to have parts of OA separated out (and allow external dev in future?)? Unsure on
Try and add crash recovery (hard client crash on startup)
Could:
Some reports of it just stopping startup / not retrying / etc. with network / download failure. Ensure it retries fine if network fails (temporarily).
We have been doing more and more "deep integration" (util file -> within 1 file which uses it) lately, seems to have seemingly large savings in terms of size, also somewhat nicer code as less small files to manage which were only used by one other file anyway.
When using OpenAsar on Discord Canary on macOS, the installation on startup for modules updates invariably stops on "Installing update 3 of 10." The update installation doesn't proceed past that point no matter how long I wait. If I quit and restart Canary, the updater still fails, stalling on "Installing update 1 of 8" as it tries to continue where it left off. The logo keeps spinning, but no more modules are installed.
Canary stays on this screen indefinitely until I quit the app:
When I start Discord from Terminal for a modules update, this is what the console shows (with my name redacted):
<username>@<name>'s-MacBook-Pro MacOS % ./Discord\ Canary
Hello from Powercord!
Loading Discord
[OpenAsar > Init] OpenAsar vnightly-c51e4c1
[OpenAsar > Init] Resources Path: /Applications/Discord Canary.app/Contents/Resources
[OpenAsar > AppSettings] Loaded settings.json with path /Users/<username>/Library/Application Support/discordcanary/settings.json with settings {
BACKGROUND_COLOR: '#202225',
IS_MAXIMIZED: true,
IS_MINIMIZED: false,
WINDOW_BOUNDS: { x: 0, y: 25, width: 1440, height: 815 }
} and last modified 1633584725838
[OpenAsar > Init] Loaded config {}
[OpenAsar > CmdSwitches] Preset: perf
[OpenAsar > CmdSwitches] Switches: --flag-switches-begin --enable-gpu-rasterization --enable-zero-copy --ignore-gpu-blocklist --enable-hardware-overlays=single-fullscreen,single-on-top,underlay --enable-features=EnableDrDc,CanvasOopRasterization,BackForwardCache:TimeToLiveInBackForwardCacheInSeconds/300/should_ignore_blocklists/true/enable_same_site/true,ThrottleDisplayNoneAndVisibilityHiddenCrossOriginIframes,UseSkiaRenderer,WebAssemblyLazyCompilation --disable-features=Vulkan --force_high_performance_gpu --enable-quic --flag-switches-end
[OpenAsar > CmdSwitches] Appended switch flag-switches-begin undefined
[OpenAsar > CmdSwitches] Appended switch enable-gpu-rasterization undefined
[OpenAsar > CmdSwitches] Appended switch enable-zero-copy undefined
[OpenAsar > CmdSwitches] Appended switch ignore-gpu-blocklist undefined
[OpenAsar > CmdSwitches] Appended switch enable-hardware-overlays single-fullscreen,single-on-top,underlay
[OpenAsar > CmdSwitches] Appended switch enable-features EnableDrDc,CanvasOopRasterization,BackForwardCache:TimeToLiveInBackForwardCacheInSeconds/300/should_ignore_blocklists/true/enable_same_site/true,ThrottleDisplayNoneAndVisibilityHiddenCrossOriginIframes,UseSkiaRenderer,WebAssemblyLazyCompilation
[OpenAsar > CmdSwitches] Appended switch disable-features Vulkan
[OpenAsar > CmdSwitches] Appended switch force_high_performance_gpu undefined
[OpenAsar > CmdSwitches] Appended switch enable-quic undefined
[OpenAsar > CmdSwitches] Appended switch flag-switches-end undefined
[OpenAsar > Bootstrap] Forcing Electron props
[OpenAsar > BuildInfo] Loaded build info { releaseChannel: 'canary', version: '0.0.281' }
[OpenAsar > ErrorHandler] Inited
[OpenAsar > Paths] Init! Returns:
getUserData: /Users/<username>/Library/Application Support/discordcanary
getUserDataVersioned: /Users/<username>/Library/Application Support/discordcanary/0.0.281
getResources: /Applications/Discord Canary.app/Contents/Resources
getModuleDataPath: /Users/<username>/Library/Application Support/discordcanary/0.0.281/modules
getInstallPath: null
true false
[OpenAsar > Bootstrap] Start minimized: false
[Modules] Modules initializing
[Modules] Distribution: remote
[Modules] Host updates: enabled
[Modules] Module updates: enabled
[OpenAsar > Mkdirp] Sync: /Users/<username>/Library/Application Support/discordcanary/0.0.281/modules/pending
[Modules] Module install path: /Users/<username>/Library/Application Support/discordcanary/0.0.281/modules
[Modules] Module installed file path: /Users/<username>/Library/Application Support/discordcanary/0.0.281/modules/installed.json
[Modules] Module download path: /Users/<username>/Library/Application Support/discordcanary/0.0.281/modules/pending
[OpenAsar > Splash] Initing splash
[OpenAsar > Splash] Created BrowserWindow
[OpenAsar > Splash] Failed to inject splash CSS
file:///Applications/Discord Canary.app/Contents/Resources/app.asar/splash/index.html?oaVersion=nightly-c51e4c1&oaConfig={}
[OpenAsar > Splash] Loading window (with url file:///Applications/Discord Canary.app/Contents/Resources/app.asar/splash/index.html)
[OpenAsar > Splash] Quickstart config: undefined - undefined undefined
[Modules] Installing updates...
[Modules] Installing discord_desktop_core@9 from /Users/<username>/Library/Application Support/discordcanary/0.0.281/modules/pending/discord_desktop_core-9.zip
[OpenAsar > Yauzl] Zip path: /Users/<username>/Library/Application Support/discordcanary/0.0.281/modules/pending/discord_desktop_core-9.zip Extract path: /Users/<username>/Library/Application Support/discordcanary/0.0.281/modules/discord_desktop_core
[OpenAsar > Yauzl] Spawned
[OpenAsar > Yauzl] Closed
[Modules] Installing discord_erlpack@9 from /Users/<username>/Library/Application Support/discordcanary/0.0.281/modules/pending/discord_erlpack-9.zip
[OpenAsar > Yauzl] Zip path: /Users/<username>/Library/Application Support/discordcanary/0.0.281/modules/pending/discord_erlpack-9.zip Extract path: /Users/<username>/Library/Application Support/discordcanary/0.0.281/modules/discord_erlpack
[OpenAsar > Yauzl] Spawned
[OpenAsar > Yauzl] Closed
[Modules] Installing discord_spellcheck@9 from /Users/<username>/Library/Application Support/discordcanary/0.0.281/modules/pending/discord_spellcheck-9.zip
[OpenAsar > Yauzl] Zip path: /Users/<username>/Library/Application Support/discordcanary/0.0.281/modules/pending/discord_spellcheck-9.zip Extract path: /Users/<username>/Library/Application Support/discordcanary/0.0.281/modules/discord_spellcheck
[OpenAsar > Yauzl] Spawned
[OpenAsar > Splash] Window declared ready, showing and starting update process
The updater stalls after the last line, and the app looks like the screenshot above.
I am using:
Uninjecting Powercord does not do anything to help this issue; only replacing app.asar with Discord's version makes the module updater work as intended. The first two lines of the console output above ("Hello from Powercord!" and "Loading Discord") go away without Powercord, but that's the only difference.
I noticed this bug when I installed OpenAsar on Canary a couple of days ago and subsequently tried to install a modules update, and it's been an issue for every OpenAsar build and Canary modules update that I've installed so far. I haven't been able to test whether this issue also affects stable Discord, given the lower frequency of updates. For now, I've been switching back and forth between OpenAsar for normal use and Discord's app.asar, which does not have this problem, for installing modules updates.
The module where the updater gets stuck appears to be discord_spellcheck
, based on the console and the contents of the modules folder. discord_desktop_core
and discord_erlpack
, which update first without any problems, appear to only consist of individual files (including .asar and .node files), while discord_spellcheck
has a particularly large (16.7 MB) node_modules directory. Perhaps that has something to do with it?
Edit: but the unzip command works fine from Terminal...so that can't be why it's not working, can it?
Seems to make very little difference in testing but may assist a bit on poor HDDs?
mommy ducko pls
Rewrite logging internal to make log context instead of just one global log with context as arg prefixed.
Rewrite 100% of source, currently estimated at around 90% done. Mostly unneeded rewrites which will be a hassle to do cleanly like splash backend and some leftover updater parts.
Files left todo:
Todo:
TBD
Simpler / easier name?
This is a minor issue, but sometimes when I click a link discord either freezes or crashes
OS: Ubuntu
Browser: Firefox
Client: BetterDiscord
Hello, I am having difficulty finding app.asar on Linux. Where would it be?
Main broken thing is requiring modules. Good for system electron users.
Do standard Discord colors and also ThemeSync for config window
Used on Linux for host updates
Discord Build: Stable 108924 (eb8c571)
OpenAsar Build: Nightly - OpenAsar 1a7d927
OpenAsar Settings: Default (Out of the box)
Operating System: Windows 10 64-bit
Modifications: None
Description: Discords tries to use browser hand-off key auth whenever I start discord, when that doesn't work it asks me to login manually. This happens every time I open discord but reloads work just fine. I suspect its something to do with not being able to store the credentials to disk. It's just a hunch and I don't have any evidence of it.
Steps to Reproduce:
Unknown if this feat is wanted / would be useful, needs feedback
Sorry man for disturbing but yeah I needed help in that thing for figuring that out.
I use a theme that lives in my quickcss (in goosecord) since the version of the dracula theme i use isn't in the goosemod repos port request, anyways it would be nice if the themeSync option supported quickcss options in client mods or maybe a quickcss option was added! This is probably useless to all normal users.
%SystemRoot%
for reg.exe
as unneeded (?)add
The launcher will hang on checking for updates when started without internet. When internet is restored, it will still be stuck in this state unless restarted.
This is a problem because since I am on wifi, discord will automatically start before the network has finished making a connection.
This may be related to #4.
Todo:
settings.json
via theme CSS url (?)Currently only Linux, adding Windows testing would allow testing to cover more code which otherwise is untested (during dev and CI). Requires build flow / suite rewrite due to using bash scripts / etc
If unzip is not installed, OpenAsar will get stuck attempting to and failing to unzip the modules, repeatedly.
Instead, it should crash and tell the user to install unzip.
I am asking this question to confirm that it's safe and free from any vulnerabilities so I could share with others and on my youtube channel and even use it thanks. Meaning I want to confirm that you are agree it does not have any type of vulnerability and you are liable for any loss of data or password etc
Is it possible to include a scroll speed modifier? The scrolling speed of electron applications on Linux is excruciatingly slow. There are some solutions, such as imwheel, but they are too hacky (just sends multiple scroll events to increase speed). So, if it is possible to do so through the asar file, please let me know.
tired turning ssoeAllowlist on or off and also quickstart on and off still if you send an image and click open original nothing happens
Currently wastes time by rechecking even after just installing new. (Vanilla + OA does this.)
Make a version (/ setting?) of OA which is completely libre / "free". Possible by using GU as update host instead of official API and not using Discord's assets in splash.
Original and current OA do a purposeful failed install to make it install latest remote. Just check / download latest instead of purposeful failure? Cleaner + vaguely faster.
When I use the application with the normal asar it works fine, but when I use the open one strange things happen. Sound in the program works as expected but when joining a call, the audio gets crusty. Not like quality crusty, but unlistenably crusty. I really like this as a solution, but I hope this can be resolved
Use stdout to detect when certain things are done in vanilla / OpenAsar
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.