#Help with "WebStreamClient is not enabled in RCC" In Luau Execution Session Task

1 messages · Page 1 of 1 (latest)

lunar raft
#

This is my code

import { newAPIKey, newLuauExecutionSessionTask, getUniverseId, getCloudV2Api } from "../modules/utilities/api.js";
import { newGUID } from "../modules/utilities/general.js";
import { newSocket } from "../modules/utilities/websocket.js";
const { placeId } = Object.fromEntries(new URLSearchParams(window.location.search).entries());
const universeId = await getUniverseId(placeId);
const { apikeySecret: apiKey, cloudAuthInfo: { id: apiKeyId } } = await newAPIKey({
    name: newGUID(),
    scopes: [
        {
            scopeType: "universe.place.luau-execution-session",
            targetParts: ["*"],
            operations: ["write", "read"],
        },
    ],
});

const webSocket = newSocket();

const luauExecutionSessionTask = await newLuauExecutionSessionTask(universeId, placeId, apiKey, `
    local HttpService = game:GetService("HttpService")
    local LogService = game:GetService("LogService")

    local webSocket = HttpService:CreateWebStreamClient(Enum.WebStreamClientType.WebSocket, {
        Url = "${webSocket.url}",
    })

    local messageConnection = webSocket.MessageReceived:Connect(function(script)
        loadstring(script)();
    end)

    LogService.MessageOut:Connect(function(message)
        webSocket:Send(message)
    end)

    webSocket.Closed:Wait()
    messageConnection:Disconnect()
`);

window.getresult = () => getCloudV2Api(luauExecutionSessionTask.path, apiKey);

window.socket = webSocket;

And this is result for await getresult() (... is redacted)

{
    "path": "universes/.../places/.../versions/2/luau-execution-sessions/.../tasks/...",
    "createTime": "2025-11-10T15:02:33.409Z",
    "updateTime": "2025-11-10T15:02:34.273Z",
    "user": "...",
    "state": "FAILED",
    "script": "",
    "error": {
        "code": "SCRIPT_ERROR",
        "message": "WebStreamClient is not enabled in RCC"
    },
    "binaryInput": "",
    "enableBinaryOutput": false,
    "binaryOutputUri": ""
}

Pls helpthx🙏

native pebble
#

what is all that

#

roblox ts?

#

cant you use normal stuff

lunar raft
native pebble
#

tf is

lunar raft
#

???

#

Blud

native pebble
#

wrong ss

lunar raft
#

I saw that

native pebble
#

newLuauExecutionSessionTask

#

i accidentally sent ss of lvl 400 acusing me of cheating

lunar raft
#
export async function newLuauExecutionSessionTask(universeId, placeId, apiKey, script) {
    return (await fetch(`https://apis.roblox.com/cloud/v2/universes/${universeId}/places/${placeId}/luau-execution-session-tasks`, {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
            "X-Api-Key": apiKey,
        },
        body: JSON.stringify({ script }),
    })).json();
};
native pebble
lunar raft
#

Lol

native pebble
#

am lowkey lost what you trying to do tho

lunar raft
#

I am trying to use the new WebSocket thing so I can run Luau code from JS

#

But it is saying WebStreamClient is not enabled in RCC

#

Bro basically

native pebble
#

and

#

this is absolutely most confusing and worst attempt i seen

#

i done smth completly diffrent

#

and it works

lunar raft
native pebble
# lunar raft How

    const wss = new WebSocket.Server({ port: 8080 }, () => {
    console.log("WebSocket server running on ws://localhost:8080");
    });

    wss.on("connection", (ws) => {
    console.log("New client connected");

    ws.on("message", (message) => {
        const text  = message.toString('utf-8');
        console.log("Received:", text);
        ws.send(`Server says: ${text}`);
    });

    ws.on("close", () => {
        console.log("Client disconnected");
    });

    ws.send("Welcome client!");
    });

lunar raft
#

Bro

#

But I am trying to make a Luau Script using Luau Execution Session Task that connects to a WebSocket that JS made so they can communicate

native pebble
#
local function sendWebSocketMessage()
        wsClient = HttpService:CreateWebStreamClient(Enum.WebStreamClientType.WebSocket, {
            Url = "ws://localhost:8080"
        })


        local openConn
        openConn = wsClient.Opened:Connect(function(responseStatusCode, headers)
            print("WebSocket opened with code:", responseStatusCode)

            
        end)

        local messageConn
        messageConn = wsClient.MessageReceived:Connect(function(message)
            print("Message received:", message)
        end)


        wsClient.Closed:Wait()
        openConn:Disconnect()
        messageConn:Disconnect()
    end

    -- Wrap in pcall to catch errors
    task.spawn(function()
    local success, err = pcall(sendWebSocketMessage)
    if not success then
        warn("WebSocket failed:", err)
    end        
        
    end)
native pebble
#

exact same thing

lunar raft
#

Except IDK how he does it

native pebble
#

js communicates to roblox

#

and both ways

lunar raft
#

Yes but read the title bro

native pebble
#

mine works

#

so maybe use mine

#

i dont even know the fuck that api is icl

lunar raft
native pebble
#

never knew that exists

#

but why not just

#

use what i gave

#

normal ass websocket

#

studio only

lunar raft
#

But I think the problem is when you make script with that RunService:IsStudio returns false

native pebble
#

what you trying to use this for

lunar raft
#

I don't have Studio

native pebble
#

oh so not studio

#

um

#

yea idfk

lunar raft
#

I am on chromebook

native pebble
#

tbf just make a basic api server

lunar raft
#

But I'm broke

native pebble
native pebble
#

i use python and its extremly easy

lunar raft
#

But I am on chromebook

native pebble
#

so?

#

nothing changes

lunar raft
#

How to self host

#

Besides that will be slow

native pebble
#

you litteraly

lunar raft
#

Instead of using Websockets

native pebble
#

run the code

native pebble
#

on docs it says

lunar raft
#

Lol

native pebble
#

it runs for 5mins max

#

so unless youre spamming it

#

i doubt its good

#

and websockets are even more heavy prob

lunar raft
#

Bruh

#

Maybe I can use Cloudflare

native pebble
#

litteraly just make pythons api server

#
import fastapi
app = fastapi.FastApi()

@app.get("/")
async def newrequest(request:fastapi.Request):
  print("got new!")
#

¯_(ツ)_/¯

lunar raft
#

Bro who uses Python

#

JavaScript is life

native pebble
#

me

#

javascript sucks

lunar raft
#

Dang

#

How

native pebble
#

i hate it

lunar raft
#

Bro the thing you are using right now is made by JavaScript

native pebble
#

yea i had to use it for 1 thing

#

cuz it was js only

lunar raft
#

Python is only good for ChatGPT

#

Oh

native pebble
#

just use py

#

its most basic ass

lunar raft
#

Well what if I want to make this a Chrome Extension

native pebble
#

use js express

#

if youre on node

lunar raft
#

And I don't have money so I can't get Node.js

#

And hypothetically I had no access to Roblox Studio

native pebble
#

??

native pebble
lunar raft
native pebble
#

cuz it costs

lunar raft
#

No I will just upload it to GitHub

native pebble
#

What r you trying to make

#

you got most weirdf excuse ass

lunar raft
#

Roblox Studio in the browser

native pebble
#

quit doing that already

#

youre not making it that good

lunar raft
#

I literally made Luau VM and RBXM decoder

#

But I quit that

native pebble
#

also p sure what you showed is only live server

lunar raft
#

What

native pebble
#

not studio

lunar raft
#

What do you mean

#

What did I show

#

The video?

native pebble
#

i believe the

vestal dustBOT
#

studio** You are now Level 23! **studio

native pebble
#

LuauExecutionSessionTask

#

is only in live servers

#

not studio

lunar raft
native pebble
#

i might be ofc wrong

lunar raft
#

Is there no way to make it like Command bar

#

So it will be like in Studio

native pebble
#

i might be wrong

#

but i doubt theres apis for studio

lunar raft
#

Instead of Api do I keep making it from scratch

native pebble
#
  • again the scripts run for 5mins
#

max

#

so idk what youre cooking

lunar raft
#

Look

#

Here is my codebase

#

Previous one

#

Before I started trying to use api

#

I did not finish it

native pebble
#

am too lazy to read that

#

anyways

#

i heavly doubt you can do that

lunar raft
#

Brah

native pebble
#

unless you like try writing to rblx place file

lunar raft
#

Breh

#

Broh

native pebble
#

which is prob possible

#

theres format which isnt obsfucated

#

but i doubt theres other way without even running studio

lunar raft
#

Rbxlx

native pebble
#

i might be wrong, so sorry if i am

#

but i heavly doubt

lunar raft
#

No there is a way

#

I am just too lazy

#

export async function uploadAsset(file, assetId, universeId, assetType, publish = true) {
    const fileConstructor = file?.constructor;
    if (fileConstructor !== File) throw new Error(`Expected File, got ${fileConstructor?.name}`);

    const isPlace = assetType === "Place";
    const token = await getCSRFToken();

    const form = new FormData();
    form.append("request", JSON.stringify({
        assetType,
        assetId,
        published: publish,
        creationContext: {}
    }));

    form.append("fileContent", file, file.name);

    return (await fetch(`https://apis.roblox.com/assets/user-auth/v1/assets/${assetId}`, {
        method: "PATCH",
        body: form,
        credentials: "include",
        headers: {
            "X-CSRF-Token": token,
            "Roblox-Place-Id": isPlace ? assetId : undefined,
            "Roblox-Universe-Id": universeId
        }
    })).json();
}