Title: AMP error in debug
Last modified: September 2, 2023

---

# AMP error in debug

 *  Resolved [rickyrt](https://wordpress.org/support/users/rickyrt/)
 * (@rickyrt)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/amp-error-in-debug/)
 * getting this error on my debug log also having issues with AMP pages sometimes
   AMP pages are getting served on desktop sometimes not. Often the AMP page is 
   stretched to fit the desktop screen.
 * [02-Sep-2023 21:19:06 UTC] PHP Notice: Function amp_is_available was called **
   incorrectly**. `amp_is_available()` (or `amp_is_request()`, formerly `is_amp_endpoint()`)
   was called too early and so it will not work properly. WordPress is currently
   doing the `shutdown` hook. Calling this function before the `wp` action means
   it will not have access to `WP_Query` and the queried object to determine if 
   it is an AMP response, thus neither the `amp_skip_post()` filter nor the AMP 
   enabled toggle will be considered. It appears the plugin with slug `webp-express`
   is responsible; please contact the author. Please see [Debugging in WordPress](https://wordpress.org/documentation/article/debugging-in-wordpress/)
   for more information. (This message was added in version 2.0.0.) in /home/livingun/
   public_html/wp-includes/functions.php on line 5905
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Famp-error-in-debug%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/amp-error-in-debug/#post-17027255)
 * Hello [@rickyrt](https://wordpress.org/support/users/rickyrt/)
 * Thank you for contacting us, As the message suggests the issue is with WebP Express
   plugin that they are using `is_amp_endpoint()` function incorrectly to work it
   correctly it should be called after the `wp` hook
 * Additionally, the function `is_amp_endpoint()` has been deprecated the plugin
   should have used `amp_is_request()` function instead.
 * We recommend contacting Webp Express plugin support as they can help you with
   a fix for the warning.
 * Sorry, we can’t be more of assistance on this one as the issue is with another
   plugin.
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/amp-error-in-debug/#post-17075995)
 * [@rickyrt](https://wordpress.org/support/users/rickyrt/)
    As we didn’t receive
   a response I’ll mark this as resolved. Feel free to open a [new support topic](https://wordpress.org/support/plugin/amp/#new-post)
   if you require any further assistance.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘AMP error in debug’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Milind More](https://wordpress.org/support/users/milindmore22/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/amp-error-in-debug/#post-17075995)
 * Status: resolved