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

  1. Clone discord-sdk-godot
  2. Install python 3.11
  3. Install scons
  4. Run python3.11 setup.py
  5. Run scons
  6. Run scons target=template_release
  7. Run python3.11 release.py
  8. Export unzipped archive to project
  9. Enable plugin in settings
  10. 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

About this issue

  • Original URL
  • State: closed
  • Created 6 months ago
  • Comments: 16 (12 by maintainers)

Most upvoted comments

I sent you a message on Ko-Fi. I’ll give you my discord there too

i never did it because i hadn’t had the money for this. so sadly i can’t help you with this…

Reach out to me via DMs. I’ll help take care of this.