gavinbenda / platinum-md

Minidisc NetMD Conversion and Upload
MIT License
230 stars 38 forks source link

Linux 1.2.0 version #141

Closed gk1954 closed 2 years ago

gk1954 commented 2 years ago

I use LinuxMint and Platinum MD 0.7.0 mostly works fine, having sometimes problems connecting to the device. Version 1.2.0. connects to my MD device and also shows what' already on the disc. When trying to transfer a file to MD the status bar says "converting to wav" and doesn't stop. As I am not a programmer I don't know how to handle this bug. The debug window shows the following:

renderer.js:56 /home/gk/Musik/Sault - Untitled/ renderer.js:56 no-connection renderer.js:56 Attempting to read from NetMD renderer.js:56 no-connection renderer.js:56 Object renderer.js:56 Attempting to read from NetMD renderer.js:56 Error opening netmd Error while opening the USB device

renderer.js:56 CLI did not return valid json data (anonymous) @ renderer.js:56 renderer.js:56 Guessed MIME-type not supported: image/jpeg (anonymous) @ renderer.js:56 renderer.js:56 { "device":"Sony PCGA-MDN1", "title":"Gov' t Mule", "recordedTime":"00:06:03.18", "totalTime":"01:20:59.08", "availableTime":"01:14:49.22", "tracks":[ { "no":0, "protect":"UnPROT", "bitrate":"SP", "time":"02:30:47", "name":"columbine - Townes Van Zandt" }, { "no":1, "protect":"UnPROT", "bitrate":"SP", "time":"03:32:57", "name":"To The River - John Cougar Mellencamp" } ] } renderer.js:56 Array(2) renderer.js:56 false renderer.js:56 ready renderer.js:56 Object renderer.js:56 progress Idle renderer.js:56 121.02378684807256 renderer.js:56 Processing track: 0 renderer.js:56 Error: EACCES: permission denied, mkdir '/tmppmd-temp' at Object.fs.mkdirSync (fs.js:885:18) at D (file:///tmp/.mount_platinArefMl/resources/app.asar/dist/electron/renderer.js:56:396060) at a. (file:///tmp/.mount_platinArefMl/resources/app.asar/dist/electron/renderer.js:56:399253) at b (file:///tmp/.mount_platinArefMl/resources/app.asar/dist/electron/renderer.js:30:17984) at Generator._invoke (file:///tmp/.mount_platinArefMl/resources/app.asar/dist/electron/renderer.js:30:17737) at Generator.forEach.t.(anonymous function) [as next] (file:///tmp/.mount_platinArefMl/resources/app.asar/dist/electron/renderer.js:30:18164) at o (file:///tmp/.mount_platinArefMl/resources/app.asar/dist/electron/renderer.js:1:9014) at file:///tmp/.mount_platinArefMl/resources/app.asar/dist/electron/renderer.js:1:9159 at new Promise () at new e (file:///tmp/.mount_platinArefMl/resources/app.asar/dist/electron/renderer.js:17:8415) (anonymous) @ renderer.js:56 b @ renderer.js:30 (anonymous) @ renderer.js:30 forEach.t.(anonymous function) @ renderer.js:30 o @ renderer.js:1 (anonymous) @ renderer.js:1 e @ renderer.js:17 (anonymous) @ renderer.js:1 X.methods.upload @ renderer.js:56 Gt @ renderer.js:7 r @ renderer.js:7 Xo.i._wrapper @ renderer.js:7 renderer.js:56 /home/gk/Musik/Sault - Untitled/SAULT - UNTITLED (Black Is) - 01 Out The Lies.wav renderer.js:56 Starting conversion in mode renderer.js:56 progress Converting to Wav renderer.js:56 Starting WAV conversion process using ffmpeg: /home/gk/Musik/Sault - Untitled/SAULT - UNTITLED (Black Is) - 01 Out The Lies.wav --> /tmppmd-temp/SAULT - UNTITLED (Black Is) - 01 Out The Lies - No Artist.wav renderer.js:56 Spawned Ffmpeg with command: ffmpeg -i /home/gk/Musik/Sault - Untitled/SAULT - UNTITLED (Black Is) - 01 Out The Lies.wav -y -ar 44100 -acodec pcm_s16le /tmppmd-temp/SAULT - UNTITLED (Black Is) - 01 Out The Lies - No Artist.wav renderer.js:56 ffmpeg error: ffmpeg exited with code 1: /tmppmd-temp/SAULT - UNTITLED (Black Is) - 01 Out The Lies - No Artist.wav: No such file or directory

renderer.js:1 Uncaught (in promise) ffmpeg exited with code 1: /tmppmd-temp/SAULT - UNTITLED (Black Is) - 01 Out The Lies - No Artist.wav: No such file or directory

o @ renderer.js:1 (anonymous) @ renderer.js:1 Promise rejected (async) o @ renderer.js:1 (anonymous) @ renderer.js:1 e @ renderer.js:17 (anonymous) @ renderer.js:1 (anonymous) @ renderer.js:56 e @ renderer.js:17 (anonymous) @ renderer.js:56 b @ renderer.js:30 (anonymous) @ renderer.js:30 forEach.t.(anonymous function) @ renderer.js:30 o @ renderer.js:1 (anonymous) @ renderer.js:1 e @ renderer.js:17 (anonymous) @ renderer.js:1 X.methods.convert @ renderer.js:56 (anonymous) @ renderer.js:56 b @ renderer.js:30 (anonymous) @ renderer.js:30 forEach.t.(anonymous function) @ renderer.js:30 o @ renderer.js:1 (anonymous) @ renderer.js:1 e @ renderer.js:17 (anonymous) @ renderer.js:1 X.methods.upload @ renderer.js:56 Gt @ renderer.js:7 r @ renderer.js:7 Xo.i._wrapper @ renderer.js:7

Can anyone help? Günter

deenine commented 2 years ago

The issue is this line:

renderer.js:56 Error: EACCES: permission denied, mkdir '/tmppmd-temp'

This is failing to create the temp directory required for the music format conversions before transferring to minidisc, because os.tmpdir is returning nothing, so it attempts to create a directory in the root, which you do not have permission to do so.

I suggest you open a terminal and type 'export' to see what environment variables are set, you are looking for one like 'TMPDIR' or similar. If not, add that to wherever linux mint stores its environment variables, and give it another try.

gk1954 commented 2 years ago

Thank you deenine, I fear this is too much for me. I can see that 1.2.0. version creates a tmp directory in /tmp, but I don't know, how to solve the problem, as I don't know enough about Linux. As I wrote, version 0.7 works and I think I sometimes saw a tmp directory in the directory window of platinum-md. Günter

gk1954 commented 2 years ago

I'm still trying to find a way to use version 1.2.0. This time with the latest xubuntu version. The same result. Version 0.7.0 works but version 1.2.0 not. I can see that with version 1.1.0 the tmp file location of Platinum MD was changed by @Shadester. It might be helpful to know which Linux distro was used. Günter

Shadester commented 2 years ago

For the tmp file location change it was done on OSX. There was no testing on Linux, since neither me nor Gavin is running Linux. It is using os.tmpdir that should work on all platforms. https://nodejs.org/api/os.html#ostmpdir

Although it looks like it might be missing a / ? It should problably be /tmp/pmd-temp instead of /tmppmd-temp ?

gk1954 commented 2 years ago

@Shadester That can be the case as / separates linux directories. As I wrote, I am not a programmer, just an old guy who still uses Minidiscs and mostly uses Linux. What can be done to fix this obvious bug? I can't see who works on Platinum MD for Linux to ask for support. Regards Günter

Shadester commented 2 years ago

There is no one who works on Platinum MD for Linux, if I understand correctly. @gavinbenda sometimes makes a crossbuild, but that's it. I can see if I can take a look at this next week, but I will only be able update the code, not make a new Linux build.

gavinbenda commented 2 years ago

Just pushed a new release - would be great if you have time to give it a look. https://github.com/gavinbenda/platinum-md/releases/tag/v1.2.1

Would have had a chance to look earlier, but got hit by COVID!

gk1954 commented 2 years ago

@gavinbenda Did a test with 1.2.1 and it worked. I did transfers with wav and flac files to LP, LP2 and LP4. Everything fine. Thank you for your support and I hope you get well again soon. @Shadester Thank you for your help.

gavinbenda commented 2 years ago

Awesome, thanks for testing!