roggenbrot / owatron

A Electron based Linux desktop app for Microsoft Outlook and Office 365 with desktop notifications (email/reminder), spellchecker, context menu and system tray integration
GNU General Public License v3.0
14 stars 0 forks source link

Popup window on premise installations blank #2

Open roggenbrot opened 3 years ago

roggenbrot commented 3 years ago

When trying to open a email by double click, the newly opened window stays blank and does not load the content.

Console output for the new window:

/tmp/.mount_owatrosHUFK4/resources/app.asar/owa-preload.js:1 Loading owa preload script
projection.aspx:88 Uncaught TypeError: Cannot read property 'popOutProjectionManager' of null
    at window.onload (projection.aspx:88)

Root cause seems to be kind of a race condition where outlook tries to access the the opener on onLoad event, but the opener wasn't set (yet).

This seems to occur only on on premise installations.

Created on behalf of @speatzle

roggenbrot commented 3 years ago

It seems that this is a limitation of electron and can be solved by setting affinity for the new window

electron/electron#1865

Still not sure if this will solve the issue or if we have another problem (CORS??????)

roggenbrot commented 3 years ago

If this is not working it might be possible to implement a workaround based on IPC:

speatzle commented 3 years ago

I just tried the new release. Sadly it still opens the PopOut without content. I have attached the relevant logs.

The TypeError in Line 10 of the mainwindow_log happens during the opening of the popup, it might be related? mainwindow_log.log popout_log.log

roggenbrot commented 3 years ago

Mmm interesting. What happens in a "normal" Chrome/Chromium environment? Does the same error also happen there or does it just happen in a electron environment?

It seems that the newly opened window tries to access some object (popOutProjectionManager) of the parent window via window.opener which seems to be undefined in electron environments.

My first guess was that the window.opener can't be accessed at all, but it might be also possible that the popOutProjectionManager is not set because of the TypeError.

I've searched for similar problems, but haven't found anything interesting except people complaining about more or less the problem on different browsers, but without any solution (https://social.technet.microsoft.com/Forums/lync/en-US/e503ffa1-d66d-4b7b-aaf2-5e04f5128921/error-login-in-owa-web-boot1mousejs?forum=exchangesvrclients)

I'm currently using electron 11.2.3, which is based on Chromium 87. Agent string submitted to the OWA server is Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3831.6 Safari/537.36, but I don't think this should be a issue.

The agent string is required for spell checker to work (OWA deactivates the spell check on "unsupported" browsers).

Maybe removing the agent string to force compatibility mode might solve the issue, but then spell checker will fall back to the browser spellchecker, which is also not a real option/fix

roggenbrot commented 3 years ago

Which version of exchange are you using? Seems that there are hosted exchange offers that provide exchange accounts with a free trial period. If they provide access to the same version you are using at the moment I can create a account and debug the problem there.