question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't work with Brave Browser-created "Chrome" apps

See original GitHub issue

Your Environment

  • Version used: 2.1.28
  • Operating System and version: Ubuntu Linux 18.04
  • Desktop Environment: Default (GNOME 3?)
  • Node version: v8.10.0

Expected Behavior

“Apps” created by using More tools -> Create shortcut in Brave should be saved properly.

Current Behavior

This happens:

$ lwsm save
findDesktopFile cant find file; searched patterns [ '/home/kevin/.local/share/applications/*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/home/kevin/.local/share/applications/**/*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/home/kevin/.gnome/apps//*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/home/kevin/.gnome/apps//**/*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/usr/share/applications/*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/usr/share/applications/**/*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/usr/local/share/applications/*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/usr/local/share/applications/**/*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/usr/share/app-install/*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/usr/share/app-install/**/*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/home/kevin/.config/autostart//*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/home/kevin/.config/autostart//**/*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/var/lib/snapd/desktop/applications/*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/var/lib/snapd/desktop/applications/**/*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/var/lib/flatpak/app/*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/var/lib/flatpak/app/**/*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/snap/bin/*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop',
  '/snap/bin/**/*chrome-pofoocnjclhmhkhkgibipddgekdlnfmj*.desktop' ]
util: Generic Error findDesktopFile cant find file; searched patterns undefined
util: { '0': 'findDesktopFile cant find file; searched patterns' }
Generic Error in Meta Wrapper TypeError: Cannot read property 'split' of undefined
    at findDesktopFile.then (/usr/local/lib/node_modules/linux-window-session-manager/lib/metaWrapper.js:194:35)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7) TypeError: Cannot read property 'split' of undefined
    at findDesktopFile.then (/usr/local/lib/node_modules/linux-window-session-manager/lib/metaWrapper.js:194:35)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
Generic Error in Meta Wrapper TypeError: Cannot read property 'split' of undefined
    at findDesktopFile.then (/usr/local/lib/node_modules/linux-window-session-manager/lib/metaWrapper.js:194:35)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7) TypeError: Cannot read property 'split' of undefined
    at findDesktopFile.then (/usr/local/lib/node_modules/linux-window-session-manager/lib/metaWrapper.js:194:35)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
Generic Error in Meta Wrapper TypeError: Cannot read property 'split' of undefined
    at findDesktopFile.then (/usr/local/lib/node_modules/linux-window-session-manager/lib/metaWrapper.js:194:35)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7) TypeError: Cannot read property 'split' of undefined
    at findDesktopFile.then (/usr/local/lib/node_modules/linux-window-session-manager/lib/metaWrapper.js:194:35)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
(node:31016) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'split' of undefined
    at findDesktopFile.then (/usr/local/lib/node_modules/linux-window-session-manager/lib/metaWrapper.js:194:35)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
(node:31016) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:31016) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Steps to Reproduce (for bugs)

  1. Install Brave Browser from https://brave.com/download/
  2. Go to any site. http://example.com will do
  3. Click the menu under the minimize/maximize/close buttons at the top-right of the window
  4. Under “More tools”, click “Create shortcut” and choose “Open as window” in the dialog that pops up.
  5. Once done, ensure the app is open and try lwsm save.

Notes

The issue is that Brave saves the files with a brave- prefix instead of a chrome- one. So you need to check WM_CLASS(STRING) for something like:

WM_CLASS(STRING) = "crx_hppgbgfhlaeddfkdifgnpndnccffohpn", "Brave-browser"

Here we see "Brave-browser" in the second position. It wasn’t immediately clear to me how to modify the program to do this, since by that point in the pipeline we’re already dealing with a filename, and I wasn’t sure if the WM_CLASS value was still in scope anywhere.

Example Brave filename: /home/kevin/.local/share/applications/brave-ddiddklncfgbfaaahngklemobghhjkim-Default.desktop

I can work around this by just changing the prefix manually. It doesn’t seem to break the apps (haven’t tried uninstalling one yet; unsure if it would fail to clean up the desktop file).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
johannesjocommented, Jun 30, 2019

Thanks for opening up this issue (and actually taking the time to fill out all the required information, people tend to forget 😉).

I’m pretty busy for the next weeks, but will probably check the one after that. Please remind me if I forget.

0reactions
wizonesolutionscommented, Jul 26, 2019

Seems OK now. I ran into another quirk that is separate; will open issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add or install Chrome extensions - Brave Browser
Click Extensions. This will open a new tab that shows all your current extensions. You should check this page regularly to ensure there...
Read more >
Brave Browser Apps Not Working at all
No app is launched. I'm on the latest version of both Mac OS and Brave, the apps were working fine before the Brave...
Read more >
Chrome Apps accessible in Brave? - Desktop Support
Description of the issue: I've installed an App from the Chrome Store. In Chrome, this is accessible from a new tab if I...
Read more >
Problems with some Chrome extensions - Brave Community
Hello to all,. I am in the process of migrating from Chrome to Brave, after discovering the Manifest V3 project.
Read more >
All Google apps are unusable - Desktop Support
I cannot access any Google app in Brave. I get the error: This page isn't working. <webpage> redirected you too many times.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found