[Bug/Crash]: Failed to add Autoload when enabling addon #18

Closed
opened 2023-05-12 22:14:13 +00:00 by Koanyaku · 8 comments
Koanyaku commented 2023-05-12 22:14:13 +00:00 (Migrated from github.com)

What happened?

I am using version 1.4 of the addon and created a new project for testing.

I added the files, restarted the project. The addon shows up normally:

bug2

However, enabling the addon caused this message to appear:

bug3

My file structure looks like this:

bug1

Also, whenever I open the project with the addon enabled, this error message pops up in the console:

Parent node is busy setting up children, `add_child()` failed. Consider using `add_child.call_deferred(child)` instead.
scene/main/window.cpp:1459 - Condition "!is_inside_tree()" is true.

The only way to get it working is to run Discord_Activity.coreupdate() in the process function. After doing that, it updates the activity as expected.

Also tell us, what did you expect to happen?

I expected that when I enabled the addon, the autoload would get added without any problems.

Version

Custom build

Godot Version

v4.0.2.stable.official [7a0977ce2]

GDScript

# main scene file

extends Control

func _ready():
	Discord_Activity.app_id = <my id>
	Discord_Activity.details = "test details"
	Discord_Activity.start_timestamp = int(Time.get_unix_time_from_system())
	Discord_Activity.refresh()

func _process(delta):
	Discord_Activity.coreupdate()

Additional information

Please add 1.4 as a selectable version in the bug reporter.

Checks

  • I tried reinstalling the addon in a new project.
### What happened? I am using version 1.4 of the addon and created a new project for testing. I added the files, restarted the project. The addon shows up normally: ![bug2](https://github.com/vaporvee/discord-sdk-godot/assets/83396111/784830c9-5445-400a-8d09-e7cb88b67d02) However, enabling the addon caused this message to appear: ![bug3](https://github.com/vaporvee/discord-sdk-godot/assets/83396111/b055db29-cec5-45d3-90a2-668c0c9d165e) My file structure looks like this: ![bug1](https://github.com/vaporvee/discord-sdk-godot/assets/83396111/e40e9617-c203-449d-97db-2af9674bdff8) Also, whenever I open the project with the addon enabled, this error message pops up in the console: ``` Parent node is busy setting up children, `add_child()` failed. Consider using `add_child.call_deferred(child)` instead. scene/main/window.cpp:1459 - Condition "!is_inside_tree()" is true. ``` The only way to get it working is to run `Discord_Activity.coreupdate()` in the process function. After doing that, it updates the activity as expected. ### Also tell us, what did you expect to happen? I expected that when I enabled the addon, the autoload would get added without any problems. ### Version Custom build ### Godot Version v4.0.2.stable.official [7a0977ce2] ### GDScript ```gdscript # main scene file extends Control func _ready(): Discord_Activity.app_id = <my id> Discord_Activity.details = "test details" Discord_Activity.start_timestamp = int(Time.get_unix_time_from_system()) Discord_Activity.refresh() func _process(delta): Discord_Activity.coreupdate() ``` ### Additional information Please add 1.4 as a selectable version in the bug reporter. ### Checks - [x] I tried reinstalling the addon in a new project.

yeah sorry i'm really stressed rn and shouldn't push updates that quick i fix it but compiling for both platforms takes some time

yeah sorry i'm really stressed rn and shouldn't push updates that quick i fix it but compiling for both platforms takes some time

sorry idk why i closed it lol

sorry idk why i closed it lol

why does it always get closed okay i'm uploading tell me if it worked

why does it always get closed okay i'm uploading tell me if it worked
Koanyaku commented 2023-05-12 23:43:20 +00:00 (Migrated from github.com)

oh, sorry, i'm going to sleep right now so I'll test it tomorrow

oh, sorry, i'm going to sleep right now so I'll test it tomorrow

no problem but it should fix both the error message and all the other stuff lol

no problem but it should fix both the error message and all the other stuff lol
Koanyaku commented 2023-05-12 23:48:06 +00:00 (Migrated from github.com)

ok. just a little nitpick, in the release section for 1.5 it says changelog 1.4

ok. just a little nitpick, in the release section for 1.5 it says changelog 1.4

lmao yeah fixed now... we have 2am in germany i should go to sleep.

lmao yeah fixed now... we have 2am in germany i should go to sleep.
Koanyaku commented 2023-05-13 10:28:58 +00:00 (Migrated from github.com)

thanks! the autoload gets added correctly and everything else works fine.

thanks! the autoload gets added correctly and everything else works fine.
Sign in to join this conversation.
No description provided.