splinetool / react-spline

React component for Spline scenes.
MIT License
1.17k stars 58 forks source link

Error: Data read, but end of buffer not reached. (React Spline gives error on nextJs Project) #147

Open spoiledwit opened 1 year ago

spoiledwit commented 1 year ago

I tried to load the model that's one from the spline library with a very little customisation as follows:

<Spline onLoad={onLoad} scene="https://prod.spline.design/bCPrUTho0jQX7BKI/scene.splinecode" />

with the onLoad function as:

function onLoad(spline:any) { spline.setZoom(0.67); }

But got an error as follows:

Unhandled Runtime Error Error: Data read, but end of buffer not reached

Call Stack Cg node_modules/@splinetool/runtime/build/runtime.js (3138:247250) Cl.unpack node_modules/@splinetool/runtime/build/runtime.js (3138:246402) Object.t [as deserialize] node_modules/@splinetool/runtime/build/runtime.js (3138:267522) NO node_modules/@splinetool/runtime/build/runtime.js (6303:3685) zO.start node_modules/@splinetool/runtime/build/runtime.js (6303:15386) zO.load node_modules/@splinetool/runtime/build/runtime.js (6303:15305) async x node_modules/@splinetool/react-spline/dist/react-spline.js (839:0)

ahmadgaz commented 1 year ago

Also experiencing this issue

ahmadgaz commented 1 year ago

I turned off the loading spinner on the model and it started working

victoramelinckx commented 8 months ago

Also experiencing this issue, any solution?

kevinfales commented 8 months ago

Also came across this, but only after I added a fairly heavy video to my scene. Compressed it from ~20mb down to 2mb and no more error.

aaronvg commented 7 months ago

I'm also experiencing this with a 200kb design.

benjiroooo commented 7 months ago

I'm also experiencing this problem, I didn't modify any of the settings for the link.

benjiroooo commented 7 months ago

I just figured it out! You have to go to Viewer instead of Public URL and copy that link. Hope this helps. @spoiledwit @victoramelinckx @aaronvg @kevinfales

tushgaurav commented 3 months ago

Also experiencing the same issue!