jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Jetpack Scan enqueues incorrect script in some cases, causing 404 errors

Open alexsanford opened this issue 2 years ago • 5 comments

Impacted plugin

Jetpack

Quick summary

Jetpack Scan enqueues a script in certain cases which does not exist. This causes 404 errors to occur. This can be reproduced by manually deleting a transient, but it is being triggered in the wild in at least one case.

Steps to reproduce

  1. On a site with Jetpack Scan active, use the WordPress console to run delete_transient('jetpack_scan_state');
  2. Reload the Jetpack dashboard and notice a 404 error to the path /wp-content/plugins/jetpack/modules/scan/_inc/build/scan/admin-bar-notice.min.js?minify=false&ver=1

A clear and concise description of what you expected to happen.

The non-existent script should never be enqueued.

What actually happened

No response

Impact

Some (< 50%)

Available workarounds?

There is no user impact

Platform (Simple and/or Atomic)

No response

Logs or notes

No response

alexsanford avatar Feb 13 '24 15:02 alexsanford

The script appears to be enqueued here: https://github.com/Automattic/jetpack/blob/trunk/projects/plugins/jetpack/modules/scan/class-admin-bar-notice.php#L108-L120

alexsanford avatar Feb 13 '24 15:02 alexsanford

The bug was most likely introduced in #34072. #35648 should fix things.

jeherve avatar Feb 13 '24 17:02 jeherve

reported 7725222-zd-a8c

pehaa avatar Feb 22 '24 07:02 pehaa

Support References

This comment is automatically generated. Please do not edit it.

  • [ ] 7725222-zen

github-actions[bot] avatar Feb 22 '24 07:02 github-actions[bot]

Another report in the forum: https://wordpress.org/support/topic/jetpack-create-errors-accessing-non-existing-files-ws-iframe-html/

StefMattana avatar Mar 04 '24 10:03 StefMattana