Site won't load on MacOS Safari or iOS Mobile Browsers

PLEASE READ THIS BEFORE POSTING: Read before posting / reporting bugs

Describe the problem you’re having:

Using iOS 13.2.2 Safari, Firefox and Chrome (with latest updates) I had to try to access my instance from a browser. When I log in it goes to the “Loading, please wait…” page but doesn’t go any further. I normally use the TT-RSS app by Tiberius so this isn’t a huge deal but I figured I would report it with whatever info I can in case there is some underlying issue here.

I also tried it on my wife’s MacBook and same issue on Safari there. Site loads on Firefox and Chrome on my Windows laptop so I assume this is a Mac specific issue. Yes I am aware the simple solution is to throw away all the Apple devices. Would if I could.

If possible include steps to reproduce the problem:

Open tt-rss on MacOS Safari or iOS mobile browser. I tested Safari, Firefox and Chrome.

tt-rss version (including git commit id):

tt-rss git v19.12-0237dee98

Platform (i.e. Linux distro, PHP, PostgreSQL, etc) versions:

debian 10, PHP 7.3.11-1~deb10u1, PostgreSQL 12.1

Please provide any additional information below:

I cleared the cache on Safari and that didn’t change anything.

In the Safari console on the MacBook I saw this:

[Error] TypeError: undefined is not an object (evaluating ‘App.Error’)
(anonymous function) — tt-rss.js:595
(anonymous function) — dojo.js:8:139007
_505 — dojo.js:8:138629
(anonymous function) — dojo.js:8:4039
_b — dojo.js:8:532
(anonymous function) — dojo.js:8:3997
_38 — dojo.js:8:14154
_81 — dojo.js:8:14203
_f6 — dojo.js:8:15989
_10b — dojo.js:8:18919

(anonymous function) (dojo.js:8:21140)
(anonymous function) (dojo.js:8:4039)
_b (dojo.js:8:532)
(anonymous function) (dojo.js:8:3997)
_505 (dojo.js:8:138686)
(anonymous function) (dojo.js:8:4039)
_b (dojo.js:8:532)
(anonymous function) (dojo.js:8:3997)
_38 (dojo.js:8:14154)
_81 (dojo.js:8:14203)
_f6 (dojo.js:8:15989)
_10b (dojo.js:8:18919)

I am not a software guy but I can follow directions well enough to get any information you might need.

Edit: forgot to mention that there isn’t anything in the tt-rss logs either. I haven’t checked the server logs yet but I will post back here if there is anything.

I can’t test anything on Safari (even if I wanted to) so i’m afraid I can’t help you. My suggestion would be not using outdated disfunctional browsers on a closed proprietary platform.

If someone bothers to investigate, provides a patch and it won’t be ugly, I’ll merge it.

git bisect it?

I don’t really use the MacBook much so not an issue really. I do have an iPhone and if it weren’t for work I would ditch it. Like I said I use the app and it still works so no big deal.

I’ll give it a go. Always up for a new adventure so I’ll figure out how to do that and post back when I’ve got some results.

if you manage to bisect it, don’t forget to post the results here.

Done but it turns out I just needed to go back one commit. It’s the last one that broke it.

commit 0237dee980157554ab2c9a79b6e9d10cec9e2f3a (HEAD → master, origin/master, origin/HEAD)
Author: Andrew Dolgov [email protected]

implement automatic night mode detection using MQL
add separate light.css to force light theme
remove manual night mode toggle and related code

Like I said not a big deal on my end. I just figured I would point this out before someone else comes on here ranting about it. Even though I know they will anyway. Thanks for the help.

One last thing I’ll mention though not sure if it’s relevant or not. I do have javascript enabled in Safari.

well, obviously. otherwise nothing would work.

anyway, if this is media query language related, someone who has access to safari will have to debug. maybe wrapping AppBase.setupNightModeDetection() into try … catch would be enough, it’s not like this is important code. if it fails, nothing of value is lost. you can try it yourself.

I did, and surprisingly my life still goes on. Debian on the desktop and Windows on my laptop. Linux has come a long way over the years in the desktop environment area.

I can confirm recent changes breaks Mobile Safari. The problem, of course, is that iOS doesn’t let you open a web inspector on the device itself. You have to tether to a Mac and see the results there. Of course I don’t have a Mac so I can see the exact error, but I’ll fiddle around with it.

I can confirm that wrapping everything in setupNightModeDetection lets Safari work again. Later when I’m not working I can try and narrow down a better fix.

Thanks again Fox!

next step is posting a pull request :slight_smile:

Ha well as I said I am not a software guy. I hang around here because I like watching people make a fool out of themselves and now I’m that guy. Wonderful…I’ll go back to lurking.

I’ve got a linux desktop and I’ve got no complaints. The iphone is through work so that’s the issue. My wife has an old macbook because…well she’s a woman and more expensive is better when you’ve got 2 x chromosomes.

Enough tangents…thanks again for the software.

More testing and from everything I can gather it seems Safari simply doesn’t support matchMedia event handlers, which is stupid. Still it does seem to handle the call on load; in other words, on the initial load it will honor the light/dark setting but it won’t change dynamically. I’ll submit a PR shortly after a bit more testing.

e: Source: MediaQueryList: change event - Web APIs | MDN

e2: PR: https://git.tt-rss.org/fox/tt-rss/pulls/129

ah it probably wants legacy syntax, maybe instead of try-catch it should check whether method exists.

legacy one was addListener or something and it probably supports that one instead but we are not going to implement legacy shit because of safari.

e: it should be something like typeof mql.addEventListener etc

Yeah, I tried that (.addListener) during testing and it still didn’t work. :man_shrugging:

oh well, i’ll merge it then. thanks!

The other reason I like to hang around here is because you guys get shit done. It’s loading on all the mobile browsers again. Even with javascript enabled. :wink: Thanks again.

Much appreciated guys!

fwiw, this latest commit / merge from JustAMacUser fixes a no load from login issue I was having after the recent changes to tt-rss with a non-Mac browser (in both linux and windows). A browser that will go unnamed. Oh, ok, I’ll name it ==> Pale Moon (28.8.0 64-bit). Let the derision begin…

Still some sort of page loading issue when going into Preferences but a slight resizing of the browser window or minimize/unminimize the browser window or simply pressing F12 a couple of times fixes that weirdness. At least until the the next time I open Preferences. idk?
.

Does the console report anything?

Here’s a link to the output from the console while going from the tt-rss main screen to Preferences, then re-sizing the browser window to get the re-drawing right and then exiting Preferences again. I’m clueless as to whether any of the output is relevant?

btw, I typed before that minimize/unminimize the browser window got the Preferences screen to look right. Wrong! Slightly re-sizing the browser window or F12 (or F11) twice is what works every time.

Here’s a screenshot of what I see when first entering Preferences (Pale Moon --safe-mode)

.

.