Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Mojave Error in Place of Widget #39

Closed
MrGVSV opened this issue Dec 31, 2019 · 11 comments
Closed

Mojave Error in Place of Widget #39

MrGVSV opened this issue Dec 31, 2019 · 11 comments
Assignees

Comments

@MrGVSV
Copy link

MrGVSV commented Dec 31, 2019

I followed the instructions to install the widget properly but an error is being shown in place of the widget.

Invariant Violation: Objects are not valid as a React child (found: Error: env: ruby_executable_hooks: No such file or directory
). If you meant to render a collection of children, use an array instead.

iStats works fine in the terminal and the command variable in index.jsx is pointing to my iStats binary. Not sure what's going wrong as I'm new to Übersicht and stuff.

System: Mac OSX Mojave 10.14.6
Ruby: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin16]
Gem: ~/.rvm/rubies/ruby-2.5.1/bin/gem
iStats: /usr/local/bin/istats
Uber: v1.4

@roele
Copy link
Owner

roele commented Dec 31, 2019

I am assuming you are using the latest istats.widget-2.2.0 with no modifications to the source?

To further pin down the issue a more explicit error description is required. Would you be able to open "Show Debug Console" from the Übersicht context menu and provide the output from the "Console" tab? I would expect a more detailed error description is shown in the Console with the file and line number where this error occurs exactly.

@MrGVSV
Copy link
Author

MrGVSV commented Dec 31, 2019

It's actually iStats v1.6.1. And yes I have not modified it at all.

Do these screenshots from the console help at all?

image
image

@roele
Copy link
Owner

roele commented Jan 1, 2020

Usually the error indicates the widget causing the problem.

Screenshot 2020-01-01 at 13 32 29

In your case it seems that the widget is not even loaded. Please check if your Übersicht preferences point to a directory containing the widget, rather than the widget itself. Also see #20 for other potential issues around widget folders.

@MrGVSV
Copy link
Author

MrGVSV commented Jan 3, 2020

My preferences are pointing to the widgets folder and I'm able to load up other widgets. Do you think it has anything to do with ruby_executable_hooks? I just ran sudo gem install --user-install executable-hooks and it was successfully installed but didn't help. I'm not too familiar with ruby so maybe I'm missing something here.

@roele
Copy link
Owner

roele commented Feb 3, 2020

@MrGVSV Hard to tell what's going on here. To me this seems somehow related to your environment. Does the istats command run properly in your command line? Is the executable located/symlinked at /usr/local/bin/istats as indicated in the script?

@drewswaycool
Copy link

I am having this issue as well. On Catalina and using the latest release of the widget.

@roele
Copy link
Owner

roele commented Mar 4, 2020

@drewswaycool How does your environment look like in terms of versions (macOS, Ruby, Gem, rvm)? Do you use rvm as well like @MrGVSV?

$ which istats && which ruby && which gem
/usr/local/bin/istats
/usr/bin/ruby
/usr/bin/gem
$ sw_vers -productVersion && ruby --version && gem --version && istats --version
10.15.3
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
3.0.3
iStats v1.6.1

@drewswaycool
Copy link

$ which istats && which ruby && which gem
/Users/drew/.rvm/rubies/ruby-2.5.1/bin/istats
/Users/drew/.rvm/rubies/ruby-2.5.1/bin/ruby
/Users/drew/.rvm/rubies/ruby-2.5.1/bin/gem
$ sw_vers -productVersion && ruby --version && gem --version && istats --version
10.15.3
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin18]
2.7.8
iStats v1.6.1

@roele
Copy link
Owner

roele commented Mar 4, 2020

@drewswaycool
It seems you're also using rvm and the istats Gem is installed in this context. As rvm requires the script to be sourced in the .bash_profile i assume Übersicht it not executing the shell command with a properly initialized environment.

You could give the following options a try:

  1. Enable Load Bash env in Übersicht preferences.
  2. Edit the command constant in index.jsx to something like source $HOME/.bash_profile && /usr/local/bin/istats.

@drewswaycool
Copy link

Nice, just needed to turn Load Bash env and change the path to istats in the index.jsx. Thanks.

roele pushed a commit that referenced this issue Mar 5, 2020
Add troubleshooting item for Ruby Version Manager (RVM)
@roele
Copy link
Owner

roele commented Mar 5, 2020

Thanks for confirming @drewswaycool. I added a troubleshooting item to the README.md for RVM.

@roele roele closed this as completed Mar 5, 2020
@roele roele self-assigned this Mar 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants