[Issue/Bug]: MacOS SDK Problem #49

Closed
opened 2023-12-20 03:40:45 +00:00 by P5ina · 16 comments
P5ina commented 2023-12-20 03:40:45 +00:00 (Migrated from github.com)

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

### 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 ```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 ```shell 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 - [X] I tried reinstalling the addon or tried to fix it myself with other methods. - [X] I tried restarting Discord and Godot completely. - [x] I did read the documentation https://github.com/vaporvee/discord-sdk-godot/wiki

you didn't sign the binding. also i did wrote it down in the docs https://github.com/vaporvee/discord-sdk-godot/wiki/Building#macos-support

you didn't sign the binding. also i did wrote it down in the docs https://github.com/vaporvee/discord-sdk-godot/wiki/Building#macos-support
P5ina commented 2023-12-20 11:18:09 +00:00 (Migrated from github.com)

No, I tried signing the bindings with codesign, but still nothing changed. (I didn't write about this in the reproduction steps because it didn't change anything). Maybe I'm doing this wrong?

No, I tried signing the bindings with codesign, but still nothing changed. (I didn't write about this in the reproduction steps because it didn't change anything). Maybe I'm doing this wrong?
P5ina commented 2023-12-20 11:41:15 +00:00 (Migrated from github.com)

I'm doing it this way
CleanShot 2023-12-20 at 14 40 08@2x

I'm doing it this way ![CleanShot 2023-12-20 at 14 40 08@2x](https://github.com/vaporvee/discord-sdk-godot/assets/44378225/c010b78e-983d-4356-8e90-35340a9474cb)

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

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

and did you look if the file names are matching with the ones in the .gdextension file?

and did you look if the file names are matching with the ones in the .gdextension file?
EddieDover commented 2023-12-20 15:06:06 +00:00 (Migrated from github.com)

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.

> 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.

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.

Do you have discord? I didn't find where github Dms are

> > 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. Do you have discord? I didn't find where github Dms are
EddieDover commented 2023-12-20 15:10:33 +00:00 (Migrated from github.com)

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

I sent you a message on Ko-Fi. I'll give you my discord there too
EddieDover commented 2023-12-20 16:02:28 +00:00 (Migrated from github.com)

@P5ina Would you please reach out to me on Discord so we can work through this issue together? I'd like to get the repo here in a place where we can have Mac builds be part of the normal production pipeline.

@P5ina Would you please reach out to me on Discord so we can work through this issue together? I'd like to get the repo here in a place where we can have Mac builds be part of the normal production pipeline.
P5ina commented 2023-12-20 16:07:21 +00:00 (Migrated from github.com)

@EddieDover Hello, your link is expired, I can't join

@EddieDover Hello, your link is expired, I can't join
P5ina commented 2023-12-20 16:09:26 +00:00 (Migrated from github.com)

and did you look if the file names are matching with the ones in the .gdextension file?

Yep, all file names are correct

> and did you look if the file names are matching with the ones in the .gdextension file? Yep, all file names are correct
EddieDover commented 2023-12-20 16:12:20 +00:00 (Migrated from github.com)

@EddieDover Hello, your link is expired, I can't join
https://discord.gg/D69PnMNUF8

Sorry about that

> @EddieDover Hello, your link is expired, I can't join https://discord.gg/D69PnMNUF8 Sorry about that

whoops i may have clicked on it

whoops i may have clicked on it
EddieDover commented 2023-12-20 16:17:23 +00:00 (Migrated from github.com)

whoops i may have clicked on it

You did. It's fine :D

> whoops i may have clicked on it You did. It's fine :D

current state: we get it compiled on intel under circumstances (and when its signed) but m1 is still not working

current state: we get it compiled on intel under circumstances (and when its signed) but m1 is still not working

will be working on macos in the next release

will be working on macos in the next release
Sign in to join this conversation.
No description provided.