Rocket.chat.electron: JS error after update 2.15.4

Created on 9 Aug 2019  路  23Comments  路  Source: RocketChat/Rocket.Chat.Electron

My Setup

  • Operating System: Win 10 Pro (v1809)
  • App Version: 2.15.4
  • Installation type: .exe

  • [X] I have tested with the latest version

  • [X] I can simulate the issue easily

Description

Simply start the Desktop App after updating to 2.15.4
===>
image

Current Behavior

It crashes.

Expected Behavior

Start the application.

Most helpful comment

Looks like it cannot connect to Bugsnag:
https://www.bugsnag.com/

Ironic. You'd think Bugsnag would have caught that one. :)

All 23 comments

Looks like it cannot connect to Bugsnag:
https://www.bugsnag.com/

@volphy same problem here, worked well in the previous version.

Looks like it cannot connect to Bugsnag:
https://www.bugsnag.com/

Obviously, but after reinstalling 2.15.3 it can connect to Bugsnag :) (atleast i dont experience any issues)

Same here in Mac OS. App doens't start because of that.

Same here. MacOs Catalina - 10.15 Beta (19A526h)

Same here on Windows 10 1903 Build 18362.267 VM.

rocketchaterror

same problem in CentOS 7 (rocketchat-2.15.4.x86_64.rpm)

A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module '@bugsnag/js'
    at Module._resolveFilename (internal/modules/cjs/loader.js:584:15)
    at Function.Module._resolveFilename (/opt/Rocket.Chat/resources/electron.asar/common/reset-search-paths.js:43:12)
    at Function.Module._load (internal/modules/cjs/loader.js:510:25)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at /opt/Rocket.Chat/resources/app.asar/app/main.js:10:31
    at Object.<anonymous> (/opt/Rocket.Chat/resources/app.asar/app/main.js:1579:3)
    at Object.<anonymous> (/opt/Rocket.Chat/resources/app.asar/app/main.js:1582:3)
    at Module._compile (internal/modules/cjs/loader.js:693:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)

Some problem on MacOS Mojave 10.14.6.

Bildschirmfoto 2019-08-09 um 08 29 37

Same on Ubuntu 18.04.3 LTS with snap.

Verson 2.15.3 works.

Same on Fedora 29 with v2.15.4
I think there is a npm package missing in the release-file?

EDIT: I can confirm that v2.15.3 works.

Did you try to clear the cache?

Did you try to clear the cache?

I removed and installed the snap packages a few times. So, i guess the cache was deleted.

Error in openSUSE 15.1:

`
$ rocketchat-desktop

A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module '@bugsnag/js'
at Module._resolveFilename (internal/modules/cjs/loader.js:584:15)
at Function.Module._resolveFilename (/opt/Rocket.Chat/resources/electron.asar/common/reset-search-paths.js:43:12)
at Function.Module._load (internal/modules/cjs/loader.js:510:25)
at Module.require (internal/modules/cjs/loader.js:640:17)
at require (internal/modules/cjs/helpers.js:20:18)
at /opt/Rocket.Chat/resources/app.asar/app/main.js:10:31
at Object. (/opt/Rocket.Chat/resources/app.asar/app/main.js:1579:3)
at Object. (/opt/Rocket.Chat/resources/app.asar/app/main.js:1582:3)
at Module._compile (internal/modules/cjs/loader.js:693:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)
`

image

:rofl:

It seems like a major fuck up.
How can this happen? What kind of quality assurance is in place?

It seems like a major fuck up.
How can this happen? What kind of quality assurance is in place?

valid question. but it's still open source - I guess a hotfix-PR may be welcome. :wink:

I think that @bugsnag/js dependency should be moved to dependencies instead of devDependencies cause its using during production application lifecycle.

package.json
https://github.com/RocketChat/Rocket.Chat.Electron/blob/develop/package.json#L40

errorHandling.js
https://github.com/RocketChat/Rocket.Chat.Electron/blob/develop/src/errorHandling.js#L1

I think that @bugsnag/js dependency should be moved to dependencies instead of devDependencies cause its using during production application lifecycle.

This seems to fix the error, at least rocket chat starts again!

Same with snap on xubuntu disco:

:~$ env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/rocketchat-desktop_rocketchat-desktop.desktop /snap/bin/rocketchat-desktop
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module '@bugsnag/js'
    at Module._resolveFilename (internal/modules/cjs/loader.js:584:15)
    at Function.Module._resolveFilename (/snap/rocketchat-desktop/68/resources/electron.asar/common/reset-search-paths.js:43:12)
    at Function.Module._load (internal/modules/cjs/loader.js:510:25)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at /snap/rocketchat-desktop/68/resources/app.asar/app/main.js:10:31
    at Object.<anonymous> (/snap/rocketchat-desktop/68/resources/app.asar/app/main.js:1579:3)
    at Object.<anonymous> (/snap/rocketchat-desktop/68/resources/app.asar/app/main.js:1582:3)
    at Module._compile (internal/modules/cjs/loader.js:693:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)

Looks like it cannot connect to Bugsnag:
https://www.bugsnag.com/

Ironic. You'd think Bugsnag would have caught that one. :)

@tassoevan the 2.15.5 tag points to a wrong commit.

Seems to be fixed with release 2.15.5. The snap on my Ubuntu Bionic box starts up fine.

Seems to be fixed with the above stated commit.

@tassoevan Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SQUIDwarrior picture SQUIDwarrior  路  3Comments

bbrendon picture bbrendon  路  4Comments

engelgabriel picture engelgabriel  路  5Comments

Somtozech picture Somtozech  路  5Comments

paulz1 picture paulz1  路  3Comments