RemoteFunction.OnServerInvoke callback never gets recieved

I’m attempting to make a Trello-based blacklist appeal system for a group, but I’ve run into a problem that wasn’t happening before. The .OnServerInvoke callback never runs the function, or never picks up the invoke.
This is the RemoteFunction handlers:

checkBlacklist.OnServerInvoke = function(player)
	if(checkForCard("5eaf4ffca11e1c2a52440572",player.Name) or checkForCard("5eaf5000d2587485cd9a1ae2",player.Name)) then
		return true
	else
		return false
	end
end

checkPermBlacklist.OnServerInvoke = function(player)
	if(checkForAppeal("5eaf5001ad9d674db27c13f8",player.Name) or checkForAppeal("5eaf5000d2587485cd9a1ae2",player.Name)) then
		return true
	else
		return false
	end
end

checkAppeal.OnServerInvoke = function(player)
	if(checkForAppeal("5eaf5001ad9d674db27c13f8",player.Name)) then
		return true
	else
		return false
	end
end

I tried putting a print or something at the top, and it never printed out when I invoked it. The localscript is here:

print("Retrieving data from the Trello...")
local isBlacklisted = game.ReplicatedStorage.CheckIfBlacklistExists:InvokeServer() print("Blacklist didn't yield.")
local isPermBlacklisted = game.ReplicatedStorage.CheckIfNoAppealBlacklistExists:InvokeServer(); print("Perm didn't yield.")
local appealSent = game.ReplicatedStorage.CheckIfAppealExists:InvokeServer(); print("Appeal didn't yield.")
print("Appealed: "..appealSent)
print("No appeal allowed: "..isPermBlacklisted)
print("Blacklisted: "..isBlacklisted)

if(appealSent) then
	script.Parent.Status.Text = "Appeal Sent"
	script.Parent.Description.Text = "Your appeal has already been sent and will be reviewed by our executives shortly!"
else
	if(isBlacklisted and not isPermBlacklisted) then
		script.Parent.Status.Text = "You're Blacklisted"
		script.Parent.Description.Text = "You're blacklisted, but don't have too much fear! You can still appeal!"
		script.Parent.AppealButton.Visible = true
	else
		if(isPermBlacklisted) then
			script.Parent.Status.Text = "You're Blacklisted"
			script.Parent.Description.Text = "You're blacklisted, but there's no appeal allowed for you!"
		else
			script.Parent.Status.Text = "Not Blacklisted"
			script.Parent.Description.Text = "It doesn't look like you're currently blacklisted from Zackslater's Foundation!"
		end
	end
end

If anybody could help, that’d be awesome!

Does anything within the script that defines the invoke handlers yield? It could be that the client is invoking the server before the handlers are registered.

Actually, It seems so. I tried putting some prints in the invoke handler, and it never got to the second one.

print("Remote handler setting up...")

local checkAppeal = game.ReplicatedStorage:WaitForChild("CheckIfAppealExists")

local checkBlacklist = game.ReplicatedStorage:WaitForChild("CheckIfBlacklistExists")

local checkPermBlacklist = game.ReplicatedStorage:WaitForChild("CheckIfNoAppealBlacklistExists")

local trelloAPI = require(game.ServerScriptService.TrelloAPI)

print("Set up!") -- Never got to this one.

I also tried it without :WaitForChild(), same result.

If the TrelloAPI module is performing an HTTP request or yielding for something then you’ll have to refractor your code so that the client knows when it can make those calls. One way to do this would be to create your RemoteFunctions within the server script and parent them once the TrelloAPI is done loading so the client can use WaitForChild and call them once they actually exist.

EDIT: Any idea why the module is yielding? Is the yielding happening forever or just for a long time?

It seems to be happening forever.

Which trello API are you using? It could be the module or you might be using it incorrectly.

EDIT: If you can post the module or link me to the source I can probably take a look and see what might be causing the issue.

I believe I’m using the original TrelloAPI.
https://www.roblox.com/library/4983677398/TrelloAPI
https://www.roblox.com/library//214265621

I’ve found the error. I didn’t assign the token, somehow the StringValue that should be inside the TrelloAPI was destroyed. But it also didn’t handle the token being nil, I’m not sure why. It’s in the module.