Invite System(Strange Warning)

Hello so yesterday i made a Invite System so you can invite someone the Localscript is in Startergui
and this is the code.

code:

local SocialService = game:GetService("SocialService")
local Player = game.Players.LocalPlayer
game.ReplicatedStorage.InviteEvent.OnClientEvent:Connect(function()
	local success,result = pcall(
		function()
			return SocialService:CanSendGameInviteAsync(Player)
		end
	)
	if result == true then
		SocialService:PromptGameInvite(Player)
	end
end)

Strange warning:

  08:42:28.901  Unhandled Promise rejection:

-- Promise.Error(ExecutionError) --

The Promise at:

CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Thunks.ApiFetchUsersFriends:43
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:15
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:14
CorePackages.Packages._Index.roblox_rodux.rodux.Store:98
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Thunks.FetchUserFriends:20
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:15
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:14
CorePackages.Packages._Index.roblox_rodux.rodux.Store:98
CorePackages.Packages._Index.RoactRodux.RoactRodux.connect:134 function dispatch
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Components.ShareGameContainer:56 function reFetch
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Components.ShareGameContainer:31 function init
CorePackages.Packages._Index.React.React.ReactBaseClasses:250 function __ctor
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberClassComponent.new:741 function constructClassInstance
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberBeginWork.new:1047 function updateClassComponent
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberBeginWork.new:3584 function beginWork
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:254
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1926
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1909
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1852
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:893
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:841
CorePackages.Packages._Index.Scheduler.Scheduler.Scheduler:304
CorePackages.Packages._Index.Scheduler.Scheduler.Scheduler:259
CorePackages.Packages._Index.Scheduler.Scheduler.forks.SchedulerHostConfig.default:82 function doWork
CorePackages.Packages._Index.Scheduler.Scheduler.forks.SchedulerHostConfig.default:104 function performWorkUntilDeadline

...Rejected because it was chained to the following Promise, which encountered an error:


The Promise at:

CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Thunks.ApiFetchUsersFriends:38
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:15
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:14
CorePackages.Packages._Index.roblox_rodux.rodux.Store:98
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Thunks.FetchUserFriends:20
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:15
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:14
CorePackages.Packages._Index.roblox_rodux.rodux.Store:98
CorePackages.Packages._Index.RoactRodux.RoactRodux.connect:134 function dispatch
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Components.ShareGameContainer:56 function reFetch
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Components.ShareGameContainer:31 function init
CorePackages.Packages._Index.React.React.ReactBaseClasses:250 function __ctor
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberClassComponent.new:741 function constructClassInstance
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberBeginWork.new:1047 function updateClassComponent
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberBeginWork.new:3584 function beginWork
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:254
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1926
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1909
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1852
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:893
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:841
CorePackages.Packages._Index.Scheduler.Scheduler.Scheduler:304
CorePackages.Packages._Index.Scheduler.Scheduler.Scheduler:259
CorePackages.Packages._Index.Scheduler.Scheduler.forks.SchedulerHostConfig.default:82 function doWork
CorePackages.Packages._Index.Scheduler.Scheduler.forks.SchedulerHostConfig.default:104 function performWorkUntilDeadline

...Rejected because it was chained to the following Promise, which encountered an error:

CorePackages.AppTempCommon.LuaChat.Utils.getFriendsActiveGamesPlaceIdsFromUsersPresence:13: attempt to index nil with '3421408084'
CorePackages.AppTempCommon.LuaChat.Utils.getFriendsActiveGamesPlaceIdsFromUsersPresence:13
CorePackages.AppTempCommon.LuaApp.Thunks.ApiFetchUsersPresences:18
CorePackages.Packages._Index.Promise.Promise:151 function runExecutor
CorePackages.Packages._Index.Promise.Promise:160

Promise created at:

CorePackages.AppTempCommon.LuaApp.Thunks.ApiFetchUsersPresences:14
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:15
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:14
CorePackages.Packages._Index.roblox_rodux.rodux.Store:98
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Thunks.ApiFetchUsersFriends:42
CorePackages.Packages._Index.Promise.Promise:151 function runExecutor
CorePackages.Packages._Index.Promise.Promise:160


CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Thunks.ApiFetchUsersFriends:43
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:15
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:14
CorePackages.Packages._Index.roblox_rodux.rodux.Store:98
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Thunks.FetchUserFriends:20
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:15
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:14
CorePackages.Packages._Index.roblox_rodux.rodux.Store:98
CorePackages.Packages._Index.RoactRodux.RoactRodux.connect:134 function dispatch
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Components.ShareGameContainer:56 function reFetch
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Components.ShareGameContainer:31 function init
CorePackages.Packages._Index.React.React.ReactBaseClasses:250 function __ctor
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberClassComponent.new:741 function constructClassInstance
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberBeginWork.new:1047 function updateClassComponent
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberBeginWork.new:3584 function beginWork
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:254
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1926
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1909
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1852
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:893
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:841
CorePackages.Packages._Index.Scheduler.Scheduler.Scheduler:304
CorePackages.Packages._Index.Scheduler.Scheduler.Scheduler:259
CorePackages.Packages._Index.Scheduler.Scheduler.forks.SchedulerHostConfig.default:82 function doWork
CorePackages.Packages._Index.Scheduler.Scheduler.forks.SchedulerHostConfig.default:104 function performWorkUntilDeadline
  -  Client - Promise:1299
1 Like

I’ve seen it happen in other games too. There is a problem with this function where an error is unhandled, you should message Bug Support for that. You can’t fix it yourself.

Oh ok thanks how to message bug support?

Simply message @Bug-Support with the correct bug information format, which can be found in #bug-reports:engine-bugs posts. Just copy the correct format, edit the needed things and you’re done.

I can’t create a theme in this catergory

I think that explains it!

This is most likely a problem on Roblox’s side since it’s to do with core components. The only thing I can recommend is using pcall this will help with handling errors.

http://www.lua.org/manual/5.4/manual.html#pdf-pcall

I am using pcall already in this script XD

1 Like