HylianBasement / netbuilder

Abstract and declarative networking library for Roblox
MIT License
3 stars 0 forks source link

Remotes and remote folder not always created, even with `PreGeneration` or provided instance root #10

Closed Agapurnis closed 2 years ago

Agapurnis commented 2 years ago

I'm not quite too sure how to adequately describe reproduction steps, but I had just upgraded from version 0.4.0 thinking a more recent version might have solved this, but unfortunately none of the new additions seemed to fix anything. So I guess the issue has been there for a bit, but I'm only now starting to suffer from it (I'm not too sure why that is).

Debug mode causes nothing to be logged directly, though I will receive an error if I didn't provide a folder and it was left up to create one itself (no error occurs when I provide a folder, just nothing happens)

 19:58:30.410  ReplicatedStorage.rbxts_include.node_modules.rust-classes.out.classes.Option:60: Could not reference root directory.  -  Client - Option:60
  19:58:30.410  Stack Begin  -  Studio
  19:58:30.410  Script 'ReplicatedStorage.rbxts_include.node_modules.rust-classes.out.classes.Option', Line 60 - function expect  -  Studio - Option:60
  19:58:30.410  Script 'ReplicatedStorage.rbxts_include.node_modules.netbuilder.out.Core.RemoteResolver', Line 176 - function Find  -  Studio - RemoteResolver:176
  19:58:30.410  Script 'ReplicatedStorage.rbxts_include.node_modules.netbuilder.out.Communication.ClientDispatcher', Line 56 - function tryFindRemote  -  Studio - ClientDispatcher:56
  19:58:30.410  Script 'ReplicatedStorage.rbxts_include.node_modules.netbuilder.out.Communication.ClientDispatcher', Line 98 - function RawCall  -  Studio - ClientDispatcher:98
  19:58:30.410  Script 'ReplicatedStorage.rbxts_include.node_modules.netbuilder.out.Communication.ClientDispatcher', Line 71 - function Call  -  Studio - ClientDispatcher:71
  19:58:30.410  Script 'ReplicatedStorage.rbxts_include.node_modules.netbuilder.out.Communication.ClientDispatcher', Line 191  -  Studio - ClientDispatcher:191

It happens about 70-80% of the time when testing. A successful run has this in the console, prior to activating any remotes:

  20:05:05.150  DEBUG: [netbuilder] Generating remote instance for Function<CreateItem>.  -  Server - netBuilderDebug:22
  20:05:05.150  DEBUG: [netbuilder] Created "NetBuilderRemotes" directory.  -  Server - netBuilderDebug:22
  20:05:05.151  DEBUG: [netbuilder] Created a RemoteFunction for "CreateItem".  -  Server - netBuilderDebug:22
  20:05:05.151  DEBUG: [netbuilder] Created a RemoteResolver for Function<CreateItem>.  -  Server - netBuilderDebug:22
  20:05:05.151  DEBUG: [netbuilder] Making object tree for Function<CreateItem>.  -  Server - netBuilderDebug:22
  20:05:05.151  DEBUG: [netbuilder] Created "Item" directory.  -  Server - netBuilderDebug:22
  20:05:05.151  DEBUG: [netbuilder] Generating instances from object tree for Function<CreateItem>.  -  Server - netBuilderDebug:22
  20:05:05.152  DEBUG: [netbuilder] A callback was set for ServerFunction<CreateItem>.  -  Server - netBuilderDebug:22
  20:05:05.152  DEBUG: [netbuilder] Created a channel for ServerFunction<CreateItem>.  -  Server - netBuilderDebug:22

Some time ago I had suffered an issue where one or two remotes seemingly didn't pop up (would likely be fixed with pre-generation now), but this one is a bit more intense 😅

If more information is needed, I can try my best to provide it

Agapurnis commented 2 years ago

I found the issue: one of my Flamework services (which sets up the networking) doesn't start 100% of the time, and that's the thing that is responsible. The error messages and lack thereof aren't ideal, but the fault doesn't lie here. Sorry for taking your time! Time to go work on fixing that, haha.