[🐞] [Optimizer Error] RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to access memory outside buffer bounds #5565
Labels
COMP: optimizer
STATUS-2: missing info
Incomplete issue/pr template or missing important information
TYPE: bug
Something isn't working
WAITING FOR: user
Further information is requested from the issue / pr opener
Which component is affected?
Qwik Runtime
Describe the bug
RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to access memory outside buffer bounds
at new NodeError (node:internal/errors:393:5)
at boundsError (node:internal/buffer:84:11)
at Buffer.readUInt16LE (node:internal/buffer:243:5)
at Object.validate (/.../node_modules/@builder.io/qwik/optimizer.cjs:123:35)
at finder (/.../node_modules/@builder.io/qwik/optimizer.cjs:2467:38)
at Array.find ()
at detector (/.../node_modules/@builder.io/qwik/optimizer.cjs:2468:17)
at lookup (/.../node_modules/@builder.io/qwik/optimizer.cjs:2471:18)
at getInfoForSrc (/.../node_modules/@builder.io/qwik/optimizer.cjs:2493:20)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_BUFFER_OUT_OF_BOUNDS'
Reproduction
See this stackblitz
https://stackblitz.com/edit/qwik-starter-fqky5z?file=src%2Froot.tsx
Steps to reproduce
Add a tag similar to the one below at root layout:
<script async type="text/javascript" dangerouslySetInnerHTML={` (function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"12345678"};o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,"script","//bat.example.com/bat.js","uetq"); `}></script>System Info
Additional Information
This isn't a critical bug as it only happens locally - since the optimizer only runs in Dev mode. But annoying since this appears on every single page load. especially if the script above was added at root.
The text was updated successfully, but these errors were encountered: