Good morning, I am having a frustrating and unique issue. I am using Elm as the renderer in an electron application. Everything works fine on Linux and Windows, but on macOS, I get an error when I try and send an array through a port.
My application is a font viewer called FontFinder I made for my wife to be able to view all of the thousands of fonts on her computer. I ran into this issue when fixing the menu for macOS on branch fix-macos
.
The error occurs at this point:
- main.js [107]: send “ELM-EVENT”
{port: "receiveFonts", args: [...array of fonts]}
to renderer.js - renderer.js [16]: receive event call send for port “receiveFonts” and send
args
- Trying to send an unexpected type of value through port “receiveFonts”:
[object Object]
System:
- Mac mini (Late 2014) running macOS Big Sur 11.1
Software:
- Node 15.5.1
- npm 7.3.0
- Elm 0.19.1
- Electron 11.1.1
Recreate the issue:
- Download the repository
git checkout fix-macos
npm ci
npm start
- After the application starts the error will be in the DevTools window.
Thank you for reading,
I would really appreciate some help with this issue.