anandnet / Harmony-Music

A cross platform App for streaming Music
GNU General Public License v3.0
975 stars 74 forks source link

App crashes before start #286

Closed FR34DB3R closed 1 month ago

FR34DB3R commented 2 months ago

Describe the bug The App Crashes before it even loads!

To Reproduce Steps to reproduce the behavior:

  1. Download the latest AppImage from Releases
  2. Install mpv and appindicator (forgot the name) using pacman or yay or paru or aura, etc...
  3. Run the AppImage from the terminal using:
    chmod +x ./harmonymusicv1.10.0.AppImage
    ./harmonymusicv1.10.0.AppImage
  4. See the error.

Expected behavior Does not work, crashes and outputs error log to the terminal

Screenshots I cant take screenshots for some reason but here's the log from the terminal:

./HarmonyMusic-1.9.2.AppImage
package:media_kit_libs_linux registered.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PathAccessException: Cannot open file, path = '/home/neo/.local/share/com.example.harmonymusic/db/songscache.hive' (OS Error: Permission denied, errno = 13)
#0      _checkForErrorResponse (dart:io/common.dart:55)
#1      _File.open.<anonymous closure> (dart:io/file_impl.dart:381)
<asynchronous suspension>
#2      StorageBackendVm.open (package:hive/src/backend/vm/storage_backend_vm.dart:71)
<asynchronous suspension>
#3      BackendManager.open (package:hive/src/backend/vm/backend_manager.dart:41)
<asynchronous suspension>
#4      HiveImpl._openBox (package:hive/src/hive_impl.dart:101)
<asynchronous suspension>
#5      HiveImpl.openBox (package:hive/src/hive_impl.dart:142)
<asynchronous suspension>
#6      initHive (package:harmonymusic/main.dart:102)
<asynchronous suspension>
#7      main (package:harmonymusic/main.dart:26)
<asynchronous suspension>

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PathAccessException: Cannot open file, path = '/home/neo/.local/share/com.example.harmonymusic/db/songscache.hive' (OS Error: Permission denied, errno = 13)
#0      _checkForErrorResponse (dart:io/common.dart:55)
#1      _File.open.<anonymous closure> (dart:io/file_impl.dart:381)
<asynchronous suspension>
#2      StorageBackendVm.open (package:hive/src/backend/vm/storage_backend_vm.dart:71)
<asynchronous suspension>
#3      BackendManager.open (package:hive/src/backend/vm/backend_manager.dart:41)
<asynchronous suspension>
#4      HiveImpl._openBox (package:hive/src/hive_impl.dart:101)
<asynchronous suspension>
#5      HiveImpl.openBox (package:hive/src/hive_impl.dart:142)
<asynchronous suspension>
#6      initHive (package:harmonymusic/main.dart:102)
<asynchronous suspension>
#7      main (package:harmonymusic/main.dart:26)
<asynchronous suspension>

Computer:

Additional context I guess the error is missing packages, but i dont know the names for Arch GNU/Linux

btw, tried using sudo but it just doesnt open. so i tried su and thats the log:

[root@archbtw Downloads]# ./harmonymusicv1.10.0.AppImage

(harmonymusic:4149): Atk-CRITICAL **: 20:58:46.557: atk_socket_embed: assertion 'plug_id != NULL' failed
package:media_kit_libs_linux registered.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: "AudioHandler" not found. You need to call "Get.put(AudioHandler())" or "Get.lazyPut(()=>AudioHandler())"
#0      GetInstance.find (package:get/get_instance/src/get_instance.dart:306)
#1      Inst.find (package:get/get_instance/src/extension_instance.dart:69)
#2      new PlayerController (package:harmonymusic/ui/player/player_controller.dart:22)
#3      startApplicationServices.<anonymous closure> (package:harmonymusic/main.dart:79)
#4      _InstanceBuilderFactory.getDependency (package:get/get_instance/src/get_instance.dart:544)
#5      GetInstance._startController (package:get/get_instance/src/get_instance.dart:252)
#6      GetInstance._initDependencies (package:get/get_instance/src/get_instance.dart:205)
#7      GetInstance.find (package:get/get_instance/src/get_instance.dart:302)
#8      Inst.find (package:get/get_instance/src/extension_instance.dart:69)
#9      DesktopSystemTray.initSystemTray (package:harmonymusic/utils/system_tray.dart:26)
<asynchronous suspension>

which i expected to happen :(

FR34DB3R commented 2 months ago

btw, tried using debtap to install using the .deb package, the exact same error.

anandnet commented 2 months ago

I have tested all linux based binaries on ubuntu. I am seeing crashing reports on Arch linux. So i have installed arch linux and currently investigating. Will let you know once it is fixed.

FR34DB3R commented 2 months ago

Alright thanks :)

anandnet commented 1 month ago

https://github.com/anandnet/Harmony-Music/issues/281#issuecomment-2386624988

FR34DB3R commented 1 month ago

nah that didn't work. but i got it to work!

so what i did was:

sudo chown neo:neo /home/neo/.local/share/com.example.harmonymusic/*/*
sudo chown neo:neo /home/neo/.local/share/com.example.harmonymusic/*

but just be sure to replace neo with your username :)

FR34DB3R commented 1 month ago

you can close the issue now