Can't Open Sonic Pi 3.1.0... Error

Can’t open Sonic Pi 3.1.0 after recently updated my Macbook. It’s giving me this error. I figure the issue is on account of me updating my computer as it was running smoothly about a week ago.

Here’s the bootup error printout:

Sonic Pi Boot Error Report

==================

System Information


  • Sonic Pi version: 3.1.0

  • OS: macOS 10.13

GUI Log


/Users/sheamkennedy/.sonic-pi/log/gui.log


[GUI] - Detecting port numbers...

[GUI] - GUI OSC listen port 4558

[GUI] - port: 4558 [OK]

[GUI] - Server OSC listen port 4557

[GUI] - port: 4557 [OK]

[GUI] - Server incoming OSC cues port 4559

[GUI] - port: 4559 [OK]

[GUI] - Scsynth port 4556

[GUI] - port: 4556 [OK]

[GUI] - Server OSC out port 4558

[GUI] - GUI OSC out port 4557

[GUI] - Scsynth send port 4556

[GUI] - Erlang router port 4560

[GUI] - port: 4560 [Not Available]

[GUI] - OSC MIDI out port 4561

[GUI] - port: 4561 [Not Available]

[GUI] - OSC MIDI in port 4562

[GUI] - port: 4562 [OK]

[GUI] - Init script completed

[GUI] - using default editor colours

[GUI] - launching Sonic Pi Server:

[GUI] - starting UDP OSC Server on port 4558...

[GUI] - UDP OSC Server ready and listening

[GUI] - Ruby server pid registered: 73664

[GUI] - waiting for Sonic Pi Server to boot...

...

[GUI] - Sonic Pi Server failed to start with this error message:

> Port unavailable: 4560, is scsynth already running?

[GUI] - UDP OSC Server no longer listening

.........................................................

[GUI] - Critical error! Could not boot Sonic Pi Server.

[GUI] - stopping UDP OSC Server...

Server Errors


/Users/sheamkennedy/.sonic-pi/log/server-errors.log


Server Output


/Users/sheamkennedy/.sonic-pi/log/server-output.log


Sonic Pi server booting...

Using protocol: udp

Detecting port numbers...

Send port: 4558

Listen port: 4557

- OK

Scsynth port: 4556

- OK

Scsynth send port: 4556

- OK

OSC cues port: 4559

- OK

Erlang port: 4560

Port 4560 unavailable. Perhaps Sonic Pi is already running?

Scsynth Output


/Users/sheamkennedy/.sonic-pi/log/scsynth.log


Process Log


/Users/sheamkennedy/.sonic-pi/log/processes.log


Clearing pids: ["72353"]

Clearing [72353]

-- command /Applications/Sonic Pi.app/Contents/MacOS/../../app/server/native/ruby/bin/ruby --enable-frozen-string-literal -E utf-8 /Applications/Sonic Pi.app/Contents/MacOS/../../app/server/ruby/bin/sonic-pi-server.rb -u 4557 4558 4556 4556 4559 4560 4561 4562

-- removing /var/folders/q0/cdnhfmcx67qgtr_0m6ym4y040000gn/T/sonic-pi-pids/72353

-- unable to get ProcTable info for: 72353

-- process: 72353 not running

Finished clearing pids

Started [73664] [-] /Applications/Sonic Pi.app/Contents/MacOS/../../app/server/native/ruby/bin/ruby --enable-frozen-string-literal -E utf-8 /Applications/Sonic Pi.app/Contents/MacOS/../../app/server/ruby/bin/sonic-pi-server.rb -u 4557 4558 4556 4556 4559 4560 4561 4562 [-] /var/folders/q0/cdnhfmcx67qgtr_0m6ym4y040000gn/T/sonic-pi-pids/73664

1 Like

Hi there,

it’s the nuclear option, but easiest - could you reboot your Mac and try again?

That worked. Thanks again.

1 Like

This is becoming a bit annoying as I can only boot Sonic Pi after resetting my computer. Any time I close down the program I have to reset my computer again before I can open up the program again. I’ll be okay until this gets fixed, I just have to be careful not to close the program once I open it.

Sorry to hear this, but unfortunately it’s not something I can replicate locally and you’re the only case I’m aware where this happens every time you stop Sonic Pi.

I therefore don’t have sufficient information to start to figure out what to fix and how to fix it.

How are you stopping Sonic Pi?

I’m running it on a macbook with latest operating system. Turning Sonic Pi off by clicking the red “x” in the upper left corner of the window.

Very strange, sorry you’re having issues.

I just started and stopped v3.1 of Sonic Pi 5 times in a row (using the red “x”) and it worked flawlessly. I’m also using the latest macOS 10.14.

Did this only start working with 10.14 or did you have this issue previously?

The issue started on 10.14 as far as I know.

Hi,

I am having the same issue. Sonic pi is just not starting. I have restarted my computer also. Have also tried booting the scssynth as suggested by you on the git issues. But am still getting errors to start. Please help!!

  • Sonic Pi version: 3.1.0

  • OS: macOS 10.13

I’m not sure what git solution you’re referring to but I have my own temporary fix…

First launch sonic pi, it will fail to launch but will give you a report log. If you read through the report it will tell you what port number is not working. In my case it’s port number 4561. Now close sonic pi.

Open the Terminal window and type this being sure to write which port number was said to be failing for you:

sudo lsof -1 :4561

This will display an PID number on your screen. In my case the number is 12868.

Now that you have this number type:

kill 12868

And click enter. Now try launching sonic pi and it should boot up fine. Keep in mind if you close sonic pi and try to reopen it you’ll have to repeat this process again. It’s a bit of a hassle so I just try to keep sonic pi open in the background at all times.

I hope that helps. Let me know if anything needs to be clarified.

thank you so much. i will try it next time. for now not closing sonic pi. :slight_smile:

Resolved by plugging in headphones…

Getting the same error, even after restart:
High Sierra Version 10.13.6
Sonic Pi version 3.1.0

My issue was that it didn’t like the bluetooth headphones. So, I plugged them into my laptop and now it starts up fine. The logs were trying to find the internal speakers, but couldn’t resolve it… so if you want to replicate it, might wanna try with bluetooth headphones :slight_smile:

Hi everyone
Hi Sam

I am encountering the same problem on our brandnew Mac minis running Mojave. I am trying to setup a master with SonicPi running to clone 25 student Macs.
Posted the error as suggested here on github:

Rebooting doesn’t help.
Plugging earphones doesn’t help.

Thanks for any help or hints!
Swissmorgy

I found the following workaround on my Mac minis (OSX Mojave) which might help finding a permanent solution:

We have a Behringer USB audio-interface in house. When I plug it to the mac Mini, the system has an input-device (Which can be seen in Preferences) once it is plugged. Then, Sonic Pi starts and can be used. Even if the interface is unplugged once it is up and running.
With the USB interface not plugged, I get the same error and SonicPi can’t start.
Plugging phones or an external speaker has no effect on SonicPi boot behaviour on my system.

Any ideas how I can prevent SonicPi from waiting for an input source? (I don’t need it)
Or any ideas how I could add a permanent “dummy input” source to my system that would make SonicPi start?

@samaaron has done some work on Mac input in version 3.2dev commit #aa4a8bb on 8th May 2018
If you are happy with hacking into the 3.1 app you can right click the app icon and choose show package contents. Then navigate to server/ruby/lib/sonicpi/ and rename the file scsynthexternal.rb to say
scsynthexternalOLD.rb

Then go to the distribution of sonic pi on github and navigate to

https://github.com/samaaron/sonic-pi/blob/master/app/server/ruby/lib/sonicpi/scsynthexternal.rb

click on the raw button and then save the resulting text file on your system as scsynthexternal.rb

You can then copy this file into the same folder as the renamed scsynthexternalOLD.rb

If you then try and launch Sonic Pi this may solve your problem.

I have tried doing this on a virtual mojave install and it works.
Don’t worry that the location of the file is different in 3.2dev. It still works.

If you have no joy, you can always delete the new file and rename the old one back again.

Hello Robin

Thanks a lot for helping. I have done like you suggested but it doesn’t work:

Here’s what I consider the exact same error:

What is different in the newer version of scsynthexternal.rb? As I got the same error I started looking for differences but couldn’t find any…

System Information


  • Sonic Pi version: 3.1.0

  • OS: macOS 10.14

GUI Log


/Users/oszt/.sonic-pi/log/gui.log


[GUI] - Detecting port numbers...

[GUI] - GUI OSC listen port 4558

[GUI] - port: 4558 [OK]

[GUI] - Server OSC listen port 4557

[GUI] - port: 4557 [OK]

[GUI] - Server incoming OSC cues port 4559

[GUI] - port: 4559 [OK]

[GUI] - Scsynth port 4556

[GUI] - port: 4556 [OK]

[GUI] - Server OSC out port 4558

[GUI] - GUI OSC out port 4557

[GUI] - Scsynth send port 4556

[GUI] - Erlang router port 4560

[GUI] - port: 4560 [OK]

[GUI] - OSC MIDI out port 4561

[GUI] - port: 4561 [OK]

[GUI] - OSC MIDI in port 4562

[GUI] - port: 4562 [OK]

[GUI] - Init script completed

[GUI] - using default editor colours

[GUI] - launching Sonic Pi Server:

[GUI] - starting UDP OSC Server on port 4558...

[GUI] - UDP OSC Server ready and listening

[GUI] - Ruby server pid registered: 521

[GUI] - waiting for Sonic Pi Server to boot...

............................................................

[GUI] - Critical error! Could not boot Sonic Pi Server.

[GUI] - stopping UDP OSC Server...

[GUI] - UDP OSC Server no longer listening

Server Errors


/Users/oszt/.sonic-pi/log/server-errors.log


libc++abi.dylib: terminating

/Applications/Sonic Pi.app/app/server/ruby/vendor/sys-proctable-1.1.3/lib/darwin/sys/proctable.rb:163: warning: constant ::Fixnum is deprecated

Server Output


/Users/oszt/.sonic-pi/log/server-output.log


Sonic Pi server booting...

Using protocol: udp

Detecting port numbers...

Send port: 4558

Listen port: 4557

- OK

Scsynth port: 4556

- OK

Scsynth send port: 4556

- OK

OSC cues port: 4559

- OK

Erlang port: 4560

- OK

OSC MIDI out port: 4561

- OK

OSC MIDI in port: 4562

- OK

Booting server...

Booting Sonic Pi

----------------

Boot - Booting on OS X

Boot - Checkout audio rates on OSX:

Boot - Input audio rate: 48000.0

Boot - Output audio rate: 48000.0

Boot - Sample rates match, enable support for inputs...

Boot - Booting with max 16 inputs

Boot - Starting the SuperCollider server...

Boot - /Applications/Sonic Pi.app/app/server/native/scsynth -u 4556 -a 1024 -m 131072 -D 0 -R 0 -l 1 -i 16 -o 16 -U /Applications/Sonic Pi.app/app/server/native/supercollider/plugins/ -b 4096 -B 127.0.0.1

Scsynth Output


/Users/oszt/.sonic-pi/log/scsynth.log


# Starting SuperCollider 2018-12-14 12:36:18

Found 0 LADSPA plugins

Number of Devices: 1

0 : "Mac mini Lautsprecher"

get kAudioDevicePropertyStreamFormat error on input ?ohw

could not initialize audio.

Process Log


/Users/oszt/.sonic-pi/log/processes.log


Clearing pids: []

No pids to clear :-)

Started [521] [-] /Applications/Sonic Pi.app/Contents/MacOS/../../app/server/native/ruby/bin/ruby --enable-frozen-string-literal -E utf-8 /Applications/Sonic Pi.app/Contents/MacOS/../../app/server/ruby/bin/sonic-pi-server.rb -u 4557 4558 4556 4556 4559 4560 4561 4562 [-] /var/folders/m7/s006plh55p9dzvl0w6lqtd0h0000gn/T/sonic-pi-pids/521

@swissmorgy - I’ve commented on https://github.com/samaaron/sonic-pi/issues/1999, not sure if it will help, but it’s something.

Thanks, I answered on Github.

There are quite a lot of differences, which you can see if you go again to the link I gave for the new version and then click on link aa4a8bb on 9 May (top right corner of the listing). This displays the differences that the commit encompasses.
However it doesn’t seem to solve your problem.
Another suggestion you might consider, would be to disable input altogether (which may be appropriate for your Mac Minis).
To do this you want to find the line 340 in the newer version or 332 in the older version, both of which read
"-i", "num_inputs",
and change the one you are using to
"-i", "0",
(Both lines are in the def boot_server_osx definition)
This will then disable audio input to Sonic Pi, but will hopefully let it boot on the Mac Mini.
It would of course prevent the use of commands like live_audio

Thanks for the information on where to find the changes

And thanks for the new idea that I have tried. I have done like you instructed above with the original file scsynthexternal.rb in a new installation of SonicPi (To prevent from effects of having fumbled around too much or with the wrong file)

Line 332 originally reads
“-i”, num_inputs,
(without quotations marks) and I edited it to
“-i”, “0”,
(a zero, not a capital O)

Unfortunately, it still crashes upon booting. Any other ideas?

Sonic Pi Boot Error Report

==================

System Information


  • Sonic Pi version: 3.1.0

  • OS: macOS 10.14

GUI Log


/Users/oszt/.sonic-pi/log/gui.log


[GUI] - Detecting port numbers...

[GUI] - GUI OSC listen port 4558

[GUI] - port: 4558 [OK]

[GUI] - Server OSC listen port 4557

[GUI] - port: 4557 [OK]

[GUI] - Server incoming OSC cues port 4559

[GUI] - port: 4559 [OK]

[GUI] - Scsynth port 4556

[GUI] - port: 4556 [OK]

[GUI] - Server OSC out port 4558

[GUI] - GUI OSC out port 4557

[GUI] - Scsynth send port 4556

[GUI] - Erlang router port 4560

[GUI] - port: 4560 [OK]

[GUI] - OSC MIDI out port 4561

[GUI] - port: 4561 [OK]

[GUI] - OSC MIDI in port 4562

[GUI] - port: 4562 [OK]

[GUI] - Init script completed

[GUI] - using default editor colours

[GUI] - launching Sonic Pi Server:

[GUI] - starting UDP OSC Server on port 4558...

[GUI] - UDP OSC Server ready and listening

[GUI] - Ruby server pid registered: 485

[GUI] - waiting for Sonic Pi Server to boot...

............................................................

[GUI] - Critical error! Could not boot Sonic Pi Server.

[GUI] - stopping UDP OSC Server...

Server Errors


/Users/oszt/.sonic-pi/log/server-errors.log


libc++abi.dylib: terminating

/Applications/Sonic Pi.app/app/server/ruby/vendor/sys-proctable-1.1.3/lib/darwin/sys/proctable.rb:163: warning: constant ::Fixnum is deprecated

Server Output


/Users/oszt/.sonic-pi/log/server-output.log


Sonic Pi server booting...

Using protocol: udp

Detecting port numbers...

Send port: 4558

Listen port: 4557

- OK

Scsynth port: 4556

- OK

Scsynth send port: 4556

- OK

OSC cues port: 4559

- OK

Erlang port: 4560

- OK

OSC MIDI out port: 4561

- OK

OSC MIDI in port: 4562

- OK

Booting server...

Booting Sonic Pi

----------------

Boot - Booting on OS X

Boot - Checkout audio rates on OSX:

Boot - Input audio rate: 48000.0

Boot - Output audio rate: 48000.0

Boot - Sample rates match, we may continue to boot...

Boot - Starting the SuperCollider server...

Boot - /Applications/Sonic Pi.app/app/server/native/scsynth -u 4556 -a 1024 -m 131072 -D 0 -R 0 -l 1 -i 0 -o 16 -U /Applications/Sonic Pi.app/app/server/native/supercollider/plugins/ -b 4096 -B 127.0.0.1

Scsynth Output


/Users/oszt/.sonic-pi/log/scsynth.log


# Starting SuperCollider 2018-12-17 09:52:52

Found 0 LADSPA plugins

Number of Devices: 1

0 : "Mac mini Lautsprecher"

get kAudioDevicePropertyStreamFormat error on input ?ohw

could not initialize audio.

Process Log


/Users/oszt/.sonic-pi/log/processes.log


No pids store found here: /var/folders/m7/s006plh55p9dzvl0w6lqtd0h0000gn/T/sonic-pi-pids

Exiting

Creating pids store: /var/folders/m7/s006plh55p9dzvl0w6lqtd0h0000gn/T/sonic-pi-pids

Started [485] [-] /Applications/Sonic Pi.app/Contents/MacOS/../../app/server/native/ruby/bin/ruby --enable-frozen-string-literal -E utf-8 /Applications/Sonic Pi.app/Contents/MacOS/../../app/server/ruby/bin/sonic-pi-server.rb -u 4557 4558 4556 4556 4559 4560 4561 4562 [-] /var/folders/m7/s006plh55p9dzvl0w6lqtd0h0000gn/T/sonic-pi-pids/485