Я получаю эту ошибку notFound, когда обновляю новый актив в менеджере активов Aframe, встроенном в React.
Компонент менеджера активов построен следующим образом:
export class Assets extends PureComponent{
render(){
const {
hiResPanoUrl,
onHiResPanoLoaded,
sceneThumbnails = [],
guideThumbnails = [],
videos = [],
sounds = [],
models = [],
panos = [],
images = [],
} = this.props
return (
<a-assets>
{createHighResolutionPanoAsset(hiResPanoUrl, onHiResPanoLoaded)}
{createPanoAssets(panos)}
{createSceneThumbnailsAssets(sceneThumbnails)}
{createGuideThumbnailsAssets(guideThumbnails)}
{createAudioAssets(sounds)}
{createVideoAssets(videos)}
{createModelAssets(models)}
{createImageAssets(images)}
</a-assets>
)
}
Извуковые ресурсы создаются следующим образом:
function createAudioAssets(sounds) {
return sounds.map(sound => {
const {url, id, preload} = sound
if(!preload)
return <audio key={id} {...{id}} src={url} crossOrigin='anonymous'/>
return <audio key={id} {...{id}} src={url} crossOrigin='anonymous' preload="auto"/>
})
}
Это все работает нормально, пока не получится новый звук, тогда я получаю эту ошибку:
react-dom.development.js:8613 Uncaught DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
at insertBefore (https://localhost:3000/static/js/bundle.js:284772:18)
at commitPlacement (https://localhost:3000/static/js/bundle.js:290869:11)
at commitAllHostEffects (https://localhost:3000/static/js/bundle.js:291546:11)
at HTMLUnknownElement.callCallback (https://localhost:3000/static/js/bundle.js:276259:14)
at Object.invokeGuardedCallbackDev (https://localhost:3000/static/js/bundle.js:276297:16)
at invokeGuardedCallback (https://localhost:3000/static/js/bundle.js:276346:29)
at commitRoot (https://localhost:3000/static/js/bundle.js:291728:7)
at completeRoot (https://localhost:3000/static/js/bundle.js:292778:34)
at performWorkOnRoot (https://localhost:3000/static/js/bundle.js:292723:9)
at performWork (https://localhost:3000/static/js/bundle.js:292642:7)
at performSyncWork (https://localhost:3000/static/js/bundle.js:292614:3)
at requestWork (https://localhost:3000/static/js/bundle.js:292514:5)
at scheduleWork$1 (https://localhost:3000/static/js/bundle.js:292378:11)
at Object.enqueueSetState (https://localhost:3000/static/js/bundle.js:287459:5)
at ProxyComponent../node_modules/react/cjs/react.development.js.Component.setState (https://localhost:3000/static/js/bundle.js:339510:16)
, которая вызвана обновлениемв Redux.
Любые подсказки, в чем проблема?