Skip to content

[Bug]: console.log causes crash if stdout is not connected #847

@LevitatingBusinessMan

Description

@LevitatingBusinessMan

Installation Method

Flatpak

Linux Distribution

OpenSUSE

Tidal Hi-Fi Version

6.1.0

Current Behavior

If I open tidal via the application launcher or via a disconnected terminal I get an error pop-up if it fails to write to stdout using console.log. This may happen if the file descriptor is closed.

The error originates here:

console.log(content, Object.keys(object).length > 0 ? JSON.stringify(object, null, 2) : "");

I use the flatpak, but I think I also experienced it with the OpenSUSE package.

Expected Behavior

If console.log fails it should fail silently

Steps to Reproduce

  1. Open tidal via the terminal like so: $ flatpak run com.mastermindzh.tidal-hifi & disown
  2. Exit the terminal
  3. Do something in the app that causes a log, like pausing the player
  4. Observe error pop-up

Screenshots and Logs

Image

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions