Closed Legacy-TacticalGamingInteractive closed 1 month ago
Damn just to check u have updated to newest version of the fivem integrations for snailycad
anything that could help us see why it doing please let us know
Damn just to check u have updated to newest version of the fivem integrations for snailycad
anything that could help us see why it doing please let us know
Indeed I have. Everythings updated.
[ 3503985] [b3095_GTAProce] MainThrd/ Info: Connected to SnailyCAD!
[ 3503985] [b3095_GTAProce] CrBrowserMain/ [`sna-sync-nui`][outgoing]: sna-sync-nui:connected (@sna-sync/nui/index-524ca964.js:14)
[ 3598172] [b3095_GTAProce] CrBrowserMain/ [`sna-sync-nui`][outgoing]: sna-sync-nui:create-911-call (@sna-sync/nui/index-524ca964.js:14)
[ 3598656] [b3095_GTAProce] CrBrowserMain/ [`sna-sync-nui`][incoming]: sna-sync:request-authentication-flow (@sna-sync/nui/index-524ca964.js:55)
[ 3598656] [b3095_GTAProce] CrBrowserMain/ [`sna-sync-nui`][incoming]: sna-sync:request-set-status-flow (@sna-sync/nui/index-524ca964.js:55)
[ 3598656] [b3095_GTAProce] CrBrowserMain/ [`sna-sync-nui`][incoming]: sna-sync:request-call-911-attach-flow (@sna-sync/nui/index-524ca964.js:55)
Its crazy.
Off duty people who have not authenticated with a personal API token yet can see all 911 call notifications.
Off duty people who did authenticate with personal API token cannot see the 911 notifications.
Some on duty people who did authenticate with personal API token can see 911 notifications. Some can't. Wtf.
Now I am now confused
By authenticated I mean they pasted their API token into the system in game. /sn-auth
When I tested this I was able to confirm that:
A user who has authenticated, but was marked as off-duty would not receive the 911 prompt.
A user who was authenticated, but marked as on-duty would receive the 911 prompt.
A user who was not receiving the prompts owing to being off duty, changes to on-duty and is then able to receive the 911 prompts.
I can't say that I personally tested if users got the prompt without being authenticated, as I presumed this was not possible - I can test this shortly but is that the outstanding problem or are you saying you don't get the behaviour above either? @Legacy-TacticalGamingInteractive
Correct, a player must be authenticated (via /sn-auth) and on-duty (via web or /sn-set-status). The scenario's Jack explained are the expected ones
If a user has not set a token at all and simply is on the server they will see the 911s. Thats the biggest issue we have #1. Which is most people. Since most people such as civilians are not even authenticating themselves using the CAD integration commands.
One step at a time.
By the way we have:
Server Artifacts 8450. Game build 3095. OneSync Infiniti. 100+ players on server when tested.
Are you sure you're on the latest version? This is simply not possible on the latest version since it does a backend check.
Yes we installed all integrations including sync and updated CAD to latest version last night too.
I wish I had some prints or something to debug with but nothing is showing. I can see about adding some prints to help debug later today?
Its strange.
I did not clear server cache. Maybe it requires that?
On Thu, Jun 13, 2024, 6:25 AM Casper Iversen @.***> wrote:
Are you sure you're on the latest version? This is simply not possible on the latest version since it does a backend check.
— Reply to this email directly, view it on GitHub https://github.com/SnailyCAD/fivem-integrations/issues/112#issuecomment-2165247735, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGALDB6VKZWMGATR4XETVWTZHFXR5AVCNFSM6AAAAABJHIV3EGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRVGI2DONZTGU . You are receiving this because you were mentioned.Message ID: @.***>
I'll create a new release that prints out some debugging information in the F8 console. Will only be in about 4h from now though.
@Legacy-TacticalGamingInteractive 0.14.1 is out now which has a debug print with the version. It will get logged when the sna-sync resource is initialized (on resource start/client player spawned)
Nothing new is really logging. Here are my findings:
911 Incoming: Player who IS authenticated in CAD with the User API connected and IS OFF DUTY in Dashboard. (does not show 911 notification to attach to the call - works as expected now)
911 Incoming: Player who IS authenticated in CAD with the User API connected and IS ON DUTY in Dashboard. (shows 911 notification to attach to the call - works as expected now)
911 Incoming: Player who is NOT authenticated in CAD. Meaning they have never done the User API connect. (doesn't work as expected)
Solution Needed:
We need to make some logic where if someone is not authenticated in Snaily - then they will not be shown the 911 notification.
Most civilians and even new cops won't be authenticated. They are not doing the whole /sn-auth
stuff.
By default it seems to be that anybody who isn't authenticated is treated as being on duty lol.
This is the notification I am referring to by the way:
I am getting the exact same issue. A player who isn't authenticated, off-duty, and is a cop is getting 911 calls. Now he is authenticated and he is not getting 911 calls off-duty.
I was able to validate this:
This also happens with panic button triggers alike.
It would seem the events ServerEvents.Incoming911Call
and ServerEvents.PanicButtonOn
are not hitting the clause on line 21 and 46 in validate-events.ts, is the data somehow cached or accessible without authentication?
Would be very weird if any data is cached...
I'll add an explicit property that it does not cache any data. Ps @Georgie15, are you getting any additional logs?
Would be very weird if any data is cached...
I'll add an explicit property that it does not cache any data. Ps @Georgie15, are you getting any additional logs?
In this scenario, we'd expect even data to not return - is it possible we're not capturing for that instance? As tested, when we don't have data.unit this works as expected, its only when we would not have data at all that it seems to still send notification.
EDIT: From a logic perspective is it not easier to invert the clause, and only send the network event for the notification if data.unit is returned? Would capture all other scenarios and avoid sending notification.
911 Incoming: Player who is NOT authenticated in CAD. Meaning they have never done the User API connect.
@Legacy-TacticalGamingInteractive The player does receive the notification?
Ah, I found the bug. Working on it!
All should be fixed in the latest version of SnailyCAD and 0.14.2 of fivem-integrations. Closing this one now!
Unfortunately this seems to still be broken :(