-
Notifications
You must be signed in to change notification settings - Fork 293
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
Safari issue: Failed to initialize NumberFormat since used feature is not supported in the linked ICU version #3255
Comments
Noting that another user suspects this is a Webkit/Safari issue. |
I get the error after re-installing 1.30 as well btw so possibly this is an issue introduced with Safari 14.1 and not the SiteKit 1.31 update. Safari 14.1 was installed on 27th April. |
I was able to reproduce this using Safari 14.1 and the latest version of Site Kit. I didn't see the error on an older version of the plugin - I will try to isolate the version or commit that introduces the issue. My trace was a bit different than reported above, possibly worth noting that the error appears related to the GoogleChart component:
|
Some additional insights provided by one user. With the issue only occurring with Safari the user pointed out one article which may contain additional information. Setting time aside for testing tomorrow. |
Safari 14 (Big Sur) - Unable to recreate issue. Two sites tested with all services connected. All Site Kit tabs checked - Browserstack testing account There was a potentically impacted bug which seems to have been resolved which may have impacted reporting: @adamsilverstein Based on the localstorage issue as reported above do you think Site Kit users may have been impacted? |
fyi. There's a newer build of Safari 14.1 out today to address a WebKit exploit. Version 14.1 (14611.1.21.161.7) I'm getting the same issue on this version as the previous version (ending 161.5) https://www.macworld.co.uk/news/safari-webkit-exploit-update-3804296/ |
@aegisdesign This latest 14.1 version isn't available on my test Browserstack account just yet but many thanks for the update. @bethanylang @adamsilverstein I've added notes to the above after being unable to reproduce on my side via Browserstack. Escalating for further review. |
I've just been testing this in Safari 14.0.1 and then in the latest download of 14.1 (15611.1.21.161.7). I tested with releases 1.30, 1.31 and 1.32 and was unable to recreate the issue. |
Pending users facing this issue below:
@aegisdesign Do you encounter the same issue with only the Site Kit plugin active or when switching languages temporarily? Using the Health Check & Troubleshooting plugin as per the steps in this support topic is a good way to eliminate a multi party conflict. |
Not sure if Safari uses this code or not but it seems the error may also be related to specific formatting options: |
Another new report today with another slightly different message:
|
@bethanylang I've taken another look at this and unfortunately I don't think we have enough information to track down the problem. It doesn't seem to be as simple as an incompatibility with a specific browser only but seems to be more specific to a combination of locale and data. Is there anyone who is able to consistently reproduce this that we can ask for more information? |
@jamesozzie @abdullah1908 Do either of you have an open topic that you can work with more closely here to troubleshoot? |
@bethanylang I'm doing testing on this today to try and reproduce. I've sent out responses to users in #3278 which is also Safari related, possibly connected. I'll include any additional observations here. I've also added the OS and browser version where obtained to the original issue details. |
Unable to reproduce this testing from Big Sur Mac (11.3.1), Safari 14.1, English & Italian languages defined within Site Kit. Based on one users insights on another safari specific issue (#3278) I also enabled all "Experimental Features" within Safari, without being able to recreate this or the error from that issue. |
Some excellent insights provided by one impacted user:
|
@jamesozzie have we tested on Mojave? |
@aaemnnosttv I'm unable to reproduce using Mojave with Safari 12.12. Mojave 10.14.6 |
IB ✅ 😄 |
@wpdarren @cole10up – due to the environment-specific nature of this bug, you may need to collaborate with @ivankruchkoff for QA as he is the only one with this environment that we know of 😄 |
@aaemnnosttv apologies if this is obvious :D but when we run |
Update: @ivankruchkoff has very kindly offered to do a screencast to show the issue and also the fix. 👍 |
QA Update: ✅
|
Can you share with video again please? How it was fixed? |
@constgen There is no action required for users who previously encountered this error, with the fix incorporated into the plugin as of version 1.36.0. If you're encountering similar errors or unusual behavior specific to Safari feel free to open a support topic on the WordPress support forums and we'd be happy to assist. |
I just need to fix the same error on my code base. I have errors reports from Sentry. But without having Safari 14.1 I can't correctly reproduce and debug the issue. Can you refer the commit with fix or something? |
I think I found that PR https://github.com/google/site-kit-wp/pull/3620/files . Correct me if I am wrong and there was something else |
Bug Description
There have been reports of the below dashboard error since 1.31.0 was released. This appears when accessing the primary Site Kit dashboard.
Failed to initialize NumberFormat since used feature is not supported in the linked ICU version
One user has reported this only occurs in a Safari browser, troubleshooting ongoing with the other.
Full error details below for 1 user
Full error for second user (slightly different - **_LegacySearchConsoleDashboardWidgetTopLevel_**)
Impacted users:
Additional Context
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
NumberFormat
should not fail to initialize due to unsupported features in supported browsers, specifically Safari 14.1 on MacOS MojaveIntl.*
should also be checked for similar compatibility errorsImplementation Brief
/assets/js/util/i18n.js export const numberFormat()
Intl.NumberFormat
in a try/catch, if an error is thrown we call our new logging function (defined further in the IB) with a message:Unable to: new Intl.NumberFormat( ${ JSON.stringify( locale ) }, ${ JSON.stringify( formatOptions ) } ).format( ${ number } );
Remove these formatOption keys irrespective of value:
[ 'signDisplay', 'compactDisplay' ]
Run
Intl.NumberFormat
again with the smaller subset of formatOptions, also in atry/catch
if that fails again, fallback to just calling:new Intl.NumberFormat( locale ).format( num );
File location:
site-kit-wp/assets/js/util/i18n.js
Line 289 in 9f1b51b
Create a logFunction
logOnce( message )
, that is memoized, such that it calls console.warn on a given message only one time, see: Safari issue: Failed to initialize NumberFormat since used feature is not supported in the linked ICU version #3255 (comment) for an example.WIP Branch Allow numberFormat to degrade gracefully. #3620.
Test Coverage
console.warn()
, however we can't run our tooling in a specific version of a specific browser to ensure it isn't broken.Visual Regression Changes
QA Brief
new Intl.NumberFormat('en-US', {style: "percent", signDisplay: "never", maximumFractionDigits: 1}).format(1.234)
new Intl.NumberFormat( "en-US", {"unitDisplay":"narrow","style":"unit","unit":"second"} ).format( 1 );
analytics
connected/wp-admin/admin.php?page=googlesitekit-dashboard
Unable to: new Intl.NumberFormat( "en-US", {"style":"percent","signDisplay":"never","maximumFractionDigits":1} ).format( 0.09 );
Changelog entry
The text was updated successfully, but these errors were encountered: