目录

MōBrowser 2.6.0

We’re happy to announce MōBrowser 2.6.0. This release adds the Permissions API, several important improvements and fixes.

What’s new 

Application permissions 

You can now check if your app has access to the microphone, camera, or accessibility by using the app.permissions API.

The following example shows how to check if the app has access to the microphone:

import { app } from '@mobrowser/api'

let status = app.permissions.getStatus('microphone')
// If the permission is not determined or denied,
// request it from the system and update the status.
if (status === 'notDetermined' || status === 'denied') {
  status = await app.permissions.request('microphone')
}

You can also open the system settings from your app to ask the user to grant the required permission manually. Here’s how to open the accessibility settings:

import { app } from '@mobrowser/api'

app.permissions.openSystemSettings('accessibility')

Improvements 

  • Disabled the elastic scroll feature on macOS. This feature is web browser specific and is not needed in desktop applications.

  • You can now set a custom installation folder name for the Windows installer using the following property in your mobrowser.conf.json:

    "Windows": {
      "installer": {
        "exe": {
          "packageId": "com.company.MyApp",
          "installationFolderName": "My App",
    

    On Windows, MōBrowser will install the application under %LOCALAPPDATA%\<installationFolderName>. If omitted, the packageId is used as before.

  • Added AppArmor support to the MōBrowser CLI. When running npm run dev on Linux systems with AppArmor enabled (e.g. Ubuntu 23.10+), the CLI can now help grant the required permission to the app binary, so it can start correctly avoiding the crash. In the previous versions, you could see the following error when running the app in development mode:

    $ npm run dev
    
    > App@0.0.0 dev
    > mobrowser dev
    
    Starting dev server...
    Dev server URL: http://localhost:5173/
    ✓ Building application [0.78s]
    ✓ Running application in development mode...
    /App/build/bin/App [10214:10214:0410/114605.785856:FATAL:content/browser/zygote_host/zygote_host_impl_linux.cc:128] No usable sandbox! If you are running on Ubuntu 23.10+ or another Linux distro that has disabled unprivileged user namespaces with AppArmor, see https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md. Otherwise see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the (older) SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
    signal: trace/breakpoint trap (core dumped)
    

    Now CLI can detect this case and offer to create a per-app AppArmor profile for the development binary:

    ⚠️ AppArmor is restricting unprivileged user namespaces on this system.
      This prevents "App" from starting in a sandboxed environment.
      Details: https://teamdev.com/mobrowser/docs/troubleshooting/apparmor/
    
      A permissive AppArmor profile must be created for "App":
    
      /etc/apparmor.d/app-dev
      ────────────────────────────
      abi <abi/4.0>,
      include <tunables/global>
    
      profile app-dev "path/to/App" flags=(unconfined) {
        userns,
        include if exists <local/app-dev>
      }
    
    ? Create the profile and reload AppArmor? (requires sudo) (Y/n) 
    

    Pressing Enter will create the profile and reload AppArmor. This requires sudo and only needs to be done once.

  • The build status spinner is turned off automatically in CI (for example when CI environment variable is set) and for non-TTY or redirected output, so logs stay short. On Windows, MSYS2/Cygwin/MinTTY terminals are detected correctly, so the spinner still works in a real console. Use MOBROWSER_NO_SPINNER=1 to force the quiet status line anywhere.

Fixes 

  • Fixed a bug where, in production mode, the page was not granted all required permissions by default.
  • Fixed an issue where Origin Private File System fails with a SecurityError when opening storage using navigator.storage.getDirectory() in production mode.
  • Remove Chromium copyright from app preview in Finder on macOS.