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

logstation seems to crash if BROWSE is not available #33

Closed
Kkevsterrr opened this issue Oct 13, 2018 · 4 comments
Closed

logstation seems to crash if BROWSE is not available #33

Kkevsterrr opened this issue Oct 13, 2018 · 4 comments

Comments

@Kkevsterrr
Copy link

Kkevsterrr commented Oct 13, 2018

I'm excited to use logstation and I'd like to configure to use it automatically in my environment. However, when I start a logstation instance programatically, it immediately dies:

Exception in thread "main" java.lang.UnsupportedOperationException: The BROWSE action is not supported on the current platform!
	at java.awt.Desktop.checkActionSupport(Desktop.java:225)
	at java.awt.Desktop.browse(Desktop.java:381)
	at com.jdrews.logstation.LogStation$delayedInit$body.apply(LogStation.scala:124)
	at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
	at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
	at scala.App$$anonfun$main$1.apply(App.scala:71)
	at scala.App$$anonfun$main$1.apply(App.scala:71)
	at scala.collection.immutable.List.foreach(List.scala:318)
	at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
	at scala.App$class.main(App.scala:71)
	at com.jdrews.logstation.LogStation$.main(LogStation.scala:34)
	at com.jdrews.logstation.LogStation.main(LogStation.scala)

Am I missing something with how I should run it?

@jdrews
Copy link
Owner

jdrews commented Oct 13, 2018

Hmm that's happening because it's trying to load the browser window. This was just a convenience feature that was added.

Some quick googling seems to suggest that java.awt.Desktop.browse has poor support for Linux desktops. Perhaps you're on Linux or something similar?

Does it flat out crash or do you just get that error? If so just go to http://127.0.0.1:8884 and it should be available.

@Kkevsterrr
Copy link
Author

Kkevsterrr commented Oct 13, 2018 via email

@jdrews
Copy link
Owner

jdrews commented Oct 13, 2018

I've isolated where this error is coming from, but I wasn't able to recreate it. I've put in some checks to make it continue on if it can't launch a browser. Please give it a go with the new 0.3.11 pre-release:
https://github.com/jdrews/logstation/releases/tag/0.3.11
https://github.com/jdrews/logstation/releases/download/0.3.11/logstation-0.3.11.jar

@jdrews
Copy link
Owner

jdrews commented Oct 13, 2018

Tested and working here: #34 (comment)

Closing.

@jdrews jdrews closed this as completed Oct 13, 2018
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