passiomatic / coldsweat

Web RSS aggregator and reader compatible with the Fever API
MIT License
146 stars 21 forks source link

Dashboard question #12

Closed chrisbgp closed 11 years ago

chrisbgp commented 11 years ago

Hello,

my dashboard looks completely different and I cannot add a user. I only see the top right box called "Configure Your Feed Reader".

I attached a screenshot to make the problem more clear: coldsweat

passiomatic commented 11 years ago

You are looking at the Fever endpoint, I guess. What does it happen if you load the top level domain (without the /fever bit) that I'm seeing in the screenshot?

Also, in the 0.7 version there isn't the ability to create a new user, one ends up to use the default one. Please take a look to User.DEFAULT_CREDENTIALS values in coldsweat/models.py. Alternatively for now you can manually alter the "users" table in the database to change credentials.

chrisbgp commented 11 years ago

Thanks for the quick answer! Indeed, when I change the location to / on nginx I see the same dashboard as on your screenshot. However the default/default credentials do not seem to work.

Tried connecting via reeder on my iphone and just now tried to add a feed via the webinterface...

passiomatic commented 11 years ago

If you didn't import any feed with the import_feeds.py script the database could be empty. Try this, change to the Coldsweat installation dir (the one with the README file) and type:

Underworld:coldsweat$ python 
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from coldsweat.models import * 
>>> connect()
>>> setup('default', 'default')
>>> ^D

This will create the "default" user if for whatever reason hasn't been created before.

chrisbgp commented 11 years ago

Tried that and I did import some feeds before as well. The number "active feeds" does not change.

Could HTTPS be the problem?

I am using nginx to connect to the app...

chrisbgp commented 11 years ago

Switching to HTTP instead of HTTPS worked for the dashboard. I can add feeds now.

However connecting via Reeder on my iphone still gives me "Login failed". Reeder also expects an email address as login.

passiomatic commented 11 years ago

Could you post a screenshot of the dashboard? Active feeds should be > 0 if you previously imported some feeds.

Could HTTPS be the problem?

Could be. Actually there isn't any support for HTTPS in Coldsweat. I would be happy to add it, but I don't have any idea on how to do it.

passiomatic commented 11 years ago

However connecting via Reeder on my iphone still gives me "Login failed"

You are using the Fever API endpoint URL for that, right? The one with the /fever bit at the end.

passiomatic commented 11 years ago

Oh BTW, I've opened issue #13 for HTTPS support.

chrisbgp commented 11 years ago

Yes I am using http://domain/fever

I just noticed that I get two different error messages depending on correct and wrong credentials. So the connection seems to work. Maybe it is a client problem since Reeder expects an Email-Address as login...

passiomatic commented 11 years ago

I'm using Reeder for iOS too and it works as expected if I specify the Fever username instead of e-mail. You should take a look at the coldsweat.log file, if it is set at DEBUG level - and I guess it is - you should see Reeder attempts to authenticate.

chrisbgp commented 11 years ago

This is what it says...Sorry but I am no python guy:

localhost - - [17/Jul/2013:17:27:32 +0000] 17478 DEBUG client from xxx requested: NestedMultiDict([(u'api', u''), ('api_key', u'caab4f2cesdgdgdhhde95c2b8477aa')]) localhost - - [17/Jul/2013:17:27:32 +0000] 17478 ERROR Traceback (most recent call last): File "/var/coldsweat/coldsweat/app.py", line 189, in call app_iter = self.app(environ, start_response)

File "/var/coldsweat/coldsweat/app.py", line 249, in call return self._initial(environ, start_response)

File "/var/coldsweat/coldsweat/app.py", line 240, in _initial return self.app(environ, session_response)

File "/var/coldsweat/coldsweat/app.py", line 71, in call r = view(ctx, *args)

File "/var/coldsweat/coldsweat/fever.py", line 253, in endpoint result.last_refreshed_on_time = get_last_refreshed_on_time()

File "/var/coldsweat/coldsweat/fever.py", line 441, in get_last_refreshed_on_time return datetime_as_epoch(last_checked_on)

File "/var/coldsweat/coldsweat/utilities.py", line 56, in datetime_as_epoch return int(timegm(value.utctimetuple()))

AttributeError: 'NoneType' object has no attribute 'utctimetuple'

passiomatic commented 11 years ago

Auth seems ok, it is the last_refreshed_on_time calculation that seems to fail. It might be easy to fix or... not. I'll look into it this evening.

If you have the Peewee version => 2.1.3 it is a Coldsweat bug, otherwise it is a Peewee bug. :)

Are you using sqlite or MySQL?

chrisbgp commented 11 years ago

peewee==2.1.3

Using sqlite for the tryout

Many thanks for your support!

passiomatic commented 11 years ago

I've updated the coldsweat/fever.py file to cope with the corner case where all Feed.last_checked_on columns were null. It's likely to be the cause of your issue.

chrisbgp commented 11 years ago

Yes it does work now ;-) Thanks for fixing this!