5 ms·
I have seen a few cases where users complain that our mobile app (which runs in a webview inside a native app) doesn't work for them. When we look in the serve
by chrismmay 7y ago
I have seen a few cases where users complain that our mobile app (which runs in a webview inside a native app) doesn't work for them. When we look in the server logs, we find a user agent string that indicates a user is running iOS 11.4.1. My theory is that the older version indicates that the client's mobile device has run out of storage space. The device can't download the update to iOS 13.x since there is insufficient storage available on the device.
Even if the user frees-up some space on their device, not enough to upgrade to iOS 13.x, but enough to run our app theoretically, our app still fails to run for them. Uninstalling and reinstalling the native app that contains the webview that runs our web app doesn't solve the problem either. My theory is that there are truncated versions of some of our javascript files left over from when the device ran out of storage that don't get re-downloaded even when storage is later made available....
I've been telling people to free-up space on their device and upgrade it to iOS 13 to fix the problem. I sure hope that works...
If all user agents become a fixed string, how on god's green earth will we troubleshoot problems reported by users? I sure hope we get another header that will tell us the real client platform information so we can eventually repeat this exercise after another few years...
This scenario is complicated, but my point is really that of course we need a User Agent to accurately tell what platform the client is running for entirely legitimate reasons and mega corporations should not do patently evil things to make the lives of developers and support people even more frustrating than they already are. There should be laws against things like this. It really is fraud to change something like the User Agent string to a constant value that is incorrect, and it WILL lead to damaging events in real people's lives if it happens. People could be fired for being led down the wrong investigative path when troubleshooting problems. From the article, it sounds like significant damage has already been done.
- ec109685 7y agoI am surprised clearing the cache doesn’t remove these lingering files, given their remnants would be a privacy problem.
- chrismmay 7y agoThis is a webview embedded in a native app that we don't control, not a web browser. No, clearing the cache in Safari doesn't help. This stackoverflow https://stackoverflow.com/questions/5468553/clearing-uiwebview-cache https://stackoverflow.com/questions/5468553/clearing-uiwebvi... says you can write some native code to clear the cache, but we don't control the native app, we control the web app that runs in the webview. We will report the problem to the native app developer, but hopefully the user can just free-up space and upgrade their iOS in the meantime.
- GoblinSlayer 7y agoAren't you at the mercy of that app? https://developer.apple.com/documentation/webkit/wkwebview/1414950-customuseragent https://developer.apple.com/documentation/webkit/wkwebview/1...
- chrismmay 7y agoWe are... but they report the UserAgent properly (sort of). Here's an example: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
- skrebbel 7y agoI don't understand, why don't you "just" try to support ios 11?
- jsnell 7y agoYou've totally misunderstood the OP's story. Their app does not have any kind of dependency on iOS 13 and should work on iOS 11. It's just that there's a correlation between an iOS 11 UA and the app not working. The hypothesis is that there is something wrong with some devices that both a) caused them to not be upgraded, b) causes their app to fail. This kind of misreading is a prime example of just how toxic any discussions about version number detection are. Rather than give the OP any benefit of the doubt and maybe re-read what they wrote, you've just decided they must be incompetent or lazy and castigate them over it.
- skrebbel 7y agoOh come on. I even began my sentence stating that I didn't understand. What more do you want? I was genuinely interested, there's no need to snark. The only thing that's toxic in this thread is your comment. If we're going to begin by assuming that things like "I don't understand" are meaningless hollow phrases that trolls tack on comments just to snark more effectively, then the end is that we simply can't communicate online anymore. Please don't push in that direction, it's not the solution. > you've just decided they must be incompetent or lazy and castigate them over it. I did no such thing and I'm genuinely angry at you for suggesting it.
- chrismmay 7y agoWe do support iOS 11. The client being on iOS 11 is an indication that the device has run our of storage space. Because it was out of storage, the files for our app were truncated because there was insufficient storage. A truncated file is there but it's corrupt. iOS doesn't detect this corruption, and the app is broken. Forever, and it can't be fixed without a factory reset, complete reinstall of the OS or somehow jailbreaking the device as far as I know. The customer reporting "stuck on a blank screen" and the User Agent being stuck on iOS 11, even when most people have automatic updates enabled are the primary indications that leads to this conclusion.
- nkrisc 7y agoAt the same time, it's my computer and if I want to change the User-Agent string, I will. I don't have to tell you what platform I'm using if I don't want to.
- chrismmay 7y agoYou are absolutely right, but don't expect apps to work, and if you report a problem to an app maker, you can expect the response "Sorry we cannot reproduce your problem. Everything works fine for us with browser XXX", or possibly "Sorry we cannot find logs for your device XXX" because you are falsely reporting your device in the UA, but telling them in your communication about the problem something different.
- nkrisc 7y agoSure, I'm not disagreeing with any of that. But saying it's "fraud" and there there should be "laws against" it is going way too far. Of course, if I choose to call you for support I probably would not continue to hide what platform I'm using, that'd be silly. I wouldn't report an issue with false information.
- chrismmay 7y agoI agree, making laws about it shouldn't be necessary. The context of this discussion is that applications should not flatly refuse to service UA clients who are not the biggest 3 or 4 players. A better solution would be to require servers to service all clients, but if an unknown or unexpected client is detected, the server's response should include a compatibility warning. Server-side software makers are simply trying to limit the amount of testing they need to do to provide a reliable system. Client-side software makers, by lying about who they are, are trying to do the exact same thing. The problem is that these two actions result in an outcome that achieves neither server nor client's goals, and there's the rub. You are arguing that it should be ok for your software to lie about who/what it is. If we go down that road, we end up with chaos. Software misreporting who/what it is so a server that will think it is a compatible system and agree respond, when it might otherwise refuse. fraud n. A deception practiced in order to induce another to give up possession of property or surrender a right. n. A piece of trickery; a trick. Personally, despite the obviously good intention to provide a reliably working software system, I think building a software system that systematically lies when reporting who/what it is is worse than a one-off lie to a customer support person on a phone call. Surely there is a solution that does not involve deception.