thorrak / tiltbridge

Tilt Hydrometer to WiFi Bridge
http://www.tiltbridge.com/
Other
61 stars 27 forks source link

Add note on 404 error #183

Closed nightcrawler91 closed 3 years ago

nightcrawler91 commented 3 years ago

I first saw this as an error in the Tiltbridge itself, it wasn't until later that I noticed that it was just part of the initial setup.

thorrak commented 3 years ago

Hey there - and thanks for the PR!

Just to understand what you were seeing, when you attempted to navigate to the URL of your TiltBridge, did you get a 404 error just initially (like - it flashed a 404 and then navigated to the TiltBridge after a half-second or so) or did you experience something else?

nightcrawler91 commented 3 years ago

Hey there - and thanks for the PR!

Just to understand what you were seeing, when you attempted to navigate to the URL of your TiltBridge, did you get a 404 error just initially (like - it flashed a 404 and then navigated to the TiltBridge after a half-second or so) or did you experience something else?

The portal was actually loading fine, but in the home page on the area where the current results being read by the tilt are displayed, before I configured it to work (I'm using Brewfather) I saw this: https://photos.app.goo.gl/UstNBgCSmNHxwigo8 (I even took a picture to ask a friend if I had somehow screwed things up). Later once I had configured everything, this changed to show my tilt readings, so I am thinking that this is mostly the home page trying to load data from a source that has not been configured yet.

thorrak commented 3 years ago

Huh. That's odd. You didn't happen to grab a screenshot including the full URL you were trying to access, did you?

I actually think there may be a bug here that needs to be squished.

nightcrawler91 commented 3 years ago

Sorry :( I just quickly took this with my phone to troubleshoot with my friend and because it fixed itself later I didn't think much of it. I thought this was just a part of the initial setup and that's why I issued a PR to update the docs just because I thought others could also get confused.

thorrak commented 3 years ago

All good! Now that I know there's a potential issue, I can try to track it down!

Thank you!

thorrak commented 3 years ago

I poked through the code a bit, and unfortunately nothing obvious is jumping out. Just to be sure I understand the chain of events, is the following what happened:

  1. You built/flashed the TiltBridge
  2. You plugged it in, and it spun up the configuration AP
  3. You connected to the configuration AP and set the TiltBridge to connect to your WiFi network
  4. The TiltBridge restarted, connected to your WiFi, and you reconnected your device to your WiFi network as well
  5. You attempted to access http://tiltbridge.local/ and got the 404 page you posted a screenshot of
nightcrawler91 commented 3 years ago

Just like that!

thorrak commented 3 years ago

Unfortunately, I can't replicate this issue on my end. :(

I've tried reinstalling/reconfiguring my TiltBridge, and things seem to be working as expected. The only thing I can think is that something was already in your URL when you attempted to access the page - potentially something left over from a previous configuration attempt. It doesn't make much sense, but that's my best guess at the moment.

I'll keep this in mind and will try to debug further if I encounter it in the future. For now though, I'm going to close this PR.