ConnectedHumber / Air-Quality-Web

The web interface and JSON api for the ConnectedHumber Air Quality Monitoring Project.
https://sensors.connectedhumber.org/
Mozilla Public License 2.0
9 stars 4 forks source link

Issue with web site on some devices #55

Closed CrazyRobMiles closed 4 years ago

CrazyRobMiles commented 4 years ago

The map seems to be locking up for some users. Works OK for me on Chrome but locks up with a greyed out display on IE and Safari.

image

CrazyRobMiles commented 4 years ago

It looks like it might be this: image The message doesn't appear on a working load.

CrazyRobMiles commented 4 years ago

Ha. Ignore that. Just done a reload on the working page and it worked fine, with that error. I've had a look at the code and it is just a sensible error message.

CrazyRobMiles commented 4 years ago

Tried some different machines and it works OK on them. Maybe an issue with cookies and the migratin of the url to sensors

bsimmo commented 4 years ago

This happens on all of mine, different browser different devices. theat little box is tippy-tooltip it does not go away and close itself.

Everything loads in the background, but it's not usable.

I think it happened with the most recent update (1.3 or the sensor header change)

BNNorman commented 4 years ago

Works ok on my amazon tablet with Silk browser. Though theres a significant lag between opening a chart and the graph appearing.

sbrl commented 4 years ago

Hey! That looks like the first-run tutorial isn't working correctly. The null cell polygons don't really any thing to do with that bit of the code.

Very strange. Which browsers is this in @CrazyRobMiles & @bsimmo? If it's an issue, we might just have to disable the first-run tutorial.

CrazyRobMiles commented 4 years ago

I'm not sure if it is a browser thing. I think it is more likely that it uses a cookie to determine if it has displayed or not and gets stuck on devices where it hasn't been displayed. Could the change of url affected where it stores the cookie for the first run tutorial? (or am I just completely misunderstanding how it works?)

CrazyRobMiles commented 4 years ago

The first run tutorial is a nice thing to have, but I think we can do without it if it is the cause of the problem.

BNNorman commented 4 years ago

The cookie idea is easy to test. Perhaps ben could flush his out and retry?

bsimmo commented 4 years ago

Already flushed out all the browsers before I posted, happens on chrome, edge and edge-chrome. Mobile and mobile (desktop) and Win10. AQ... and Sensors...

Disable the tutorial for now, test on the beta site to get it to work. See if that is the problem.

Why it has stopped working, I don't know.

On Sun, 27 Oct 2019, 5:20 pm Brian, notifications@github.com wrote:

Tge cookie idea is easy to test. Perhaps ben could flush his out and retry?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ConnectedHumber/Air-Quality-Web/issues/55?email_source=notifications&email_token=ACYAXNZUR5LHDUQNDLEJDMDQQW5WBA5CNFSM4JERG6K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECLDO6A#issuecomment-546715512, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYAXN5F6BUZL3F2Y7WLI4TQQW5WBANCNFSM4JERG6KQ .

BNNorman commented 4 years ago

Hmm, i think you need to bring a failing device to the next meetup otherwise its a lot of guesswork.

bsimmo commented 4 years ago

It is but it needs to be working now.

Bug fix it later on the beta site.

I can't bring the PC :-( and the mobile is just Android 9 with up to date browsers, I think all browser on Android use Chromium underneath.

I could bring the laptop, but it's a school laptop, uses just Edge (EdgeHTML engine) and is locked down of course.

The best I could do above was tell you the module/function the box was from via the dev tools. And that it worked fine before when the title was Air Quality (or whatever it used to say). It could be a chrome/chromium/EdgeHtml change but doubt all three engines had similar changes on two platforms.

I have recorded what it does. but (and in Incognito/Private)

If there is any other logging I can do on the PC?

Not sure how to enable Dev tools etc on Android.

If we're lucky it may just go away.

On Sun, 27 Oct 2019, 7:53 pm Brian, notifications@github.com wrote:

Hmm, i think you need to bring a failing device to the next meetup otherwise its a lot of guesswork.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ConnectedHumber/Air-Quality-Web/issues/55?email_source=notifications&email_token=ACYAXNZVVDB7L42NUYJVRUTQQXPUPA5CNFSM4JERG6K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECLGO5Q#issuecomment-546727798, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYAXN4EWDFDZ4DQG4UVBM3QQXPUPANCNFSM4JERG6KQ .

CrazyRobMiles commented 4 years ago

I’ve seen this problem on my devices. I think we should move the tutorial behind a button so that we can test it.

On 27 Oct 2019, at 20:59, Ben notifications@github.com wrote:

It is but it needs to be working now.

Bug fix it later on the beta site.

Can't bring the PC :-( and the mobile is just Android 9 with up to date browsers. I could bring the laptop, but it's a school laptop, uses just Edge and is locked down of course.

The best I could do above was tell you the module/function the box was from via the dev tools.

And it worked fine before when the title was Air Quality (or whatever it used to say). It could be a chrome/chromium/EdgeHtml change but doubt all three engines had similar changes on two platforms.

One thing I didn't test (yet) is if I actually go through the full introduction as I just hit cancel each time.

If there is any other logging I can do on the PC?

Not sure how to enable Dev tools etc on Android.

If we're lucky it may just go away.

On Sun, 27 Oct 2019, 7:53 pm Brian, notifications@github.com wrote:

Hmm, i think you need to bring a failing device to the next meetup otherwise its a lot of guesswork.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ConnectedHumber/Air-Quality-Web/issues/55?email_source=notifications&email_token=ACYAXNZVVDB7L42NUYJVRUTQQXPUPA5CNFSM4JERG6K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECLGO5Q#issuecomment-546727798, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYAXN4EWDFDZ4DQG4UVBM3QQXPUPANCNFSM4JERG6KQ .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

bsimmo commented 4 years ago

Just looked at this on my PC again. For now you can hit ESC to bypass the failing tutorial (the small rectangular box (Chrome/Edge)

For mobile (Android anyway) devices I would suggest not using it or showing it to anyone for now

(as a side note, you may need to click in the little box and then press ESC) (assuming it is that)

sbrl commented 4 years ago

Whether the tutorial is launched or not is actually checked by using a localStorage key, not a cookie. This is done here:

https://github.com/ConnectedHumber/Air-Quality-Web/blob/dev/client_src/js/Tour.mjs#L141-L154

I could certainly put it behind a button. Let's try that.

sbrl commented 4 years ago

Fixed it. Turns out there was a change in the API in a recent update of Shepard.js, which is used for the tour. It should now be working on the beta version in ~10 minutes.

sbrl commented 4 years ago

There, it should be deployed now. Don't forget to reload without cache with Ctrl + Shift + R, and if you want the first-run wizard to appear again try a private browsing window.

If it works for everyone, then I'll release this to stable.

BNNorman commented 4 years ago

beta works fine on my desktop (Windows 10) using Firefox. However, the 'loading' circles take a long time to end and the charts take a long time to appear.

bsimmo commented 4 years ago

@adamjennison reports it's working for him it works for me on Win10 Chrome, Edge(EdgeHTML) Edge(Chromium) and all the mobile Android device I could test on.

Many thanks, could see any other show stoppers (other than the veroni shading area often picking up the wrong sensor value for the wrong area, but I think we have an issue for that, it doesn't make it unusable)

sbrl commented 4 years ago

Thanks for checking @BNNorman! Yeah, it is taking a while. It's because of the last_seen SQL query - it takes a long time on the dataset we've acquired lol.

Is there an index on readings.s_or_r? I think it might help

@bsimmo: Thanks. Yeah, I need to debug that.... again.

BNNorman commented 4 years ago

Yes there is an index on s_or_r. Last seen would be max(s_or_r).

sbrl commented 4 years ago

Yeah, that's what it uses, @BNNorman. Hrm, might have to rethink that one :-/