Background apps not running despite setting being enabled

Description of the issue:

I’m not entirely sure where the issue lies, or if it even is an issue to begin with, but I noticed today that background processes were not running while the browser is closed, despite the setting being enabled. This is primarily impacting the Snowflake extension, causing it to turn off when the browser is re-opened. Furthermore, the option to let it keep running when the browser is closed has vanished. While I would normally just ignore this and move on, the fact that it’s keeping my Snowflake proxy from working properly is what tipped me off.

The first time I noticed this, I thought it was because my antivirus restarted my computer, and that it would resolve itself after the computer is turned off, then turned back on. The issue persists.

I know background apps are not running since I no longer see the Brave icon in my taskbar tray. Furthermore, the Snowflake icon in the browser is not changing based on the presence of an active connection or connections made in the past 24 hours since the browser was opened, remaining purple and without listing the number of connections on the icon.

How can this issue be reproduced?

Not sure - Happened practically overnight without any settings being knowingly changed

Expected result:

Brave icon appears in tray, Snowflake remains on, while showing number of connections in past 24 hours on the icon in the browser.

Brave Version( check About Brave):

Version 1.69.153 Chromium: 128.0.6613.85 (Official Build) (64-bit)

Additional Information:

OS: Windows 10, build 22H2

This topic ( Problem with "continue running background apps when brave is closed" ) may or may not be related.

The Task Manager still shows several Brave processes running simultaneously while the browser is opened.

I checked the GitHub page, and no similar issue was noticed.

I have attempted to disable “Continue running background apps when Brave is closed” and re-enable it. Nothing changed. I also just now noticed that “Volunteer to help others connect to the Tor network” was automatically turned off when I opened the “Privacy and security” section. Re-enabling it did not change the situation.

I have a few hypotheses:

1: This is a bug introduced in the latest version, either due to it being tied to Chromium as a whole, or strictly just Brave. (Someone else will need to try this on a different Chromium browser, since Brave is the only Chromium browser I use.)
2: The Snowflake extension was updated and greatly weakened. (Interestingly, the Firefox version of Snowflake doesn’t have the ability to run in the background when Firefox is closed, meaning it now acts as it does on Firefox.)
3: This was an intentional change to the Brave browser.
4: An extension was updated, and is interfering. The extensions I have have not been changed since my last post ( No Audio in Brave Talk )
5: Tor is being suppressed.

If I should test this on a fresh profile to see if some setting has been messed with, I can.

@MystMrX, I’m not sure exactly what differences exist between extensions that might affect what is considered “running in the background” or classified as a “background app.” However, I can share that I intentionally keep the Ibotta extension installed to ensure Brave continues running in the background. Here’s the link to the extension: https://chromewebstore.google.com/detail/ibotta-price-compare-cash/mfaedmjlefifhnhpgipjjiiekchaimpk?hl=en-US.

And with that can also say that not every extension is equal. I’ve had others added before but Brave just exits when closed. So there must be something in the creation of the extension that has an influence.

Also want to add that you may be able to figure out which extension, if any, is identified as a background app by disabling them all, exiting Brave, and then returning and enabling. For example, I just had done that and saw the notification appear as you see here in the screenshot below:

image

And yes, background apps are extensions. To my knowledge, nothing else is considered a background app.

@Saoiray I disabled all of my extensions and re-enabled them, just as you did, and I did not get a notification to appear as I re-enabled them. Still no Brave icon in the tray, and Snowflake has not regained full functionality. What should I troubleshoot next?

Yeah, I’m saying they may not be programmed to be considered as running in the background. And as I mentioned earlier, I’m not sure how that works. But was saying you could use ibotta to handle that way in the interim.

Beyond that would have to see if @Mattches can help with any insight.

On a side note, Google’s Gemini did suggest https://chromewebstore.google.com/detail/chrome-background-runner/cfpbjggdmogjceodagocpbmikhdoaokn?pli=1

And a Reddit post mentioned https://chromewebstore.google.com/detail/lightning-reopen-v3/egchpomclkbegdfgkdmhmbhpanlahoda

Key idea is just having to figure extensions built to continue running.

Actually, just specifically asked Gemini and this was its answer, for what it’s worth:

Setting a Chrome Extension as a Background App
Understanding Background Scripts:
Background scripts are essential for Chrome extensions that need to perform tasks in the background, even when the browser window is closed or minimized. They run continuously and can be used for various purposes, such as:

  • Periodic tasks: Checking for updates, syncing data, or sending notifications.

  • Event listeners: Listening for events like tab changes or network requests.

  • Communication: Interacting with other parts of the extension or the browser.
    Steps to Create a Background Script:

  • Manifest File:

    • Open your extension’s manifest.json file.
    • Add the following property to declare a background script:
      “background”: {
      “scripts”: [“background.js”]
      }

    Replace background.js with the actual filename of your background script.

  • Background Script:

    • Create a new JavaScript file (e.g., background.js) in your extension’s directory.
    • This script will contain the code you want to execute in the background.
      Example Background Script:
      chrome.runtime.onInstalled.addListener(function() {
      console.log(“Extension installed!”);
      });

chrome.alarms.create(“periodic_task”, { delayInMinutes: 1 });

chrome.alarms.onAlarm.addListener(function(alarm) {
console.log(“Alarm triggered!”);
// Perform your periodic task here
});

This example demonstrates:

  • Event listener: Listens for the extension being installed.
  • Alarm: Creates a periodic alarm to trigger a task every minute.
  • Alarm handler: Executes a task when the alarm is triggered.
    Additional Considerations:
  • Permissions: If your background script needs to access certain browser APIs or data, make sure to request the necessary permissions in your manifest.json file.
  • Performance: Be mindful of the resources your background script consumes, as it runs continuously. Avoid heavy computations or network requests that might impact the browser’s performance.
  • Debugging: Use the Chrome DevTools to debug your background script. You can set breakpoints, inspect variables, and log messages to the console.
    By following these steps and understanding the concepts of background scripts, you can effectively create Chrome extensions that perform tasks in the background and enhance the user experience.
    Would you like to see a more specific example tailored to a particular use case?


@Saoiray While we wait for an expert opinion, I suppose I will add one more observation.

In the Windows 10 settings, Brave does not appear in the list of apps capable of running in the background. The DuckDuckGo browser, however, does, and is the only one that appears in the list. While I am starting to wonder if the issue lies with Windows disabling something Brave needs to run in the background (and have Snowflake operate while the browser is closed), the fact that Discord doesn’t show up in the list, despite it being able to run in the background just fine, has turned this into a confusing situation.

Unfortunately, I did not bother to check this list while Brave was able to operate in the background to see if it showed up there.

I know this might not add much to the discussion, but I figured I’d at least acknowledge this point.