Skip to content
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

Fatal error when updating with invalid license #21

Open
jamesckemp opened this issue Aug 3, 2023 · 5 comments
Open

Fatal error when updating with invalid license #21

jamesckemp opened this issue Aug 3, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@jamesckemp
Copy link
Contributor

Steps to reproduce:

  1. Install 2 or more uplink-based plugins. (Flux and Account Pages on feature/uplink are a good option).
  2. Set the version lower to those on PUE.
  3. Enter an invalid license key for the plugin you want to update.
  4. Try to update via update-core.php admin page.

Issue:

Fatal Error:

[03-Aug-2023 15:43:30 UTC] PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Iconic_WAP_NS\StellarWP\Uplink\Admin\Package_Handler::filter_upgrader_pre_download() must be of the type bool, object given, called in /app/wp-content/plugins/iconic-woo-account-pages/vendor-prefixed/stellarwp/uplink/src/Uplink/Admin/Provider.php on line 179 and defined in /app/wp-content/plugins/iconic-woo-account-pages/vendor-prefixed/stellarwp/uplink/src/Uplink/Admin/Package_Handler.php:34
Stack trace:
#0 /app/wp-content/plugins/iconic-woo-account-pages/vendor-prefixed/stellarwp/uplink/src/Uplink/Admin/Provider.php(179): Iconic_WAP_NS\StellarWP\Uplink\Admin\Package_Handler->filter_upgrader_pre_download(Object(WP_Error), 'invalid_license', Object(Plugin_Upgrader), Array)
#1 /app/wp-includes/class-wp-hook.php(308): Iconic_WAP_NS\StellarWP\Uplink\Admin\Provider->filter_upgrader_pre_download(Object(WP_Error), 'invalid_license', Object(Plugin_Upgrader), Array)
#2 /app/wp-includes/plugin.php(205): WP_Hook->apply_filters(Object(WP_Error), Array)
#3 /app/wp-admin/includes/c in /app/wp-content/plugins/iconic-woo-account-pages/vendor-prefixed/stellarwp/uplink/src/Uplink/Admin/Package_Handler.php on line 34

Notes:

This issue only seems to occur when 2 uplink-based plugins are running. When there's only one, it displays a notice instead of a fatal error.

CleanShot 2023-08-03 at 16 48 14@2x
@jamesckemp jamesckemp added the bug Something isn't working label Aug 3, 2023
@davegreenwp
Copy link
Contributor

@defunctl seeing a couple more reports of this error in the wild via the helpdesk, although I don't have information yet around whether the invalid licensing portion of James's original report can be replicated here.

Do you have any capacity to take a look?

@defunctl
Copy link
Contributor

@davegreenwp I believe this PR that Ben opened is the fix, are you able to give it a try?

However, the PR is going to another branch so you may need to cherry pick it.

#65

@defunctl
Copy link
Contributor

Got a PR open to main now: #66

@defunctl
Copy link
Contributor

@davegreenwp that's released here https://github.com/stellarwp/uplink/releases/tag/v1.4.2

Give it a try, however note that customers experiencing this issue would need to manually update their plugins.

@davegreenwp
Copy link
Contributor

thanks @defunctl I'll carve out some time tomorrow to pull these changes into the two plugins in question and get some pre-release copies to the customers who reported. I know at least one has a staging environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants