microsoft / FluidFramework

Library for building distributed, real-time collaborative web applications
https://fluidframework.com
MIT License
4.73k stars 532 forks source link

Use @fluidframework/azure-client can not create container and get Error: 0x883 at app.js:125 #19274

Closed LuBu0505 closed 9 months ago

LuBu0505 commented 9 months ago

User Azure Fluid quick start docs, and try to start it in my loca.

quickstart-fluid-relay

Logs

The browser console error:

[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.
bootstrap:24 [HMR] Waiting for update signal from WDS...
app.js:125  Error: 0x883
    at assert (assert.mjs:18:1)
    at new SharedTree (sharedTree.js:28:15)
    at TreeFactory.create (treeFactory.js:27:1)
    at new LocalChannelContext (localChannelContext.js:186:1)
    at RuntimeWithRequestHandler.createChannel (dataStoreRuntime.js:206:1)
    at RootDataObject.createSharedObject (rootDataObject.js:95:1)
    at RootDataObject.create (rootDataObject.js:83:1)
    at createObject (rootDataObject.js:39:1)
    at rootDataObject.js:42:1
    at Array.forEach (<anonymous>)
(anonymous) @ app.js:125
Promise.catch (async)
./src/app.js @ app.js:125
__webpack_require__ @ bootstrap:24
(anonymous) @ startup:6
(anonymous) @ startup:6
index.js:485 [webpack-dev-server] Disconnected!
index.js:485 [webpack-dev-server] Trying to reconnect...

image

The client code I used: const { container } = await client.createContainer(containerSchema); image

nmsimons commented 9 months ago

I believe the issue you encountered is the result of cloning the main-azure branch. Try using git clone -b main https://github.com/microsoft/FluidHelloWorld.git instead. Meanwhile, I will update that branch to resolve this issue for others.

nmsimons commented 9 months ago

Alternatively, if you start from a clean clone of the repo and use Node 14, it should work.

LuBu0505 commented 9 months ago

Thanks @nmsimons , You are right.

when i downgrade nodejs version from ~16 to ~14. the FluidFramework for azure works.
image

and it works in my local. and connect to azure fluid relay server in Mooncake. image

Thanks very much.