An error occurred while writing the image

Hello, I got an error: " An error occurred while writing the image"
I’m using macOS Catalina, raspberry pi 4 4gb

Sat Oct 3 20:56:03 2020 OSMC Installer running on Mac OS X
Sat Oct 3 20:56:03 2020 Detected locale as en_US
Sat Oct 3 20:56:03 2020 Attempting to load translation for locale en_US
Sat Oct 3 20:56:03 2020 Could not load translation!
Sat Oct 3 20:56:03 2020 Resolving a mirror
Sat Oct 3 20:56:04 2020 Resolved mirror to http://ftp.acc.umu.se/mirror/osmc.tv/osmc/download/
Sat Oct 3 20:56:04 2020 Enumerating supported devices
Sat Oct 3 20:56:04 2020 Added the following devices
Sat Oct 3 20:56:04 2020 Vero 4K / 4K+
Sat Oct 3 20:56:04 2020 Vero 2
Sat Oct 3 20:56:04 2020 Vero
Sat Oct 3 20:56:04 2020 Raspberry Pi 1 / Zero
Sat Oct 3 20:56:04 2020 Raspberry Pi 2 / 3
Sat Oct 3 20:56:04 2020 Apple TV
Sat Oct 3 20:56:04 2020 Checking for updates
Sat Oct 3 20:56:04 2020 Checking for updates by downloading http://ftp.acc.umu.se/mirror/osmc.tv/osmc/download//installers/latest_mac
Sat Oct 3 20:56:04 2020 Acquired mirror file
Sat Oct 3 20:56:04 2020 No new update is available
Sat Oct 3 20:56:08 2020 The user has selected English as their language
Sat Oct 3 20:56:08 2020 The user has selected Raspberry Pi 2 / 3 as their device
Sat Oct 3 20:56:08 2020 Attempting to download device versions file http://ftp.acc.umu.se/mirror/osmc.tv/osmc/download/installers/versions_RBP2
Sat Oct 3 20:56:08 2020 Found a build called  2020.06-1
Sat Oct 3 20:56:08 2020 Found a build called  2020.03-1
Sat Oct 3 20:56:08 2020 Found a build called  2020.01-1
Sat Oct 3 20:56:08 2020 Found a build called  2019.11-1
Sat Oct 3 20:56:08 2020 Found a build called  2019.10-1
Sat Oct 3 20:56:08 2020 Found a build called  2019.07-1
Sat Oct 3 20:56:08 2020 Found a build called  2019.06-1
Sat Oct 3 20:56:08 2020 Found a build called  2019.05-1
Sat Oct 3 20:56:08 2020 Found a build called  2019.04-1
Sat Oct 3 20:56:08 2020 Found a build called  2018.12-1
Sat Oct 3 20:56:08 2020 Found a build called  2018.10-1
Sat Oct 3 20:56:08 2020 Found a build called  2018.08-1
Sat Oct 3 20:56:08 2020 Found a build called  2018.07-1
Sat Oct 3 20:56:18 2020 The user has selected a local image for Raspberry Pi 2 / 3 with file location: file:///Users/omeln/OSMC_TGT_rbp2_20200607.img.gz
Sat Oct 3 20:56:18 2020 Disabling internal install for device Raspberry Pi 2 / 3 as it does not support it
Sat Oct 3 20:56:19 2020 SD installation selected
Sat Oct 3 20:56:24 2020 Enumerating imageable devices for OSX
Sat Oct 3 20:56:24 2020 New disk device entry created with entry point /dev/rdisk0, 500.3 GB free space and label 
Sat Oct 3 20:56:24 2020 =================================================
Sat Oct 3 20:56:24 2020 Starting to parse /dev/rdisk0 for additional info

Sat Oct 3 20:56:24 2020 MediaName-Line: Device / Media Name: APPLE SSD SM0512G
Sat Oct 3 20:56:24 2020 Protocol-Line: Protocol: PCI
Sat Oct 3 20:56:24 2020 Determined PCI as protocol for /dev/rdisk0
Sat Oct 3 20:56:24 2020 Decided to be a DMG: no
Sat Oct 3 20:56:24 2020 R/O-Line: Read-Only Media: No
Sat Oct 3 20:56:24 2020 parsed/split/simplified readOnly line would have been: No
Sat Oct 3 20:56:24 2020 Determined No as readOnlyMedia for /dev/rdisk0
Sat Oct 3 20:56:24 2020 Decided to be r/o: no
Sat Oct 3 20:56:24 2020 Ejectable-Line: Removable Media: Fixed
Sat Oct 3 20:56:24 2020 Determined Fixed as ejactableProperty for /dev/rdisk0
Sat Oct 3 20:56:24 2020 Decided that /dev/rdisk0 is not writable to us
Sat Oct 3 20:56:24 2020 Parsed device as NON-writable. NOT Appending.
Sat Oct 3 20:56:24 2020 

Sat Oct 3 20:56:24 2020 Finished parsing additional info for /dev/rdisk0
Sat Oct 3 20:56:24 2020 =================================================

Sat Oct 3 20:56:24 2020 New disk device entry created with entry point /dev/rd, Container Scheme free space and label 
Sat Oct 3 20:56:24 2020 =================================================
Sat Oct 3 20:56:24 2020 Starting to parse /dev/rd for additional info

Sat Oct 3 20:56:24 2020 Decided that /dev/rd is not writable to us
Sat Oct 3 20:56:24 2020 Parsed device as NON-writable. NOT Appending.
Sat Oct 3 20:56:24 2020 

Sat Oct 3 20:56:24 2020 Finished parsing additional info for /dev/rd
Sat Oct 3 20:56:24 2020 =================================================

Sat Oct 3 20:56:24 2020 New disk device entry created with entry point /dev/rdisk4, 31.9 GB free space and label 
Sat Oct 3 20:56:24 2020 =================================================
Sat Oct 3 20:56:24 2020 Starting to parse /dev/rdisk4 for additional info

Sat Oct 3 20:56:24 2020 MediaName-Line: Device / Media Name: Storage Device
Sat Oct 3 20:56:24 2020 Protocol-Line: Protocol: USB
Sat Oct 3 20:56:24 2020 Determined USB as protocol for /dev/rdisk4
Sat Oct 3 20:56:24 2020 Decided to be a DMG: no
Sat Oct 3 20:56:24 2020 R/O-Line: Read-Only Media: No
Sat Oct 3 20:56:24 2020 parsed/split/simplified readOnly line would have been: No
Sat Oct 3 20:56:24 2020 Determined No as readOnlyMedia for /dev/rdisk4
Sat Oct 3 20:56:24 2020 Decided to be r/o: no
Sat Oct 3 20:56:24 2020 Ejectable-Line: Removable Media: Removable
Sat Oct 3 20:56:24 2020 Determined Removable as ejactableProperty for /dev/rdisk4
Sat Oct 3 20:56:24 2020 isEjectable: yes; isDmg: no; isReadOnly: no
Sat Oct 3 20:56:24 2020 Parsed device as writable. Appending.
Sat Oct 3 20:56:24 2020 

Sat Oct 3 20:56:24 2020 Finished parsing additional info for /dev/rdisk4
Sat Oct 3 20:56:24 2020 =================================================

Sat Oct 3 20:56:26 2020 Device selected: 2	/dev/rdisk4	31.9 GB	Storage Device
Sat Oct 3 20:56:28 2020 EULA has been accepted
Sat Oct 3 20:56:29 2020 Extracting /Users/omeln/OSMC_TGT_rbp2_20200607.img.gz
Sat Oct 3 20:56:29 2020 Finished extraction. Going to write image
Sat Oct 3 20:56:29 2020 Requesting confirmation from user
Sat Oct 3 20:56:31 2020 User confirmed
Sat Oct 3 20:56:31 2020 going to start osa
Sat Oct 3 20:56:31 2020 pasting admin script to process do shell script "dd if=/Users/omeln/OSMC_TGT_rbp2_20200607.img of=/dev/rdisk4 bs=1m conv=sync && sync" with administrator privileges
Sat Oct 3 20:56:31 2020 waiting for finish
Sat Oct 3 20:56:33 2020 osa claims to be done...collect output and verify
Sat Oct 3 20:56:33 2020 Imaging failed!
Sat Oct 3 20:56:33 2020 Messages are:
Sat Oct 3 20:56:33 2020 	 stdout: 
Sat Oct 3 20:56:33 2020 	 stderr: 0:132: execution error: shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
dd: /dev/rdisk4: Operation not permitted (1)

Then I use “dd if=/Users/omeln/OSMC_TGT_rbp2_20200607.img of=/dev/rdisk4 bs=1m conv=sync && sync” and after that my raspberry pi 4 stuck with rainbow picture.

The OSMC installer is not currently working on the newest OS X. Instructions on how to use another app to burn the image is found in other threads, but then you will still have the issue that RPi 4 is not currently supported with OSMC. If you want to run Kodi on a RPi 4 currently you can use LibreElec or Raspbian/Raspberry Pi OS.