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

Chatty not opening automatically #246

Closed
dviteris opened this issue May 6, 2016 · 12 comments
Closed

Chatty not opening automatically #246

dviteris opened this issue May 6, 2016 · 12 comments

Comments

@dviteris
Copy link

dviteris commented May 6, 2016

Hi, first of all, thanks for your product. It is wonderful!

I am having an issue getting Chatty to open automatically on my Mac. I have the settings pointed to the Chatty.jar file in the Chatty folder. Double clicking on the .jar file opens Chatty just fine, but for some reason Livestreamer does nothing when opening a stream or clicking on the chat button for a stream. I've tried putting the Chatty folder containing the jar everywhere including my Desktop so I don't think it's a permissions issue. I have the latest version of Chatty (.0.8.2) and Livestreamer (0.13.0). Any tips?

Thanks,
Dan

screen shot 2016-05-05 at 10 15 03 pm
screen shot 2016-05-05 at 10 15 17 pm

@bastimeyer
Copy link
Member

Hi.
This could be an issue with the GUI not being able to find your system's java executable. There's an issue with certain apps on OSX that don't have access to env-vars (like $JAVA_HOME or $JRE_HOME, see here). Static paths cound be added to this list, but I'm not sure if it's even the issue here or if these paths vary between OSX installations/releases.

Setting a custom chat application in the settings with the whole parameter string should always work. See the link above for the used chatty command line...

If you want, you could debug the chat launch methods:
Open the GUI with the --remote-debug-port=8888 parameter (open -a /path/to/LTGUI.app --args --remote-debugging-port=8888), then open http://localhost:8888 in your web browser, click the "LIvestreamer Twitch GUI" link and go to the Sources tab.

Then set a breakpoint in this line:
https://github.com/bastimeyer/livestreamer-twitch-gui/blob/v0.13.0/src/app/services/ChatService.js#L260
And in this line:
https://github.com/bastimeyer/livestreamer-twitch-gui/blob/v0.13.0/src/app/services/ChatService.js#L266

The first one is responsible for the java fallback paths and what I'd like to know is the value of the file variable (might halt multiple times here).
If it halts at the second breakpoint, the java executable was found (value of the exec var) and the issue is somewhere else.

@dviteris
Copy link
Author

dviteris commented May 6, 2016

Thanks for responding. I'm probably being stupid, but I'm not seeing the ChatService.js file in here.

screen shot 2016-05-06 at 9 21 31 am

@bastimeyer
Copy link
Member

bastimeyer commented May 6, 2016

Yeah, I was not thinking and assuming a non-minified build, sorry... 😜
Please follow this guide...

It could also be enough to quickly check process.env in the devtools console of the v0.13.0 build. You should do this first and see if $JAVA_HOME or $JRE_HOME are listed.

@dviteris
Copy link
Author

dviteris commented May 7, 2016

I feel very stupid as I am unable to do both things. I am able to open the console, but not seeing anything there resembling a process.env. I just get a white screen that will throw an "im not a subscriber" error if I open a stream.

As for the steps, I really got stuck on the grunt piece. Probably because I am not that github savy.

@bastimeyer
Copy link
Member

You need to write process.env into the dev console.

Well, I can't help you if you're having issues building the app. Just install Git and Node.js (with NPM) on your system, clone the repo and run the commands, it's pretty simple.

git clone https://github.com/bastimeyer/livestreamer-twitch-gui
cd livestreamer-twitch-gui
sudo npm install -g grunt-cli bower
npm install
grunt metadata less:source run:src

@dviteris
Copy link
Author

dviteris commented May 7, 2016

Thanks for bearing with me. I typed in process.env and I do not see $JAVA_HOME or $JRE_HOME under the Object heading.

And thanks for those instructions, I was able to build the app using those steps. Not sure if it's worth doing anything else though if I'm not seeing what I'm supposed to be seeing with process.env.

@bastimeyer
Copy link
Member

I do not see $JAVA_HOME or $JRE_HOME

What's the value of these vars in your user's env? (type echo $JAVA_HOME in the bash)
If these vars don't exist, then the issue is probably your system's end.

As I've said earlier, OSX replaces certain env vars in some applications. This was reported in #55 and the issue was $PATH being replaced with a default one. According to #55 (comment), this should not happen for other vars, though. The only fix was adding static fallback paths for the livestreamer detection. I'm not sure, if the issue you are reporting is common (since I haven't seen this before), but if it is, then I will need to add static paths to the java detection as well.

Now that you are able to run the unminified build, could you please set the breakpoints I've mentioned above? Thanks.

Also, could you please tell me the OSX version you are using?

@dviteris
Copy link
Author

dviteris commented May 7, 2016

I typed in echo for both of them and they came up blank. I was able to set the both as the following and they are now showing up in the process.env:

JAVA_HOME: "/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home"
JRE_HOME: "/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home"

I'm pretty sure JAVA_HOME is set correctly, but I couldn't find better information on where to set JRE_HOME to. Regardless, they are both appearing in process.env but chat is still not opening.

I tried setting the breakpoints, but it doesn't appear to ever be hitting them. When opening up a stream or hitting the chat button, I never get paused at a breakpoint (as far as I can tell).

screen shot 2016-05-07 at 1 41 34 pm

@dviteris
Copy link
Author

dviteris commented May 7, 2016

Ignore the previous screenshot/breakpoint comment. I set them correctly this time and it halts at the second breakpoint.

exec = "/usr/bin/java"

I'm pretty sure that location does not exist.

@bastimeyer
Copy link
Member

I'm pretty sure that location does not exist.

which java should tell you the location.
And $(which java) -jar /path/to/chatty.jar should open chatty correctly, which is basically what the GUI is doing, minus the chatty params.

I set them correctly this time and it halts at the second breakpoint.
exec = "/usr/bin/java"

It's finding the java executable, which means that the next step is the validation of the chatty .jar file. At this point, you must have set the wrong path to the file or the file doesn't have the proper permissions set.
Just as a reminder: it is not the chatty.app, it's the .jar file inside the .app folder (I don't know if there's a chatty OSX "app")

I will implement error messages for these kind of errors in the future. This was not possible with the old modal-dialog system, but it's easy to implement with the new one I have added a few releases ago. Kind of forgot that.

@dviteris
Copy link
Author

dviteris commented May 7, 2016

Thanks for your help, it is working now! I had JDK 1.6 installed. I had to install JDK 1.8 and point my JAVA_HOME to that path instead of the 1.6 path and then it worked. Apparently the Java versioning for the terminal was incorrect.

@bastimeyer
Copy link
Member

👍

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

2 participants