wakatime / atom-wakatime

Atom plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/atom
BSD 3-Clause "New" or "Revised" License
318 stars 30 forks source link

Doesn't seem to work #9

Closed roman01la closed 9 years ago

roman01la commented 9 years ago

I've followed all installation steps, did some code for an hour, but still no data in my dashboard. Also I can't see .waka* files being created in my home directory.

alanhamlett commented 9 years ago

What OS are you using?

roman01la commented 9 years ago

OS X Yosemite 10.10.2

FYI: Vim plugin works just fine.

alanhamlett commented 9 years ago

Can you open dev console and check for error messages?

View -> Developer -> Toggle Developer Tools

roman01la commented 9 years ago

No errors, WakaTime v4.0.1 loaded.

roman01la commented 9 years ago

Ok. After trying Vim plugin, Atom plugin is working now. Looks like it won't initialize.

alanhamlett commented 9 years ago

Ok, so it's working now? Can you go to https://wakatime.com/api/v1/users/current/stats/last_7_days and see if you have logged time from Atom editor?

roman01la commented 9 years ago

Yes, everything is perfectly ok. But, for some reason, Atom plugin started to log time only after I tried Vim plugin. It seems to me, that Atom plugin didn't work because of absence of .wakatime.* files in home directory. And so it started working only after I tried Vim plugin, which created these files.

asennikov commented 9 years ago

Seems like I'm experiencing the same issue, but installing vim plugin didn't actually fix it. The .wakatime.* files are present, I even have some records in .wakatime.log, but there is nothing at dashboard.

Can you help me debug this issue somehow properly?

alanhamlett commented 9 years ago

@asennikov Sure:

$ sqlite3 ~/.wakatime.db
SQLite version 3.8.5 2014-08-15 22:37:57
Enter ".help" for usage hints.
sqlite> select count(*) from heartbeat;
0
sqlite> .quit
asennikov commented 9 years ago

@alanhamlett seems like it started working from some point in time... Cause I've only started to walk through you hints, and then checked my account and all the data is already there.

Sorry, for not very accurate info - I'll try it again on another machine in the near future.

Chrisedmo commented 9 years ago

I'm also having trouble getting this plug in to work. It worked flawlessly in ST2/3.

It's not logging time at all.

Here is a sample log:

{"now": "2015/05/01 15:47:13 +0100", "version": "4.0.8", "plugin": "atom-wakatime/4.0.4", "time": 1430491631.750546, "file": "/Users/namehere/Library/Caches/Cleanup At Startup/Transmit/1DCCD2D8-7F4D-4743-8023-295A47D5C542/index.php", "level": "WARNING", "message": "%s"}
{"now": "2015/05/01 15:47:39 +0100", "version": "4.0.8", "plugin": "atom-wakatime/4.0.4", "time": 1430491658.566221, "file": "/Users/namehere/Library/Caches/Cleanup At Startup/Transmit/45B61692-513E-4C8D-849C-736ADF51C149/index.php", "level": "WARNING", "message": "%s"}
{"now": "2015/05/05 10:25:55 +0100", "version": "4.0.8", "plugin": "atom-wakatime/4.0.6", "time": 1430817953.595766, "file": "/Users/namehere/Desktop/LOUVRE_EMAIL_SIGS/Gruntfile.js", "level": "WARNING", "message": "%s"}

Atom: 0.196.0, and the latest Wakatime plugin.

Thanks.

alanhamlett commented 9 years ago

Can you check for error messages in your Atom Developer Console?

Those messages are from wakatime cli, and not sure what is causing those warning messages. You can try turning on debug = true in your ~/.wakatime.cfg file to see if Atom is sending heartbeats.

I've just updated wakatime cli to include the package namespace and line number for all log messages, but you will have to re-install atom-wakatime to get the new wakatime cli version.

Chrisedmo commented 9 years ago

Thanks for getting back. I have uninstalled the plugin in and re-installed it. When i did this and ran it, in the dev console, there was an error message about a file not being found, but then it began to download/update the wakatime CLI. So i restarted again, and there was no more errors in the console.

I then set debug to true, and just tested a few files, and this is the output in my log:

{"now": "2015/05/05 23:14:30 +0100", "package": "logging", "lineno": 1711, "version": "4.0.8", "plugin": "atom-wakatime/4.0.6", "time": 1430864070.577819, "file": "/Users/username/Documents/Sites/rh/.htaccess", "level": "WARNING", "message": "%s"}
{"now": "2015/05/05 23:14:31 +0100", "package": "wakatime", "lineno": 378, "version": "4.0.8", "plugin": "atom-wakatime/4.0.6", "time": 1430864070.577819, "file": "/Users/username/Documents/Sites/rh/.htaccess", "level": "DEBUG", "message": {"response_code": 201}}

The only thing that is unusual about my Atom install is that I have synced my settings folder, like this:

$ mv ~/.atom ~/Dropbox/Apps/Atom

$ ln -s ~/Dropbox/Apps/Atom ~/.atom
alanhamlett commented 9 years ago

The "response_code": 201 means your heartbeat was sent correctly from Atom to the WakaTime api. It should be logging time now, right?

Using dropbox for your .atom folder shouldn't cause any problems.

alanhamlett commented 9 years ago

OK, found the issue was caused by not sending heartbeats after saving a file in Atom. It's fixed in v4.0.7.

For previous days, you can uncheck the box in settings which hides projects without writes: https://wakatime.com/settings/preferences