Notification icon indicating copy to clipboard operation
Notification copied to clipboard

Weird license inactive (wrong status compared to online dashboard)

Open mircobabini opened this issue 4 years ago • 12 comments

Bug description

Can't say why but even if expire date is about 6 months from now, it's says inactive:

qzhLf1

Of course I manually masked the license codes. Also soft-related to #321.

To reproduce

Steps to reproduce the behavior:

  1. Who knows. :) Maybe some network issues the last time it tried to update license data?

Expected behavior

Licenses should be shown as active.

Environment

  • PHP: 7.4
  • WordPress: 5.6.1
  • Notification plugin: 7.2.2

mircobabini avatar Feb 17 '21 10:02 mircobabini

@mircobabini the network issue seems to be the potential reason! I'm wondering why the status is inactive though.

I checked your license history - did the recent deactivating and activating helped?

jakubmikita avatar Feb 22 '21 10:02 jakubmikita

Well, since it's on a production website, I can't just deactivate and reactivate.

By the way this is my report:

  • After a week the issue was still there (weird since you set the transient expire time in 24h);
  • I added define( 'NOTIFICATION_DEBUG', true ), double CTRL+R and it's gone.

Let's see; if the error persists, I'll receive a notice with some more details about it. error_log( print_r( $response, true ) );

I'll keep you posted.

mircobabini avatar Feb 24 '21 09:02 mircobabini

I think found it! The extensions are info about validation is cached for 24h, yes, but the License itself is not expiring at all. I'll take a closer look.

PS. License deactivation won't do anything so you can safely do that :)

jakubmikita avatar Feb 25 '21 06:02 jakubmikita

I couldn't track down this issue but noticed EDD Software Licensing plugin we are using to handle licenses has released a fix for inconsistent responses from the API. Hopefully, it will resolve this issue but let's keep this ticket open.

jakubmikita avatar Mar 11 '21 06:03 jakubmikita

I had this one once again today. Fixed the same way (deactivated and reactivated the license).

mircobabini avatar Apr 07 '21 16:04 mircobabini

Thanks for the update! Was anything caught in the log?

jakubmikita avatar Apr 20 '21 07:04 jakubmikita

Yeah... no XD that debug line was not in place anymore. My fault.

Just restored, let's see next time.

mircobabini avatar Apr 20 '21 08:04 mircobabini

Ohhh that's a shame :) but it happens. On my end no more findings regarding that and no one else reported that issue

jakubmikita avatar Apr 20 '21 08:04 jakubmikita

Another customer just reported very similar issue so it seems to be an edge case probably with cached check

jakubmikita avatar Dec 06 '21 07:12 jakubmikita

I've just one site where I still face the issue and I was able to define a pattern.

It's about connections dropped at a certain point, almost random. I was able to see that without Kaspersky active on the server, the issue disappear.

Then I've tried to see how to modify the WordPress's cURL transport and I've found that removing these lines the issue disappear:

https://github.com/WordPress/WordPress/blob/18d741be3762cf33c8ccdbcc066b6048275288a1/wp-includes/Requests/Transport/Curl.php#L365-L368

I think I should make a PR to add the "Connection: close" header only for cURL version < 7.22.

It will probably take forever to be merged into core, but... :D

mircobabini avatar Dec 06 '21 12:12 mircobabini

Oh wow, that's some solid research! And the very peculiar issue 🤔

jakubmikita avatar Dec 06 '21 12:12 jakubmikita

Let's see how it goes. https://core.trac.wordpress.org/ticket/54588

mircobabini avatar Dec 06 '21 12:12 mircobabini