go-app icon indicating copy to clipboard operation
go-app copied to clipboard

https://go-app.dev/reference crash on scroll

Open Gys opened this issue 3 years ago • 15 comments

I can open https://go-app.dev/reference in Safari (latest iOS 15.4) on my iPhone X. But as soon as I scroll down (swipe up) a little, the page reloads. The same happens if I tap on the hamburger topleft. In both cases I very briefly see a message like reloading page because an error occured. At some point it stops reloading and simply shows A problem repeatedly occured on "https://go-app.dev/reference".

I tried the same on my iPad (iOS 15.4 as well) and there it works fine. Very strange.

Gys avatar Mar 29 '22 15:03 Gys

I was curious and tried it on my iPhone 13 (OS 15.4) and it just works as expected. I remember that there were problems with web assembly in iOS 11 but I guess you are on 15.4 too?

oderwat avatar Mar 29 '22 15:03 oderwat

I was initially running 15.3.1 and had the problem. So I updated to 15.4 to make sure it was not a Safari/iOS thing. I just now also tried the same page in Firefox and there I have the same problem. All this only on my iPhone X, not the iPad.

If you do not have the problem on an iPhone 13 either then it seems this is a hardware related problem. Very strange.

Gys avatar Mar 29 '22 16:03 Gys

What happens with the other go-app based sites like https://murlok.io/ or https://pojntfx.github.io/keygaen/

oderwat avatar Mar 29 '22 16:03 oderwat

The problem is specific to the go-app.dev/reference page. Other pages of go-app.dev work fine. Maybe it is the size or something.

The hamburger menu on the topleft also works fine on other pages. Just on the reference page it causes a (or the same) problem.

Gys avatar Mar 29 '22 17:03 Gys

Yes because it is very big and safari engine crashes on ios when pages are that big.

maxence-charriere avatar Mar 29 '22 19:03 maxence-charriere

So probably it is a RAM problem then. The iPhone X has 3 Gb, the ones after that have 4 Gb. My iPad Air 4th also has 4 Gb. So that 1 Gb RAM difference might explain it.

Gys avatar Mar 29 '22 19:03 Gys

Yes because it is very big and safari engine crashes on ios when pages are that big.

It crashes "everywhere" when too big. Something I wanted to bring up before. Do you have any idea on how to prevent it. Like warning about it or recover from the crash and then warn?

oderwat avatar Mar 29 '22 20:03 oderwat

So probably it is a RAM problem then. The iPhone X has 3 Gb, the ones after that have 4 Gb. My iPad Air 4th also has 4 Gb. So that 1 Gb RAM difference might explain it.

I have an Android Galaxy Tab 7 which has 3 GB RAM and has no problem with that page. If the RAM is the problem (and not some fixed limits for the webassembly code as I experienced it in desktop browsers), then it seems to be not very well implemented. In any way, it would be good to prevent it from crashing in the first place.

Edit: I just tried the reference page on my "Fire HD 10-Tablet" which has 2 GB RAM and it works too.

oderwat avatar Mar 29 '22 20:03 oderwat

From my memory of what I read before when I spotted the issue, Safari on IOS has some mechanisms that deals with what is displayed in order to keep thing smooth. It does not play well when an html page have too much content like the reference page.

maxence-charriere avatar Mar 30 '22 02:03 maxence-charriere

Reference page and all go-app demo apps crash when scrolled on iOS iPhone 13 max This will be connected if it won’t work on iOS

xmlking avatar Apr 06 '22 03:04 xmlking

I have a couple of website running and so far the only issue is with that reference page on webkit ios.

I don’t think it is a go-app problem related since go-app doc from go.dev crashes the same way on my phone.

A lot of code is generated but this could be fixed once I figured out how I ll use generics to remove a lot of code.

maxence-charriere avatar Apr 06 '22 04:04 maxence-charriere

Thanks @maxence-charriere i was hurry to read reference doc on my phone, expecting it has more complex examples. Would be nice to have more documentation beyond getting started and generated go-docs. For example, how to connect PWA to gRPC-web backend , how to structure complex project with code organizing into components and views etc

xmlking avatar Apr 06 '22 04:04 xmlking

I m not sure if i want to go that way. I barely have time to do what I want with this package right now and my 2 next priorities are to bring push notifications and figure out how to use generic to bring some feature people asked for.

how to structure is also very opinionated and there is a lot of valid answers depending of the complexity of a project.

maxence-charriere avatar Apr 06 '22 06:04 maxence-charriere

+1 for push notifications ;-)

Gys avatar Apr 06 '22 08:04 Gys

@maxence-charriere - I could help putting some additional documentation together. Maybe spin off an examples app to keep go-app.dev focused on general usage and reference? I could help putting that together.

@xmlking Maxence is correct there are many valid answers for how to structure your project. If you're looking for one example : https://github.com/mlctrez/goapp-mdc-demo Might not be what you're looking for but it could be useful.

mlctrez avatar Apr 06 '22 14:04 mlctrez