Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property '0' of null #722

Closed
mjio opened this issue Mar 2, 2021 · 10 comments
Closed

Uncaught TypeError: Cannot read property '0' of null #722

mjio opened this issue Mar 2, 2021 · 10 comments

Comments

@mjio
Copy link

mjio commented Mar 2, 2021

Problem
Athens is crashing on my system, macOS version 11.2.2. I'm using Athens 1.0.0-beta.46. The error happens when I try to update to version 1.0.0-beta.47.

message=Uncaught TypeError: Cannot read property '0' of null
source=file:///Applications/athens.app/Contents/Resources/app.asar/resources/public/js/compiled/renderer.js
lineno=15103
colno=505
error=TypeError: Cannot read property '0' of null

Screenshots
Screen Shot 2021-03-02 at 11 04 57 am

Athens Version
1.0.0-beta.46

@tangjeff0
Copy link
Collaborator

tangjeff0 commented Mar 2, 2021 via email

@mjio
Copy link
Author

mjio commented Mar 2, 2021

I've updated manually to version 1.0.0-beta.47 and that works fine. If no one else sees this issue, I guess we can close it.

@tangjeff0
Copy link
Collaborator

tangjeff0 commented Mar 2, 2021

I had this issue too from Linux. After restarting, it worked though.

@TillScout
Copy link

also occured on Windows, but the installation went through (showing a couple more error messages, though)

@yifanyin
Copy link

yifanyin commented Mar 3, 2021

I also encounter this message after clicking the update prompt. After seeing the same message and press "OK", the app turned blank. I just leave it be and seems like Athens still updated itself under the hood and quit afterward. When I restart Athens it is the 1.0.0-beta.47 version. I would suggest a better visual for the update process and automatic restarting after updates.

@eerohele
Copy link

eerohele commented Mar 4, 2021

Got the same error on Big Sur.

@tangjeff0
Copy link
Collaborator

tangjeff0 commented Mar 4, 2021

Seems like the issue is actually coming from renderer, and only when an update is found. Not a crippling issue, as the update still ends up happening.

@tangjeff0
Copy link
Collaborator

tangjeff0 commented Mar 6, 2021

Sentry gives a more verbose error message:

TypeError: Cannot read property '0' of null
    at EventEmitter.i.send.i.sendSync (electron/js2c/renderer_init.js:75:326)
    at Object.athens$core$init_ipcRenderer [as init_ipcRenderer] (js/compiled/cljs-runtime/athens.core.js:60:20)
    at Object.athens$core$init [as init] (js/compiled/cljs-runtime/athens.core.js:76:13)

This takes us to

(defn init-ipcRenderer
[]
(when (util/electron?)
(let [ipcRenderer (.. (js/require "electron") -ipcRenderer)
update-available? (.sendSync ipcRenderer "check-update" "renderer")]
(when update-available?
(when (js/window.confirm "Update available. Would you like to update and restart to the latest version?")
(.sendSync ipcRenderer "confirm-update"))))))

@tangjeff0 tangjeff0 changed the title Uncaught TypeError: Cannot read property '0' of null fix(electron): "Cannot read property '0' of null" Mar 6, 2021
@tangjeff0 tangjeff0 changed the title fix(electron): "Cannot read property '0' of null" Uncaught TypeError: Cannot read property '0' of null Mar 6, 2021
@vtnate
Copy link

vtnate commented Mar 9, 2021

Same error happened to me on beta.49. Downloaded new version from github link and installed successfully, as suggested by others.

@sid597
Copy link
Collaborator

sid597 commented Jun 10, 2021

Closing this because this is an issue for past built, we expect a new issue to be created if this bug occurs in later builds so that they can be solved with P0 (highest) priority.

@sid597 sid597 closed this as completed Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants