marcj / css-element-queries

CSS Element-Queries aka Container Queries. High-speed element dimension/media queries in valid css.
http://marcj.github.io/css-element-queries/
MIT License
4.27k stars 487 forks source link

"Unknown error" in ResizeSensor.getElementSize() #268

Open amotl opened 5 years ago

amotl commented 5 years ago

Dear Marc,

first things first: Thank you so much for conceiving and maintaining this excellent library.

We just wanted to let you know that we are getting these traces from our Javascript telemetry subsystem which catches exceptions happening on the browser:

"stackframes": [
    "getElementSize()@webpack://..../node_modules/css-element-queries/src/ResizeSensor.js:70:0", 
    "onScroll()@webpack://..../node_modules/css-element-queries/src/ResizeSensor.js:217:0"
]

As we are still running version 1.1.1, that would match this specific line in the source code: https://github.com/marcj/css-element-queries/blob/1.1.1/src/ResizeSensor.js#L70

We will update to version 1.2.0 and see whether the problem is still persistent or if any upgrade on its way mitigated it already. Ah, presumable it only happens with Internet Explorer

User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; wbx 1.0.0; rv:11.0) like Gecko

Thanks for listening and with kind regards, Andreas.

marcj commented 5 years ago

Do you have the actual error message as well? Yeah, please let me know whether it happens on newest version as well. But it probably will since we still have this line of code there.

amotl commented 5 years ago

Do you have the actual error message as well?

It's really just literally "msg": "Unbekannter Fehler." what our telemetry information is telling us about the error message. I am blaming Internet Explorer for that.

marcj commented 5 years ago

Interesting. Let me know when you got more information about that, then we can try to replicate/debug.

amotl commented 5 years ago

I would like to ramp up an Internet Explorer 11 somewhere and just execute element.getBoundingClientRect() for some actually valid element on the developer console - I believe IE11 will have such a thing these days? - and then see what happens.

However, I lost my VirtualBox setup recently, so I currently lack an Internet Explorer which is just a fingertip away and I don't see any in my nearest distance. Saying that, I will definitively get back to this at some time when the telemetry reports will keep nagging me or the next time when I will need a working Vagrant setup.

marcj commented 5 years ago

You get free VMs here for all platforms with whatever IE you want, directly from MS, without installing anything manually: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ Let me know what you find.

amotl commented 5 years ago

Now remembering that about the free VMs from MS, I'll try my best. Thanks! [1] says it's an Internet Explorer 11 on Windows 10 which has been triggering this error, according to the User Agent string. Currently, I am downloading IE11 for Win8.1, afterwards maybe MSEdge on Win10.

[1] https://developers.whatismybrowser.com/useragents/parse/