Richard C Posted December 16, 2016 Share Posted December 16, 2016 Chrome is returning the following error message Cannot read property 'getExtension' of null which results in Babylon.js not being loaded. Chrome has recently updated itself (Grrrr) on my machine and I am getting the error message as a result. This error was not fired before the update. I have tried the code in Firefox, IE and a new browser 'Slimjet' (which is based on and built from Chromium) and do not get the error. Is it a Chrome thing or something you tech guys need to know about. The Chrome version is 55.0.2883.87 m (64-bit) on Windows10. Thanks Richard C Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 16, 2016 Share Posted December 16, 2016 Do you have an example on the PG to check if this happens to us too. I'm on Chrome version 55.0.2883.87 m (64-bit) Windows 10 too. (But I do not see any error. Try to empty the browser caches, this solves problems sometimes.) Quote Link to comment Share on other sites More sharing options...
Richard C Posted December 16, 2016 Author Share Posted December 16, 2016 Thanks Dad72 I have just tried the code on a laptop which also has latest \chrome and Win 10 and all is OK. It works perfectly. I guess I've done something dumb on the desktop machine, because despite clearing cache, re-installing Chrome and updating display drivers I am still getting the same error message. I'm at a loss now and honestly don't know what to do. Any suggestions, save wiping the disk and starting all again. Think I shall take dogs for a walk and hope a miracle happens to my machine while I am out ! Richard C Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 16, 2016 Share Posted December 16, 2016 This is actually strange that you have. I have unfortunately no other idea, your problem is on the PC and not in your code or babylon. Maybe Deltakosh will have an ideas. Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 16, 2016 Share Posted December 16, 2016 Would be interesting to know, which extension fails on you PC. Do you have a Costom shader ? Shadow map ? Can you comment those out, and back again, does it make any difference ? Do you using latest Babylonjs 2.5? What is the difference between your Laptop and HomePChttp://webglreport.com/ https://browserleaks.com/webgl --> Supported WebGL Extensions Are you really sure you make a clean install? Many Programs leave a footprint, somewhere. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted December 16, 2016 Share Posted December 16, 2016 Yes, (we probably need a pinned topic on what is expected to report bugs), but you need to run against the max version to get the line number or line of the error. Also, do you have Chrome's --enable-webgl-draft-extensions flag set. Please undo if so, and retest. I suspect it might be related to the ASTC compressed texture extension, which testing for was added in 2.5. It was not Khronos community approved until a few days after 2.5 went final. If not, your max line number will tell us what it is. Quote Link to comment Share on other sites More sharing options...
Richard C Posted December 16, 2016 Author Share Posted December 16, 2016 @Nabroski @JCPalmer There is a difference between the two machines as reported by the two webgl sites you give Nabroski. I am continuing to research using those sites and will report back asap. JCP - enable webgl draft extension was not enbled. Colud I ask you please to expand on what I should do specifically to find the max line number you asked for. Thanks as ever Richard C Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted December 16, 2016 Share Posted December 16, 2016 Use the max version of BJS. Replace the url on the script tag. Use say "http://cdn.babylonjs.com/2-5/babylon.max.js" When your page loads, hit f12 like you did to get the error on console tab. There should be an underlined babylon.max.js:line number. That is what is wanted. If you click it will actually bring you to the source line in the max file. Cut and paste that line. Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 17, 2016 Share Posted December 17, 2016 They changed the WebGL Extensions functions in WebGL 2.0. The next Auto update to Chrome 56 (WebGL 2.0 per default) is in 2 Weeks so in will break then anyway. Enjoy your holidays. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted December 17, 2016 Share Posted December 17, 2016 @Nabroski, I do not know what a 'default' even is with regards to a webgl context. I do not think the argument is optional, especially since it is the first arg. canvas.getContext("webgl", options) I can say, unless you are running BJS 2.6._alpha, you are always going be requesting a webgl1 context. If you look a little further up the engine file, @Deltakosh has un-commented out the request for a webgl2 context that will fallback to webgl1. I do not see anything breaking with 2.5. This op has hardware (graphics card), which he does not list. He shows no line number in Engine where this occurs. He cannot be helped. I'm out. Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 18, 2016 Share Posted December 18, 2016 @JCPalmer this is the end of the world. get drunk and be married JCPalmer 1 Quote Link to comment Share on other sites More sharing options...
Richard C Posted December 18, 2016 Author Share Posted December 18, 2016 @JCPalmer @Nabroski Please don't bail out - I have not been doing nothing in the past 48 hours - honest. I wanted to research and try and solve the issues myself before coming back and bothering you further. Following the reports from the two sites Nabroski suggested, I was set on a course to update drivers especially video drivers. I have a Dell machine and they don't make it easy to update. Then, having updated, webGLreport.com said of Chrome - webGL1 supported but not enabled. It took a while to find the solution to that one too. Having done all that, the problem still exists. I have done as JCP asked and the result is: Uncaught TypeError: Cannot read property 'getExtension' of null at Engine._canRenderToTextureOfType (babylon.max.js:9033) at Engine._canRenderToFloatTexture (babylon.max.js:9021) at new Engine (babylon.max.js:6609) at index.html:32 9021 return this._canRenderToTextureOfType(BABYLON.Engine.TEXTURETYPE_FLOAT, 'OES_texture_float'); 9033 var ext = gl.getExtension(extension); 6609 var renderToFullFloat = this._canRenderToFloatTexture(); Please bare in mind that I have run this code on two machines - laptop and pc. Only the PC fails, the laptop doesn't fail and the result is as expected. I can only assume the issue is machine specific but I would greatly appreciate your input. thanks Richard C Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 18, 2016 Share Posted December 18, 2016 Hello @Richard C Yes, probably your Graphic cards may handle different textures. 'OES_texture_float' mean a texture with Alpha value. so you try to load a e.g PNG, with RGBA or an conversation for not float texture to a RGBA Shader, - and at some point it fails. this by @Convergence http://misc.blicky.net/c2/?id=1&highfps It fails on my machine with "newer" Chrome. Please open your console, can you confirm ? errors like can load .jpg or js script failed etc. Quote Link to comment Share on other sites More sharing options...
Richard C Posted December 18, 2016 Author Share Posted December 18, 2016 Nabroski No errors as no .jpg being used, just standard Babylon materials. Interestingly, it does not fail in Microsoft Edge or Firefox.IE11 doesn't display page but there are no error messages. I have also recently installed slimjet (browser) which is based on Chromium and that doesn't fail either. It is only Chrome that is not playing ball. Cheers Richard c Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 18, 2016 Share Posted December 18, 2016 @Richard C Okay, we coming closer. Its not the watermaterial and not the groundmaterial Can you copy paster your code at line 32 index.html:32 Quote Link to comment Share on other sites More sharing options...
Richard C Posted December 18, 2016 Author Share Posted December 18, 2016 line32: var engine = new BABYLON.Engine(canvas, true); not too helpful I suspect Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted December 18, 2016 Share Posted December 18, 2016 Ok, first this code was added in 2.5 for a problem in iOS. First option is to switch to 2.4 as a workaround for the immediate future. Are you using 2.5 features in your work (just see if 2.4 works to check)? It looks like whatever Chrome now does, you cannot have a 2nd webgl context on the tempcanvas created inside of _canRenderToTextureOfType() on this graphics card. My line numbers will be different, as I am only referencing engine.ts, but in line 3127 gl is returned as null. The next line where gl.getExtension() is called blows up. I am not sure why a temp context is required, probably to not have to cleanup anything. A check should probably added to ensure that gl is a context and not null, but this is not my code. You should probably make sure your Display Adapter driver is up to date by right clicking on the Display Adapter & clicking "Update driver software..." in Device Manager. That is the extent to the triage I can offer. Btw, @Nabroski I see we are asking for a 'webgl' not a 'webgl1' context. I saw 'webgl2' was explicitly being asked for first, and the 'l' being so close to '1' in my editor, I read it wrong. If a browser is going to interpret 'webgl' differently from the past, you would assume they tested this in the real world. Quote Link to comment Share on other sites More sharing options...
Richard C Posted December 18, 2016 Author Share Posted December 18, 2016 Thank you JCP. I appreciate your advice. Richard C Quote Link to comment Share on other sites More sharing options...
Convergence Posted December 19, 2016 Share Posted December 19, 2016 On 12/18/2016 at 5:03 PM, Nabroski said: this by @Convergence http://misc.blicky.net/c2/?id=1&highfps It fails on my machine with "newer" Chrome. Please open your console, can you confirm ? errors like can load .jpg or js script failed etc. Thanks for reporting.. My Chrome claim to be up-to-date (55.0.2883.87 m@Win7) but I don't see any errors? Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 19, 2016 Share Posted December 19, 2016 @Convergence No worries you have maybe a half year 'til the majority of people start to use WebGL 2.0 Firefox 51.0b8 (Release in January ) A lot of Errors your site wont startChrome 56 ( Stable February ) - 57.0.2950.4 dev (March.++) Materials fail, but the site starts anyway with artifacts. (No ground, no water) Threejs has WebGL 2.0 support since 2 years, they already go trough all this, look up in their bugreport. Basically you have to place a switch in your code, so it has a fallback structure. I cant find the link anymore, but Khronos website has a description of it. somewhere here https://www.khronos.org/registry/webgl/specs/latest/2.0/#4.1 @Deltakosh Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 19, 2016 Share Posted December 19, 2016 Chrome is currently overtaken by radicals, i look forward the new features they add to Webexperience Yes, according to this site, - every month you can say, theirs a jump in the version of browsers.https://www.w3counter.com/globalstats.php Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 19, 2016 Share Posted December 19, 2016 @Convergence here is the code:https://github.com/mrdoob/three.js/issues/8125 Quote Link to comment Share on other sites More sharing options...
Richard C Posted December 20, 2016 Author Share Posted December 20, 2016 @Nabroski I tried http://misc.blicky.net/c2/?id=1&highfps on the offending machine and it works perfectly in Chrome. I tried to load my script, using Babylon-2.4 as JCP suggested. Still didn't work but at least the error message is different ........... this time it's "webGL not supported" So my problem is still a mystery to me. I'm getting somewhat disheartened now. Perhaps I shall prepare a PG for all to see. cheers Richard C Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 20, 2016 Share Posted December 20, 2016 @Richard C I believe you have a bug in your code. If it is not a client project with sensible data, - can you share an example ? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted December 21, 2016 Share Posted December 21, 2016 Looks like the error is now being trapped in 2.6.-alpha , but not yet committed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.