Meshes not rendering without error, only in Teams' Windows Electron app

Hello, I hope everyone’s having a great December. I’m part of Smplrspace, an embedded 3D floor plans viewer. We’re having a really hard to debug issue that I’d like to share in the hope that the team or community might be able to help.

What happens is that our scene is not being visibly rendered (as in meshes are not there on the screen), but here is the twist:

  • it only happens inside the MS Teams Windows app (Electron app), we’re embedded inside a Teams app.
  • it works on the Teams web app
  • it works in the Teams Mac app (Electron as well)
  • it works in the Teams mobile app
  • mesh picking actually works and the tooltips appear as per normal
  • there is completely 0 error being logged

The nitty gritty stuff that may (or may not) help:

  • Windows 11
  • Teams 1.5.00.31168
  • Babylon.js v5.27.0 - WebGL2 - Parallel shader compilation

Video of it working:

Video of it not working (in teams windows):

Sorry, given the nature of the issue, I don’t know how I could repro in the PG.

Any idea of what may be happening? Thanks in advance.

I guess you can’t use Spector to get a recording of one frame? Else, maybe RenderDoc would work?

It would help understanding what’s going on: is anything rendered at all? If yes, is it a problem with the depth buffer or with some other settings?

Maybe @sebavan can think of other things to check.

Also, one question: how the tooltips are rendered? Is it with the 2D GUI?

Hey @tibotiber could you try forcing webgl1 with disableWebGL2Support: true in the engine constructor options.

Teams might be on an old electron version with issues regarding webgl2.

2 Likes

Thanks for the quick replies. The difficulty is we are not even in a position to test since this is embedded in a client app we do not have access to, even less so in Teams Windows :sweat:. So Spector and RenderDoc are out the door.

To reply the questions: there is nothing rendering at all, except for the scene background color (glad we picked a nice one :grimacing:). The tooltips are React elements, not GUI, but the picking works via ActionManager.OnPointerOverTrigger.

Right now we’ve deployed a test version disabling parallelShaderCompile (a shot in the dark to be honest). We’ll wait for client feedback and then test forcing webgl1 on their url. Thanks for the suggestion.

I’ll post back with any new information or result.

And :cookie: (cookies) go to @sebavan! Disabling WebGL 2 did the deed. Thanks a bunch! :slight_smile:

Now we’re trying to understand how to detect the faulty browser to fallback to WebGL 1 automatically. Would your colleagues from the Teams team be able to provide intel on the browser used in Electron/Teams and how to reliably detect it? Also, the fallback is obviously something we can handle in user land but I’m wondering if you’d be interested to have that safety/sanity layer directly in the engine?

Thanks again and take care.

Unfortunately I do not think there are any easy way to detect it and I am pretty sure some of the next team version reusing more uptodate version of webgl will be fine :slight_smile:

I would basically feature check if in teams to force webgl1 in user land and as soon as newer version will be released add a version check to allow webgl2.

The same browser/electron version outside of teams seems to be ok so no easy global workaround.

Yep, that’s exactly what I thought as well. Thanks for sharing your opinion on that.

Reporting back on progress since this may be useful to others in the future.

The environment can be detected through the useragent and it’s much clearer than I had imagined. Teams currently gives the following:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Teams/1.5.00.31168 Chrome/96.0.4664.174 Electron/16.2.8 Safari/537.36

It’s pretty nuts actually, Teams is still on Electron 16 (we’re now at 22), which packs Chrome 96 (we’re now at 108)!

We’re probably gonna opt for the detection of the Chrome version to force WebGL 1. Do you have any idea at which Chrome version WebGL 2 started to be reliable? Is there an easy way to test old versions of Chrome?

Cheers.

70 was already pretty good and I am pretty sure all the 90s version should be fully compatible :slight_smile:

Thanks for the info. That’s weird, we’re on 96 here but still having issues. Do you think Electron might be doing some things that impact compatibility? Are they shipping a Chrome with a different config?

I do not know about this part enough but @julien-moreau used to run in electron since a long time without this issue so I am wondering if it could be specific to their environment hence the recommendation to manually bypass within teams (for now).

Oh that’s right, and also, it only impact the Windows Teams app. Thanks for the continued help, and take care.