organice icon indicating copy to clipboard operation
organice copied to clipboard

iOS 7.1.2 support (10 year old browser cannot parse the current JS)

Open leonchas17 opened this issue 1 year ago • 11 comments

Hello! Newbie user here. First of all, congratulations on a great idea and a great piece of software, keep it up! On to my issue: I'm trying to access organice from an iPhone 4 with iOS 7.1.2 (I know... a veritable fossil, but it's what I can currently afford...). JavaScript is enabled on my Safari but if i try to reach https://organice.200ok.ch all i get is a blank page (If i do disable JavaScript for Safari, i get "It looks like you don't have javaScript enabled, but organice is a big fancy react app..." etc.). I thought this behavior could be related to organice being in a https page, because i know that Safari from iOS7 won't behave properly on https pages. Therefore, i decided to deploy my own instance from the provided docker image. It went reasonably well, and i can can access organice on my localhost from newer iPhones, using my ip address, but unfortunately i still get the blank page on my iPhone4. Any thoughts, suggestions, etc will be much appreciated. Best Leon

leonchas17 avatar Sep 08 '22 18:09 leonchas17

For the sake of completeness i have to mention that the organice instance deployed from the docker image is served from a http page, not a https.

leonchas17 avatar Sep 08 '22 18:09 leonchas17

Hi Leon, I sometimes see blank pages in JS apps (not on iPhone though) when there are cache problems. Maybe you can try to clear the browser cache?

You could also try a different browsers maybe. For Android, there is Chrome and Firefox, for example.

schoettl avatar Sep 08 '22 18:09 schoettl

Thanks a lot, @schoettl ! I did clear safari's history, cookies and data but to no avail :(
Likewise, I've tried using Chrome, as well as two lesser known browsers (Sleipnir and UC Browser) from that phone, but no joy.

leonchas17 avatar Sep 08 '22 19:09 leonchas17

Using other browsers in iOS isn’t likely to help. All browsers on iOS have to use the same engine as safari, they are not independent as on other platforms.

I’m afraid if it doesn’t work, there’s not a lot we can do about it. iOS 7 is 9 years old now and mobile safari has always lagged behind in development compared to other browsers (still no web notifications for example).

If you really want to find out what’s going amiss, you’re the only person capable of doing so, because you have the device that’s required for it. Hook it up to a Mac, enable Safari developer mode and check the JavaScript console. If you’re lucky, Safari will throw an error on whatever it does not want to run^^

Happy to hear your iPhone 4 is still going strong! It has a great form factor which has been my favorite for a long time^^

Also, thank you for the kind words🙏🏻I hope you will be able to run organice and make good use of it!

munen avatar Sep 08 '22 19:09 munen

Ok, thanks!

I'll see what i can do, and i'll keep you posted if i find anything worthwhile (but don't hold your breath ;) ).

iPhone 4 is a great little device. I mentioned being cash strapped as one of the reasons i'm still using it, but of course there's also its form factor and its battery life, not to mention the fact that i feel programmed obsolescence is a bad deal on the planet and its inhabitants. Or maybe i just enjoy sticking it up to the man in Cupertino.

leonchas17 avatar Sep 08 '22 22:09 leonchas17

I was unable to get any info from the web inspector, either on my localhost instance, or the one from organice.200ok.ch: image But! it turns out, before iOS 6, Safari had a built-in debug console. And, what do you know, i happened to have an iPod Touch even older than my iPhone, running iOS 5.1, so i pointed said debug console to both organice.200ok.ch and my own localhost:5000 and Lo and Behold! i got some error messages! They're the same messages for both servers. Since i'm hopeless in JavaScript I was thinking of transcribing them here to see i you can help me make sense of them, but i don't know if it's good form. Do let me know.

leonchas17 avatar Sep 09 '22 00:09 leonchas17

Is it OK if i post the error messages here? I wouldn't want to compromise organice by unwittingly revealing vulnerabilities, or anything like that. I don't think there are any, but since i have zero JavaScript knowledge...

leonchas17 avatar Sep 09 '22 18:09 leonchas17

You are welcome to post errors here. organice is FOSS, so nothing is hidden. Also, it’s unlikely we’ll find a vulnerability here^^

munen avatar Sep 10 '22 06:09 munen

Ok. Here are the 4 messages i get when i try to visit https://organice.200ok.ch/

(1) [X] JavaScript: Error on Line 1 https://organice.200ok.ch/ SyntaxError: Parse error

(2) [X] JavaScript: Error undefined TypeError: 'undefined' is not a function

(3) [X] JavaScript: Error on Line 2 https://organice.200ok.ch/static/js/2.defd798a.chunk.js SyntaxError: Parse error

(4) [X] JavaScript: Error on Line 1 https://organice.200ok.ch/static/js/main.1374f54c.chunk.js SyntaxError: Parse error

The messages i get when i visit my own localhost:5000 are also very similar, except for the small bits before ".chunk.js" on the third and the fourth messages

leonchas17 avatar Sep 10 '22 16:09 leonchas17

Well, it’s pretty clear, then. The browser is 10 years old and it does not understand the code whatsoever. It’s not tripping up at a specific functionality/feature, it cannot read it all.

If you wanted to continue looking into a solution the way forward would be to check if webpack can transpile JS into a way older version of EcmaScript and then retry. Doing so for the mainline build of organice is likely unproductive as it will yield in a larger bundle size. Good luck🤞

munen avatar Sep 10 '22 16:09 munen

OK. Sounds like it's way out of my league, but i may give it a shot. Or, maybe it's time to burst my bubble and retire the IPhone 4. Anyway, thanks a lot for all the help and for your patience!

leonchas17 avatar Sep 11 '22 00:09 leonchas17