Uncaught TypeError: Cannot read property 'getInputByName'

in play ground it is working not in my code, it is throwing below error, is there any specific version i need to get

nodeMaterial.js:1028 Uncaught TypeError: Cannot read property ‘getInputByName’ of undefined


NodeMaterial.ParseFromSnippetAsync("#PAFUJR", scene).then(nodeMaterial => {



You should look in the network tab of your browser and see if the #PAFUJR snippet is correctly downloaded, as it seems it is not.

Try removing the #:

NodeMaterial.ParseFromSnippetAsync(“PAFUJR”, scene).then(nodeMaterial => {

in Network it is loading correctly…

It looks like in the node material file you load there is an incompatible node with the current source code: are you using the latest Babylon package? If not, are you sure you did not create a material that contains some types of nodes that are not handled by your current package version? You should test with the latest alpha 4.2 version and see how it goes.

1 Like

yes your are correct same code works in alpha release not in 4.1.0, I Tested play ground… when is this alpha release coming out

You can get the latest alpha package from here:

is this stable ?

Hard to answer this one :slight_smile:

It is “alpha” software, so bugs can exist, but they are corrected normally within the day they are reported.

I think a number of people are always using the latest alpha package.

Now, it depends on your needs: if your app is in production and should absolutely not suffer from any transient bug then you should probably stick to the stable release.

other option is i can convert to GLS shader code and use in stable version right ?

Yes more or less, but note that using the GLSL shader code produced by the NME is quite involved, see this for eg:

1 Like