To build my own Electron app that uses the SAFE Network, I studied an example app that is linked to from the ‘How to develop for the SAFE Network’ post on this forum. It took me a few hours of playing around with it to realise that the example does not work fully on macOS. @hunterlester’s https://github.com/hunterlester/safe-app-base is a fantastically simple app that I am sure is beneficial to many beginners.
I have been in communication with him trying to solve the issue but we haven’t made much progress. The issue is that the app never receives the
ipc message back from the
SAFE Browser. The result of this is that you won’t see a print to the console for the
mutableData.newRandomPublic(15001) that is created. I tested the app on Windows last night and it worked straight away, so I am confident this is a macOS only quirk. The app can successfully communicate with the
SAFE Browser and register itself on that end (it shows on the Authenticator page) but it is the
ipc message back to the app that doesn’t work.
So far I have built the app under numerous versions of Node to see if that was the issue, I tested it on everything from
Node 7.9.0 to the very latest version and I still had the same issue. @hunterlester suggested it may be something to do with the macOS equivalent of how Windows registers applications through
Registry Editor. I delved into this a little and discovered that the application was not generating files in (
~/Library/Preferences) like the Maidsafe sample apps do. I tried to improve the
package.json to include proper configuration for
electronPackager to see if this fixed the issue, but alas it did not. It is worth noting too that I am building this with
NODE_ENV=dev for mock routing support. I am using the latest version of macOS and the latest pre-built mock
SAFE Browser 0.8.0
Is there anyone that could lend a hand to figure this issue out? If we cannot get this sorted then the only logical thing to do would be to mark the app as Windows/Linux only until a time when we can solve the issue.