discord-rpc-godot: [Issue/Bug]: MacOS SDK Problem
What happened?
I imported and configured your plugin on Windows and everything works fine. Then I switched to Mac and built your plugin from source and then the error appeared. I restarted Godot many times, but it didn’t help. I tried to sign the dylib with codesign, but that didn’t help either.
Version
1.0.1
Godot Version
4.2.1.stable
Exact steps to reproduce this error
- Clone
discord-sdk-godot - Install python 3.11
- Install scons
- Run
python3.11 setup.py - Run
scons - Run
scons target=template_release - Run
python3.11 release.py - Export unzipped archive to project
- Enable plugin in settings
- Restart Godot two times
GDScript
extends Node
func _ready():
DiscordSDK.app_id = 0 # Application ID (Placeholder for security purpose)
DiscordSDK.details = tr("DISCORD_MAIN_MENU_DETAILS")
DiscordSDK.large_image = "game_icon" # Image key from "Art Assets"
DiscordSDK.large_image_text = "Polix Star"
DiscordSDK.small_image = "menu_icon" # Image key from "Art Assets"
DiscordSDK.small_image_text = tr("DISCORD_MAIN_MENU_ICON")
DiscordSDK.start_timestamp = int(Time.get_unix_time_from_system()) # "02:46 elapsed"
# DiscordSDK.end_timestamp = int(Time.get_unix_time_from_system()) + 3600 # +1 hour in unix time / "01:00:00 remaining"
DiscordSDK.refresh() # Always refresh after changing the values!
Godot output
Godot Engine v4.2.1.stable.official (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.
modules/gltf/register_types.cpp:63 - Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
--- Debug adapter server started ---
--- GDScript language server started on port 6005 ---
gdscript://-9223370559033645678.gd:4 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:7 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:50 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:53 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:56 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:59 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:63 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:65 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
gdscript://-9223370559033645678.gd:68 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
Can't open dynamic library: /Users/p5ina/godot_projects/PolixStar/addons/discord-sdk-gd/bin/macos/libdiscord_game_sdk_binding_debug.dylib. Error: dlopen(/Users/p5ina/godot_projects/PolixStar/addons/discord-sdk-gd/bin/macos/libdiscord_game_sdk_binding_debug.dylib, 0x0002): symbol not found in flat namespace '_DiscordCreate'.
core/extension/gdextension.cpp:719 - GDExtension dynamic library not found: /Users/p5ina/godot_projects/PolixStar/addons/discord-sdk-gd/bin/macos/libdiscord_game_sdk_binding_debug.dylib
Failed loading resource: res://addons/discord-sdk-gd/bin/discord-rpc-gd.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
Additional information
No response
Checks
- I tried reinstalling the addon or tried to fix it myself with other methods.
- I tried restarting Discord and Godot completely.
- I did read the documentation https://github.com/vaporvee/discord-sdk-godot/wiki
About this issue
- Original URL
- State: closed
- Created 6 months ago
- Comments: 16 (12 by maintainers)
I sent you a message on Ko-Fi. I’ll give you my discord there too
Reach out to me via DMs. I’ll help take care of this.