tylerbwong / stack

An Android app for browsing Stack Overflow and other Stack Exchange sites.
https://stack.tylerbwong.me
GNU General Public License v3.0
510 stars 34 forks source link

"Network error" #93

Closed XPMai closed 3 years ago

XPMai commented 3 years ago

Describe the bug When I open Stack app, I cannot browse anything because it says "Network error"

To Reproduce Steps to reproduce the behavior:

  1. Open Stack app
  2. Press on a post
  3. "Network error" Screenshot_20201021-145806_Stack

Expected behavior Load the content

Screenshots If applicable, add screenshots to help explain your problem.

Device Info (please complete the following information):

Additional context This issue didn't exist when I first installed it

tylerbwong commented 3 years ago

Hey @XPMai thanks for reporting this. If possible do you think you can provide me with more info?

  1. Are you logged in? and if so
  2. Do you have any saved bookmarks or answer drafts?
  3. Do you happen to have a link to the question you were trying to view?
tylerbwong commented 3 years ago

Another thing, does clearing app data fix the issue at all?

There was a point in time where I uploaded an old release to the Play Store that did not have a proper database migration, so there is a chance that upgrading from an older version of the app might have caused this.

SpeedyLom commented 3 years ago

I'm also getting this but from the search screen.

When the search screen loads if I click on a popular tag (e.g. php) it'll often display Network error.

I am logged into the app and don't have any drafts saved.

Screenshot_20201104-162845.jpg

tylerbwong commented 3 years ago

Hey @SpeedyLom, thanks for the detailed report and screenshot.

Just to make sure, do other parts of the app work? (question details, bookmarks, etc.) I remember you mentioned profiles also show "Network error" for you intermittently as well.

Also, does the issue persist if you log out?

A few things that I think could be related to this issue are:

  1. Somehow a bad auth token is getting appended.
  2. The StackExchange API itself is returning an internal error that we can't control. (I've been seeing a few 503s returned from the API on my end)
SpeedyLom commented 3 years ago

The list of questions always loads as far as I have seen.

The next time it happens I'll try the other bits and come back to you.

SpeedyLom commented 3 years ago

I got some screenshots of the other screens when it happens. Once I logged out and logged back in again I was able to use the app as expected.

I'll let you know if it happens anymore now that I have refreshed my login.

Question details

question

Search

search

Profile

profile

tylerbwong commented 3 years ago

@SpeedyLom Thanks so much for the screenshots and refreshing login. I suspect somehow the existing access token got invalidated and was causing errors in the request. I'll continue to look into how this could've happened. Again, really appreciate the reports!

SpeedyLom commented 3 years ago

I am still getting the issue since I refreshing the login last time 😔

tylerbwong commented 3 years ago

@SpeedyLom I'm so sorry this keeps happening to you :disappointed:.

If you are willing, I'd really like to connect further so that we can work more closely on this issue. Feel free to shoot me an e-mail at tbwong3@gmail.com if you'd like, since debugging authentication issues can be sensitive. Unfortunately I'm not able to see much info on my side since error logs are a bit vague so the next best thing would be to install a debug build so you can inspect HTTP logs.

tylerbwong commented 3 years ago

Ok good news! I encountered this error during development on one of my devices and it does not seem to be related to authentication at all. There's a bug somewhere that is causing a ton of requests to be made to the Stack Exchange API at once, and the server is responding with a 503 error. Will be looking into fixing this bug soon :+1:

tylerbwong commented 3 years ago

@XPMai @SpeedyLom Thank you both once again for helping track down this issue! I just uploaded a new release to the Play Store and it is under review. Hopefully we'll see this fixed once it goes live. Edit: It's live!