Dropbox oauth view is not rendering properly

2019-07-27 03:30发布

问题:

I am building electron desktop app where user can grant access to his cloud drive using OAuth credentials. It used to work fine. Recently it is not rendering html properly. Eventhough user enters credentials, he is not able to submit form.

It is throwing below errors.

Please check the screenshot :

Adding another screen how submit button is disabled and user name and password text boxes are behind the view.

Electron process details : process.versions : ares: "1.10.1-DEV" atom-shell: "1.4.14" chrome: "53.0.2785.143" electron: "1.4.14" http_parser: "2.7.0" modules: "50" node: "6.5.0" openssl: "1.0.2h" uv: "1.9.1" v8: "5.3.332.47" zlib: "1.2.8"

回答1:

This happens because BrowserWindow has the nodeIntergration flag enabled by default. And this conflicts with the RequireJS implementation with which Dropbox was bundled.

Try to set nodeIntergration to false when creating a new BrowserWindow.

For more details, please check out my answer from a similar question: Dropbox oauth window is not working