Export game for Mac from Mac does not work

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Elio

Hello everyone!
I created a game in Godot and exported it for macOS from a Mac (10.15.1), but when I open the game it closes. This is the error in the console when I export it:

Exporting to /Users/elia/Library/Caches/Godot/Cuby's Adventure.app
Creating /Users/elia/Library/Caches/Godot/Cuby's Adventure.app/Contents/MacOS
Creating /Users/elia/Library/Caches/Godot/Cuby's Adventure.app/Contents/Frameworks
Creating /Users/elia/Library/Caches/Godot/Cuby's Adventure.app/Contents/Resources
core/image.cpp:1746 - Loaded resource as image file, this will not work on export: 'res://Sprite/cubofermo.png'. Instead, import the image file as an Image resource and load it normally as a resource.
ADDING: Contents/Resources/icon.icns size: 15943
ADDING: Contents/Info.plist size: 1146
ADDING: Contents/PkgInfo size: 9
ADDING: Contents/MacOS/Cuby's Adventure size: 40666104
codesign: error: The specified item could not be found in the keychain.

codesign: error: The specified item could not be found in the keychain.

codesign: error: The specified item could not be found in the keychain.

codesign: error: The specified item could not be found in the keychain.

platform/osx/os_osx.mm:2714 - trashItemAtURL error: The file CubyPlatformer_4.dmg doesnt exist.
hdiutil returned: created: /Volumes/HD750/PROGRAMMING/GODOT/CubyPlatformer/Builds/CubyPlatformer_4.dmg

Thanks

:bust_in_silhouette: Reply From: GameVisitor

Your issue is indicated here:

core/image.cpp:1746 - Loaded resource as image file, this will not work on export: 'res://Sprite/cubofermo.png'. 
Instead, import the image file as an Image resource and load it normally as a resource.

The solution is described here

snippet of my code:

 ...
#img.load() does NOT work on res:// anymore !!!
#https://github.com/godotengine/godot/issues/18638
var itex = ImageTexture.new()
itex = load( myTextureStr )
material.albedo_texture = itex
...
:bust_in_silhouette: Reply From: CharlesMerriam

The comment by GameVisitor is correct, though the solution given is not complete.

One cause is the project including icon.png as a default setting. For running on the web, you should convert this to icon.icns. You can use this free converter page to do that.

Once you have the converted icon, go to Project/Project Settings/Application/Config/icons and select your new icon.icns. This doc page may help.