HearthStats / HearthStats.net-Uploader

Auto uploader for HearthStats.net
BSD 3-Clause "New" or "Revised" License
123 stars 57 forks source link

OSX build loads, but no interaction with Hearthstone #196

Open BuissonNeth opened 10 years ago

BuissonNeth commented 10 years ago

Hello,

first of all thanks a lot for your work ! Greatly appreciated here :)

So I downloaded the latest version of Hearthstats (HearthStats.net.Uploader.v0.15.201403101-osx.zip) and installed it as mentioned on the download page. I then opened Hearthstats and entered my user key.

When I opened Hearthstone, I put it on windowed mode because the log file where saying : "Waiting for Hearthstone (in windowed mode) ..."

Then nothing happened as I were playing. It didn't detected anything.

I shut the game and hearthstats, re-opened them and when Hearthstone opened, I had a notification saying something like "Hearthstone detected" (didn't had the time to read the message).

But still, after playing a few games, nothing was recorded.

I went through all of the OSX requests here, but didn't found a solution.

Here is my log, when trying to run through the Terminal :

stevedore.extension Could not load 'user_scripts': distribute stevedore.extension distribute Traceback (most recent call last): File "/Users/Nethanel/.local/lib/python2.7/site-packages/stevedore-0.4-py2.7.egg/stevedore/extension.py", line 62, in init invoke_kwds, File "/Users/Nethanel/.local/lib/python2.7/site-packages/stevedore-0.4-py2.7.egg/stevedore/extension.py", line 74, in _load_one_plugin plugin = ep.load() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1953, in load if require: self.require(env, installer) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1966, in require working_set.resolve(self.dist.requires(self.extras),env,installer)) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 565, in resolve raise DistributionNotFound(req) # XXX put more info here DistributionNotFound: distribute stevedore.extension Could not load 'project': distribute stevedore.extension distribute Traceback (most recent call last): File "/Users/Nethanel/.local/lib/python2.7/site-packages/stevedore-0.4-py2.7.egg/stevedore/extension.py", line 62, in init invoke_kwds, File "/Users/Nethanel/.local/lib/python2.7/site-packages/stevedore-0.4-py2.7.egg/stevedore/extension.py", line 74, in _load_one_plugin plugin = ep.load() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1953, in load if require: self.require(env, installer) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1966, in require working_set.resolve(self.dist.requires(self.extras),env,installer)) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 565, in resolve raise DistributionNotFound(req) # XXX put more info here DistributionNotFound: distribute stevedore.extension Could not load 'user_scripts': distribute stevedore.extension distribute Traceback (most recent call last): File "/Users/Nethanel/.local/lib/python2.7/site-packages/stevedore-0.4-py2.7.egg/stevedore/extension.py", line 62, in init invoke_kwds, File "/Users/Nethanel/.local/lib/python2.7/site-packages/stevedore-0.4-py2.7.egg/stevedore/extension.py", line 74, in _load_one_plugin plugin = ep.load() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1953, in load if require: self.require(env, installer) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1966, in require working_set.resolve(self.dist.requires(self.extras),env,installer)) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 565, in resolve raise DistributionNotFound(req) # XXX put more info here DistributionNotFound: distribute

I hope this can be useful.

Again, thank you very much for your time !

gtch commented 10 years ago

Thanks for including the detailed logs, but they don't seem to be from the HearthStats application.

Can you please try running it as follows? Presuming your copy of HearthStats is in the Applications folder, run this in the terminal:

cd /Applications
HearthStats.app/Contents/MacOS/JavaAppLauncher

If everything runs as normal, a HearthStats window should open and your terminal window should show a message like this:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

If something goes wrong, you would typically see a couple of error lines after that. Tell me if you get those.

BuissonNeth commented 10 years ago

Hello, thank you for your answer. I did as you said and got this messages before the lines you mentioned (but nothing after):

Mar 11 12:59:19 oxy-data.spare JavaAppLauncher[1134] <Error>: CGContextGetCTM: invalid context 0x0
Mar 11 12:59:19 oxy-data.spare JavaAppLauncher[1134] <Error>: CGContextSetBaseCTM: invalid context 0x0
Mar 11 12:59:19 oxy-data.spare JavaAppLauncher[1134] <Error>: CGContextGetCTM: invalid context 0x0
Mar 11 12:59:19 oxy-data.spare JavaAppLauncher[1134] <Error>: CGContextSetBaseCTM: invalid context 0x0
BuissonNeth commented 10 years ago

I tried the same thing but then I played a few games and here is what i had after the line mentioned:

java.lang.UnsatisfiedLinkError: Unable to load library 'CoreGraphics': Native library (darwin/libCoreGraphics.dylib) not found in resource path ([file:/Applications/HearthStats.app/Contents/Java/Classes, file:/Applications/HearthStats.app/Contents/Java/HearthStatsUploader-OSX.jar])
    at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:271)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)
    at com.sun.jna.Library$Handler.<init>(Library.java:147)
    at com.sun.jna.Native.loadLibrary(Native.java:412)
    at com.sun.jna.Native.loadLibrary(Native.java:391)
    at jna.osx.CoreGraphicsLibrary.<clinit>(CoreGraphicsLibrary.java:15)
    at net.hearthstats.ProgramHelperOsx.findWindow(ProgramHelperOsx.java:301)
    at net.hearthstats.ProgramHelperOsx.getScreenCapture(ProgramHelperOsx.java:56)
    at net.hearthstats.Monitor._handleHearthstoneFound(Monitor.java:866)
    at net.hearthstats.Monitor$14.call(Monitor.java:898)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
gtch commented 10 years ago

This looks like a problem that affects only certainly version of OS X and Java. I've tested the latest version of the uploader (HearthStats.net.Uploader.v0.15.201403101-osx.zip) on two different machines and it's working fine on those, but they're both running Java 7 (1.7.0_51) with OS X 10.9.2 Mavericks.

Apparently the "invalid context" was a Java bug affecting certain Mac versions of Java. Can you tell me what version of OS X and what version of Java you are running?

BuissonNeth commented 10 years ago

My version of OS X is 10.7.5 and version of Java is 7 update 51.

ghost commented 10 years ago

I'm running Mavericks 10.9.2 and Java 7 update 51 and I can't get it to track my games either. It detects the screen, mode but not turns or outcome of games. Ideas?

ScarletBro commented 10 years ago

I am having the same issue on Lion with Java 7. I will post my log files when I get home.

Edit: Here is the text that I get when I run the terminal command posted by gtch.

18:32:14,580 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy] 18:32:14,580 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml] 18:32:14,580 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/Applications/HearthStats.app/Contents/Java/HearthStatsUploader-OSX.jar!/logback.xml] 18:32:14,603 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@40505fd8 - URL [jar:file:/Applications/HearthStats.app/Contents/Java/HearthStatsUploader-OSX.jar!/logback.xml] is not of type file 18:32:14,721 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeFilter scanning period to 5 seconds 18:32:14,722 |-INFO in ReconfigureOnChangeFilter{invocationCounter=0} - Will scan for changes in [[]] every 5 seconds. 18:32:14,722 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Adding ReconfigureOnChangeFilter as a turbo filter 18:32:16,070 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] 18:32:16,076 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT] 18:32:16,104 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 18:32:16,156 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.FileAppender] 18:32:16,158 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE] 18:32:16,164 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 18:32:16,167 |-INFO in ch.qos.logback.core.FileAppender[FILE] - File property is set to [Library/Application Support/HearthStatsUploader/log.txt] 18:32:16,170 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [net.hearthstats.log.LogPaneAppender] 18:32:16,191 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [APP] 18:32:16,193 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [net.hearthstats.app] to INFO 18:32:16,193 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [APP] to Logger[net.hearthstats.app] 18:32:16,194 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [net.hearthstats] to INFO 18:32:16,194 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO 18:32:16,195 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT] 18:32:16,195 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT] 18:32:16,195 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration. 18:32:16,197 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@59cde83a - Registering current configuration as safe fallback point SLF4J: The following set of substitute loggers may have been accessed SLF4J: during the initialization phase. Logging calls during this SLF4J: phase were not honored. However, subsequent logging calls to these SLF4J: loggers will work as normally expected. SLF4J: See also http://www.slf4j.org/codes.html#substituteLogger SLF4J: net.hearthstats.app 18:32:17.313 - ** 18:32:17.318 - Starting HearthStats.net Uploader 0.16.1 on OSX 18:32:17.320 - os.name=Mac OS X 18:32:17.320 - os.version=10.7.5 18:32:17.320 - os.arch=x86_64 18:32:17.320 - java.runtime.version=1.7.0_55-b13 18:32:17.320 - java.class.path=/Applications/HearthStats.app/Contents/Java/Classes:/Applications/HearthStats.app/Contents/Java/HearthStatsUploader-OSX.jar 18:32:17.321 - user.language=en 18:32:17.321 - ** May 6 18:32:17 whitneyderssmbp JavaAppLauncher[5897] : CGContextGetCTM: invalid context 0x0 May 6 18:32:17 whitneyderssmbp JavaAppLauncher[5897] : CGContextSetBaseCTM: invalid context 0x0 May 6 18:32:17 whitneyderssmbp JavaAppLauncher[5897] : CGContextGetCTM: invalid context 0x0 May 6 18:32:17 whitneyderssmbp JavaAppLauncher[5897] : CGContextSetBaseCTM: invalid context 0x0 18:32:17.967 - HearthStats.net Uploader v0.16.1-OSX 18:32:17.973 - 1 - Set your deck slots on the "Decks" tab 18:32:17.974 - 2 - Run Hearthstone in windowed or full-screen mode 18:32:17.975 - 3 - Look for event notifications in this log and bottom right of screen (windowed mode only) 18:32:17.976 - 4 - Submit feedback here (please copy and paste your log file in /Users/saunderswp/Library/Application Support/HearthStatsUploader/log.txt) 18:32:17.977 - Checking for updates ... 18:32:19.225 - Latest version available: 0.16.1 18:32:19.228 - Waiting for Hearthstone ...

MrRyansan commented 10 years ago

I have the same problem. Hearthstats indicates it detected Hearthstone but then fails to detect anything else such as the game being played, deck, doesn't record anything etc. Even though the popup said Hearthstone detected, the app still says "Waiting for Hearthstone...".

I am running OSX 10.7.5 with Java version 7 and Hearthstats v0.17.0-OSX

Thanks for all the hard work!

gtch commented 10 years ago

Thanks for these reports. I reckon it might be something to do with OS X Lion, because I've had a few reports of problems on Lion so far. I don't have Lion installed but I think I still have the installer around so when I get a chance I'll try running it myself on Lion and see what I can find out.

MrRyansan commented 10 years ago

Yes I noticed others with Lion issues too, so thanks for looking into it! I'm using the PC version in the meantime... still saving up for a new iMac!

Great work so far man!

Ryan

Sent from my iPhone

On May 8, 2014, at 3:44 AM, "Charles Gutjahr - notifications@github.com" github.stubby.63642b0836.notifications#github.com@ob.0sg.net wrote:

Thanks for these reports. I reckon it might be something to do with OS X Lion, because I've had a few reports of problems on Lion so far. I don't have Lion installed but I think I still have the installer around so when I get a chance I'll try running it myself on Lion and see what I can find out.

— Reply to this email directly or view it on GitHubhttps://github.com/HearthStats/HearthStats.net-Uploader/issues/196#issuecomment-42536109 .