Home » Topics » General Support » Update Failing – Unauthorised

Update Failing – Unauthorised

ACF Widgets Support General Support Update Failing – Unauthorised

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #95254
    lukashol
    Participant

    Hey

    I have the developer/unlimited license but have been unable to update an installation of the plugin from 1.9 to 1.10. I have entered my license key as usual and it says its accepted and valid, but any attempt to then update fails every time. Is there an issue you are aware of with this?

    Thanks

    #95313
    Daron Spence
    Keymaster

    Hmm I’m not aware of any issues currently. You can always download the latest version from your account history if you need to update.

    I’m in the middle of a family emergency and may not be able to get to this for a week or so.

    Cheers

    #95376
    lukashol
    Participant

    Hi

    Thanks for the reply. The issue is that i have this running on a few clients sites and they have instructions to update this via the admin, they wont cope with downloading / uploading the plugin themselves and i would like to avoid doing this myself on each of their sites. I just tried again on another one and getting the same error.

    Not sure if it’s relevant but it states that the version of ACFW that we’re trying to update to has unknown compatibility with the latest version of WP.

    There is no rush but maybe i should send you my key and you can check that there is nothing wrong with it, if you could let me know what would be best when you get a spare moment i’ll sort it out.

    Thanks

    #95382
    kkranzo
    Participant

    I am having the same issue.

    Every time I update via the admin area, I receive the error below:

    Update Failed: Plugin update failed.

    #95421
    Daron Spence
    Keymaster

    Hmm there was an update available for EDD’s Software Licensing add-on that powers the plugin updates but I don’t think that was affecting things. I double checked the download link and that seems to be fine too. I just did an update from 1.9 to 1.10 on a fresh install of WordPress and everything seems to be fine.

    I’m going to recommend the obvious, disable all other plugins, etc, you guys have heard the drill. There is likely a conflict.

    Give it another shot and let me know what happens. It could also be a server config issue on your end.

    Sorry for the slow reply, like I mentioned, I’m in the middle of a family emergency and I’m trying to answer as quick as I can.

    Cheers everyone!

    #95638
    lukashol
    Participant

    Thanks for the reply. I did a fresh install of WP and this was the only plugin running but I’m getting the same issue – its now been checked on about 8 sites, not all hosted in the same place, but with same problem. Here is the exact run of messages when I click to update:

    ***********************
    The update process is starting. This process may take a while on some hosts, so please be patient.
    Enabling Maintenance mode…
    Updating Plugin ACF Widgets (1/1)
    Downloading update from https://acfwidgets.com/edd-sl/package_download/MTQ3NDgyMDYyNzo3Yjk4ZjM0ZjNmZjRhY2ZkNmIxNzA0N2NjYzQ2YTQ4NDoxMzo1YjVhYzlhYWQ3ZTA2ZWVmYjYyZjEyNmU0ZDI4ZGYxYjpodHRwQC8vd3d3LndhbnRicmQuY29tL2Jsb2c=…
    An error occurred while updating ACF Widgets: Download failed. Unauthorized
    Disabling Maintenance mode…
    All updates have been completed.
    ***********************

    I’m wondering if it’s my licence causing the issue, can you check it / should I DM you it?

    Cheers

    #95639
    Daron Spence
    Keymaster

    I would double check that your license is installed and working correctly. Deactivate the license on the problem site and then re-enter it. Make sure there aren’t any trailing spaces. After you re-activate the license it should show some sort of validity on the options page. Double check the license matches the one in your purchase history exactly. Click on they key icon to view the key.

    I looked at your account yesterday I think and there were quite a few activations on your license key. If it’s only a small subset of those causing problems, I’m inclined to think it’s a conflict of some sort.

    Do you have any debugging or PHP errors? You can use a plugin like “Query Monitor” to check for PHP errors. WordPress did some changes to the HTTP API in 4.6 that could affect how files are downloaded I would guess. I haven’t heard of anything like that, but that doesn’t mean it doesn’t exist. Query Monitor will also show you the http requests made by your server.

    #95640
    Daron Spence
    Keymaster

    One more thing. The “unauthorized” code generally means your license key is invalid or outdated. Make sure your license status is up to date. The plugin will show updates even if your license key is invalid. This is to ensure you are aware of the risk of running outdated plugins. However, it will not update without a valid key.

    #95671
    Tim Robertson
    Participant

    I had this problem as well.

    When you manually add a license the Site URL displayed in the Purchase History is displayed as domain/. However the Site URL displayed for licenses registered from WordPress is displayed as http:/domain/.

    I had to come here and manually add a license for the website under Purchase History. After manually adding a license for the site updating in WordPress started working.

    #96265
    lukashol
    Participant

    By jove, I think he’s got it, that has solved it for me. Daron, is this something you can fix your side when you get a spare moment, saves me coming here and manually adding a site each time.

    Thank Tim!

    #96273
    Daron Spence
    Keymaster

    Tim, are you saying the non http:// version is the one that works? This is most likely a change to the EDD SL plugin that wasn’t documented so I’d like to send a patch out their way if it is indeed a problem.

    A step by step of what you did to fix things lukashol would be great!

    #96290
    Daron Spence
    Keymaster

    I can go through and run a migration to change all of the http:/ errors but at this point I can’t figure out where they are coming from . Trying to debug but coming up short.

    #96292
    Tim Robertson
    Participant

    As you can see in the request sent out from WordPress the URL being submitted is malformed.

    HTTP REQUEST

    The URL becomes malformed within the WP_Http class (code ref below).

    https://github.com/WordPress/WordPress/blob/master/wp-includes/class-http.php#L362

    The simple fix is to make sure that you’re url encoding the URL before passing it to the add_query_arg() function. This function expects that all the params you’re passing it have already been url encoded.

    So you’d need to update the acfw_deactivate_license(), acfw_activate_license() and acfw_check_license() functions.

    #96293
    Tim Robertson
    Participant

    For reference this change to WP_Http was introduced in WP 4.6 which is why you’re seeing this behaviour just show up now.

    #96300
    Daron Spence
    Keymaster

    Thanks Tim! That all makes a lot of sense. I hadn’t thought to check the 4.6 changelog just yet. I’ll get that stuff changed and push a fix out for everyone before next week hopefully.

Viewing 15 posts - 1 through 15 (of 16 total)
  • The topic ‘Update Failing – Unauthorised’ is closed to new replies.