Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading the webapp fails on with WebView version 74 #8456

Closed
mrjones-plip opened this issue Aug 11, 2023 · 12 comments
Closed

Loading the webapp fails on with WebView version 74 #8456

mrjones-plip opened this issue Aug 11, 2023 · 12 comments
Labels
Priority: 1 - High Blocks the next release. Type: Bug Fix something that isn't working as intended Won't fix: Deprioritized Too low priority

Comments

@mrjones-plip
Copy link
Contributor

mrjones-plip commented Aug 11, 2023

Describe the bug
Starting at CHT 4.2.0, when a self hosted CHT instance uses nginx as it's front end, certain Android devices fail with a console error Uncaught SyntaxError: Unexpected token ? main.js:1

To Reproduce
Steps to reproduce the behavior:

  1. Install CHT Core 4.2.0 in docker helper. Do not use AWS ELB
  2. Using CHT Android 1.0.1 with webview 74 or lower, connect to CHT Core
  3. See error in console Uncaught SyntaxError: Unexpected token ? main.js:1 and see full screen spinner.

Expected behavior
You should be prompted to log in to the CHT with no errors in console

Screenshots

Console tab Captura de pantalla 2023-08-11 a la(s) 13 40 35
Network tab Captura de pantalla 2023-08-11 a la(s) 13 40 17
Security tab Captura de pantalla 2023-08-11 a la(s) 13 40 25

Environment

  • Instance: local dev
  • Browser: CHT Android 1.0.1 WebView 74 or 68
  • Client platform: See above
  • App: webapp
  • Version: 4.2.0 and above

Additional context
This was discovered while testing #8278. It's assumed that this wasn't caught earlier because we test on Gamma which uses AWS ELB to terminate TLS. Indeed, testing CHT COre 4.2.0 on Gamma with the exact same handset as above works. Testing on 4.1.0 and 4.0.0 on the same handset also work.

Also, testing the same 4.2.0 instance with WebView 111 worked fine. All desktop browsers worked as well.

@mrjones-plip mrjones-plip added Type: Bug Fix something that isn't working as intended Affects: 4.2.0 Affects: 4.2.1 Affects: 4.2.2 labels Aug 11, 2023
@garethbowen garethbowen added this to the 4.3.0 milestone Aug 13, 2023
@garethbowen garethbowen added the Priority: 1 - High Blocks the next release. label Aug 13, 2023
@garethbowen
Copy link
Member

This may be resolved by setting a higher minimum browser version as part of #7448 but we don't currently know the upper bound on this issue so we need to look into it regardless.

@mrjones-plip It looks like this is happening after login - is that correct?

@mrjones-plip
Copy link
Contributor Author

@garethbowen - no this happens before login - steps above to reproduce are correct!

@dianabarsan
Copy link
Member

I believe what is happening here is that Tatiana is navigating to root, which attempts to load the main code (main.js,. scripts.js). This code is responsible for checking whether the user is logged in and eventually redirect them to login.

@mrjones-plip
Copy link
Contributor Author

Ah - thanks @dianabarsan !

We're using unbranded and entering the URL of the docker helper instance - so it's what ever default behavior of CHT Android unbranded in this case.

@dianabarsan
Copy link
Member

I believe this is because of the Angular upgrade: #7992 we did in 4.2
#7999 (comment)

I've updated the .browserlistrc and the isUsingSupportedBrowser function from the browser detection services to support chrome v80 which includes the features of es2020.

@dianabarsan
Copy link
Member

I'm not sure we can do anything about this, unfortunately, and we were already aware of this issue - we even discussed with @craig-landry, @garethbowen and @kennsippell post ZNZ meetup.

@mrjones-plip
Copy link
Contributor Author

ah - thanks for the research into the cause being the angular bump to 15 in CHT 4.2 @dianabarsan! I think a reasonable remediation is to detect WebView <80 and alert that we're not compatible. I know we did a bit of this work in #7448, but should complete the effort with the recently filed #8159.

Given this is "working as designed" per your comment re ZNZ meetup, do we feel this is still a bug then? Maybe just close this in favor of #8159?

@mrjones-plip
Copy link
Contributor Author

@kennsippell - curious on your thoughts as you're closer to what the field and live deployments sees things as. Further, I know you've explored client telemetry and what folks are actually running!

@dianabarsan
Copy link
Member

I don't think there's anything to do about this. I know @latin-panda investigated at the time of the Angular upgrade and it was not possible to produce old ES transpiled versions of the code (due to Angular dropping support for IE11).

So I'm ok to either retag this (so it doesn't block 4.3.0) or close it according to @mrjones-plip 's comment above.

@garethbowen
Copy link
Member

@mrjones-plip Do we have any data on what versions do work? Is 80 ok?

@mrjones-plip
Copy link
Contributor Author

We know for sure 95 works on my Android 5.1 device and QA had an Android 9 device with 79 that failed and then upgraded to latest (accidentally) and started working. Only two data points, but coupled with Diana's research, 80 sounds correct to me.

@garethbowen - I propose remove the Affects:* labels, remove from 4.3.0 release, closing this ticket and focusing on #8159

@garethbowen
Copy link
Member

@mrjones-plip I agree. My only concern is that 74 is higher than the previously communicated 72. However we're starting to make good progress on testing and communicating browser support versions better...

@garethbowen garethbowen removed this from the 4.3.0 milestone Aug 16, 2023
@garethbowen garethbowen added the Won't fix: Deprioritized Too low priority label Aug 16, 2023
@garethbowen garethbowen changed the title Self hosted CHT instances fail with older, but supported WebView versions Self hosted CHT instances fail with older WebView versions Aug 16, 2023
@garethbowen garethbowen changed the title Self hosted CHT instances fail with older WebView versions CHT instances fail with older WebView versions Aug 16, 2023
@garethbowen garethbowen changed the title CHT instances fail with older WebView versions Loading the webapp fails on with WebView version 74 Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 1 - High Blocks the next release. Type: Bug Fix something that isn't working as intended Won't fix: Deprioritized Too low priority
Projects
Status: Done
Development

No branches or pull requests

3 participants