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

Everything I did in the last few days had not really been sent to HackerNews #133

Open
Gabr-F opened this issue Nov 12, 2023 · 8 comments
Open
Labels
bug Something isn't working

Comments

@Gabr-F
Copy link

Gabr-F commented Nov 12, 2023

I've been using Glider for a few months, always the F-Droid versions.

I believe I upgraded to the 2.* version a week to 10 days ago.

I'm not sure if I began with the 2.0.0 version or if the 2.1.0 directly, but I've been using the 2.1.0 for at least several days (logging-in only once after the 2.* update).

Today I found out that everything I've done from Glider in at least the last two days had not really been successfully sent to HackerNews (I realized it by using HackerNews from a browser).

I had only made a handful of not-so-important comments, so I didn't verify yet that they had really been submitted (I became accustomed to Glider not displaying the newly sent comments immediately, so I was not concerned by not seeing them).

I did upvote a lot of comments and posts though, and I realized that those upvotes had not really been sent either

My last successfully recorded action is from three days ago, and I'm actually not sure I performed it from within Glider, I might have done it from the browser.

I was logged in in Glider.

I'm almost (but not 100%) sure that I did verify that submitting comments initially worked, after my first update to the 2.*versions.

Today I updated to 2.2.0 and it still didn't work (neither submitting comments nor upvoting - I didn't try to send a new post); it still didn't work after force-stopping and clearing the cache, but it finally began to work again after logging out and back in.

I don't know if I can provide any more details, I can't access Glider's internal folders or logs.

For sure there's something that can break and not enough checks that an action has really succeeded though.

There might be other users that have the same problem but have still not realized it.

I'm on an Android 10.

@Mosc Mosc added the bug Something isn't working label Nov 12, 2023
@Mosc
Copy link
Owner

Mosc commented Nov 12, 2023

That's very unfortunate. Interactions have worked fine on my end, but I can agree with the fact that error handling and reporting need improvement.

@Gabr-F
Copy link
Author

Gabr-F commented Nov 12, 2023

Yes, it's ok, but irregardless of the root cause of what happened to me, it definitely seems appropriate to have better error handling (at least when sending comments, submissions etc.)

Congratulations for the work though!

@Gabr-F
Copy link
Author

Gabr-F commented Nov 13, 2023

So, I realized that I probably didn't really verify that I was "logged in" in Glider while I was having the problem (as in, Glider having a still-valid authentication cookie ).

What I'm sure is that Glider still remembered which my profile was, because the Inbox section and the Account menu bringed up the (public) data from my account.
But it actually seems very likely that even if it still remembered the authentication cookie, that cookie was not valid anymore (maybe simply because the server didn't consider it valid anymore).

Although in the 1.* versions I was able to stay logged-in for probably weeks without problems.

@Mosc
Copy link
Owner

Mosc commented Nov 13, 2023

Yes, your explanation sounds likely. It's difficult to know what caused the server to invalidate the token. By default the cookie doesn't really have an expiry date, so I think (and hope) that for most users this will not be a problem. In earlier versions the app would store the password rather than the cookie, so this problem would not occur as long as the user did not change their password. But that had its own set of issues (#63).

What makes error handling complicated is that upvoting, etc. does not happen through any official API, we're just sending a request similar to how the website itself would and hoping that it takes effect. It will require more network traffic analysis to figure out how to differentiate between succeeded and failed calls. If I remember correctly the server doesn't neatly return sensible HTTP error codes.

@Mosc
Copy link
Owner

Mosc commented Nov 15, 2023

Although it's just a start in terms of solving the greater issue, in c68781e I've made a change that at least causes a snackbar to be shown when an action fails.

@x011

This comment was marked as off-topic.

@Mosc
Copy link
Owner

Mosc commented Nov 27, 2023

@x011 I understand your frustration, but this type of contribution is unhelpful. It conflates unrelated topics and adds nothing to the conversation.

@Gabr-F
Copy link
Author

Gabr-F commented Dec 10, 2023

Hi, I'm sorry that I vanished; the recent versions do work much better, in that they seem to always report an error when a new comment or upvote doesn't succeed.

I did lose access (relatively) frequently, but it might not be that much of a problem if you're told when an action doesn't succeed.

I'll strive to find some time to look more into these problems.

Thanks for the work anyhow !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants