JakeChampion / polyfill-useragent-normaliser

22 stars 9 forks source link

[Issue] attempting to change value of a read-only property #188

Open gofeel8 opened 1 year ago

gofeel8 commented 1 year ago

What

I found an error where the webview service using polyfill.io It was an issue of 'attempting to change value of a read-only property' image imageI think it insert the polyfill code even though I have a Symbol.asyncIterator

This is my useragent in the environment where the issue occurred image

Details

Command the curl below at the terminal, can see that the user agent is parsed

curl -XGET "https://polyfill.io/v3/polyfill.min.js?features=es2018" \
   -H "User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 15_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148" -v
image

This User-Agent Header's safari version 11 right?

mhassan1 commented 1 year ago

This looks similar to https://github.com/JakeChampion/polyfill-useragent-normaliser/issues/180.

wopol commented 9 months ago

Is there anything new here? I think it breaks on every iOS version that contains patch version. You can compare two different user agents:

Mozilla/5.0 (iPhone; CPU iPhone OS 17_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148

vs

Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148

The only difference is between versions 17_0_1 and 17_2.

I think it happens because here patch version is not checked.