Skip to content

Troubleshooting Issues

SunderB edited this page Jul 13, 2021 · 6 revisions
Contents

Common Issues

All Platforms

Raspberry Pi OS/Raspbian/Linux


Doesn't work? First things to try:

If you encounter an issue with Sonic Pi, it's always a good idea to try these things first:

  1. Make sure you're using the latest version of Sonic Pi.

    ℹ️ You can find the current version in the bottom bar of the UI, or at the top of the GUI log file. See https://sonic-pi.net to find the latest version.

  2. Try restarting Sonic Pi and see if that resolves your issue.

  3. Try restarting your system and see if that resolves your issue.

If those don't work, then see below for a list of suggestions to solve common issues. Hopefully they'll help you resolve your issue. :)

Where to look for clues:

If you have trouble with Sonic Pi, have a look at the logs. You will find the log files in your user home directory in ~/.sonic-pi/log/. Most likely, you will find a helpful error message there.

Common Issues

Here is a list of some potential solutions to a few common problems.

Ports unavailable

It seems like some of the ports that Sonic Pi needs are being used by other processes/programs. This could mean that processes relating to Sonic Pi is open, or other programs are using those ports.

The ports that Sonic Pi uses are ports 4556 to 4562:

  • 4556 - Scsynth port
  • 4556 - Scsynth send port
  • 4557 - GUI -> Server OSC port
  • 4558 - Server -> GUI OSC port
  • 4559 - Server incoming OSC cues port
  • 4560 - Erlang router port
  • 4561 - OSC MIDI out port
  • 4562 - OSC MIDI in port

Suggestions to try to solve this:

  1. Firstly, make sure Sonic Pi or Supercollider aren't already running!

  2. Next, you can try to close other Sonic Pi related processes:

    Note: Be very careful what processes you close, make sure you don’t close any processes that are critical to the system, or processes of another app you're doing some work on.

    If you're on Raspbian, macOS or Linux open the System Monitor; or if you're on Windows open the Task Manager (press Win+r, type 'taskmgr', and press enter)...

    and try closing the following processes:

    • beam.smp
    • Erlang
    • Ruby Interpreter
    • Sonic Pi
    • Sonic Pi Portable Launcher
    • Supercollider
    • scsynth
    • m2o
    • o2m
  3. If that doesn't work, try to find out what processes are using the ports and close those processes (if it's safe to do so):

    Note: Be very careful what processes you close, make sure you don’t close any processes that are critical to the system, or processes of another app you're doing some work on.

    On Raspbian, macOS or Linux:

    • To find the processes that are using the ports, open the Terminal and type lsof -n -i:4556,4557,4558,4559,4560,4561,4562.
    • Check what those processes are (make sure they aren’t important processes that are critical to the system, or processes of another app you're doing work on), then if it’s safe to do so, you can stop those processes by typing kill [Process ID].

    On Windows:

    • Open the Command Prompt (press Win+r, type 'cmd' and press enter) and typing: netstat -a -b -n -o. This will display a list of some processes with the ports they're using. Look through the list to find any processes that are using the ports that Sonic Pi needs.
    • Check what those processes are (make sure they aren’t important processes that are critical to the system, or processes of another app you're doing work on), then if it’s safe to do so, you can stop those processes from the Task Manager, or via. the Command Prompt by typing taskkill /PID [Process ID].

Unable to create [path]/.sonic-pi due to permissions errors

To fix this you can set the SONIC_PI_HOME environment variable to a folder that your user can create files in. Then Sonic Pi will create a .sonic-pi folder in that location.

To set it permanently for the current user:

On Windows:

  • Open the Command Prompt (press Win+r, type 'cmd' and press enter)
  • Enter the command setx SONIC_PI_HOME "path/to/folder" (Replace path/to/folder with a folder that your user can make files & folders in)

On macOS, Linux or Raspbian:

  • Open the terminal
  • Enter the command printf "\nSONIC_PI_HOME=\"path/to/folder\"" >> ~/.bashrc. (Replace path/to/folder with a folder that your user can make files & folders in) (The double >'s, and the \'s are important!!)

Raspberry Pi OS/Raspbian: Critical boot errors

The version of Sonic Pi (v3.1) that is bundled with the Raspberry Pi (and provided in the Raspberry Pi software repository) is outdated, was built outside of the core team's control, and is partially broken.

The best way to get Sonic Pi working on your system is:

  1. Make sure that you have the most recent version of Raspberry Pi OS loaded on your Pi. (See https://www.raspberrypi.org/documentation/raspbian/updating.md for info about updating)
  2. Uninstall the built-in Sonic Pi v3.1
    sudo apt-get remove sonic-pi
  3. Download the latest version from our own website: https://sonic-pi.net
  4. Double click on the downloaded file to install it (and enter the Pi user's account password when prompted)
  5. Reboot your Raspberry Pi

If your issue still isn't resolved, please create a bug report issue on GitHub.

Linux: There is no sound with use_synth :piano

You probably didn't install the SC3 plugins package for SuperCollider on your system. If there is no binary package provided by your distribution, you can install it from source.

Linux: Trouble with JACK

If the GUI complains that "The Sonic Pi server could not be started!", or the message "Loading previous buffer contents. Please wait..." does not disappear from your buffers after startup, the most likely reason is a problem with JACK.

The Linux version of Sonic Pi relies on the JACK audio connection kit for its audio output and it needs to be installed with it. The jackd audio daemon needs to be started in the background and if it isn't running already, the Sonic Pi server will start it for you. If this fails, Sonic Pi never finishes starting up and won't get ready for you.

As a workaround, try this:

  • be sure that you have closed Sonic Pi
  • start jackd manually using the qjackctl GUI
  • once it started, start sonic-pi again

Sonic Pi contributor @rbnpi has described a working configuration to workaround problems starting JACK.

On Linux distributions using PulseAudio, starting JACK may interfere with the applications using sound that were running already, e.g. Firefox will stop playing audio once JACK starts. There is a guide on how to configure JACK with PulseAudio to avoid this.


Still not working?

Don't worry! Sonic Pi has a great community from which you can ask for help and get support.


If you come across any other issues, and want to help others going through them, then feel free to edit this page and add them. :)