Site logo

Archived topic

Failure to update GP Premium version 1.2.92

34 replies · Started by Jay Martin on November 30, 2016

Viewing posts 1–15 of 35

When I perform the "update" action for the GP Premium plugin I have installed (version 1.2.91), I get this failure message:

Update Failed: Could not copy file. gp-premium/typography/functions/customizer/js/fonts-customizer.js

There were no related error messages found in either the apache or php error logs.

I looked at the directory in question and found a file with that name in the directory, with a date of yesterday. (The other files in that directory were also dated yesterday). Since I had installed GP Premium in the website a week or so ago, it makes me think the file(s) were actually created ok.

Subsequent attempts to install the update resulted in the same failure. A cursory use of the website doesn't appear to reveal any errors, but it was only a cursory look.

"Could not copy" is usually a server permissions issue.

However, I've seen this before with some servers where if the path is too long (gp-premium/typography/functions/customizer/js/fonts-customizer.js), it will trigger this error.

Unfortunately I don't know the exact server setting that needs to be tweaked, but it might be worth checking with your hosting.

I've just gotten this message during an unsuccessful upgrade:

An error occurred while updating GP Premium: Update package not available.

Sorry, I forgot to mention that this website is a development site setup on my Windows 7 laptop, using xampp.

No error messages were posted in any of the relevant log files (apache, php). Since the error message was prominently displayed within the Plugins page, it appeared to have been properly caught and handled at the website layer, as opposed to, say, the scripting (PHP) or server (Apache) layer.

As I mentioned before, that file seems to exist in the location specified in the error message, and that the file contained a relatively new date. So it makes me wonder if this isn't some sort of spurious error in which the file was written properly, after all.

Would it be possible for you to email a copy of that file so I may diff it against the one I have installed?

Benjamin - your error is different and should be fixed by adding your license key: https://generatepress.com/knowledgebase/trouble-updating/

Jay - I don't actually believe that file changed at all in this update (since the last update), so doing a file diff probably won't help.

This has been kind of a "white whale" of an issue for me. It happens on some hosts (including xampp), and I'm unable to find the exact server config that needs tweaking. It does seem to be a WP updating issue more than a GP updating issue, as the "could not copy file" is a pretty common issue.

I do believe some servers have issues with a lot of folders in the update path, and long file names. A lot of the time this happened with the translation files, which is why this update shortened a bunch of text domains (file names become shorter as well).

My apologies, but previously I was examining the wrong debug.log file. (I have all the usual DEBUG stuff enabled, including the writing of the site-specific debug.log file in the wp-content directory.)

I cleared the log file, then reattempted the update, and here's what I got:

[30-Nov-2016 17:54:15 UTC] PHP Warning:  fopen(C:/xampp/htdocs/wphcdoc/wp-content/upgrade/MTQ4MDU4NjA0OTpkOGM5ZmQ0MmY0YTVjZGQzNWRlYzA0YWM0MDRmYWI5NToyNTQ0MTpiMzJlOTM2OTNhYmM2ZjZjZjJiZTczZTBkYWNiYjYxZDpodHRwQC8vbG9jYWxob3N0L3dwaGNkb2M-ZtiG0N/gp-premium/typography/functions/customizer/js/fonts-customizer.js): failed to open stream: Invalid argument in C:\xampp\htdocs\wphcdoc\wp-admin\includes\class-wp-filesystem-direct.php on line 67

[30-Nov-2016 17:54:15 UTC] PHP Stack trace:

[30-Nov-2016 17:54:15 UTC] PHP   1. {main}() C:\xampp\htdocs\wphcdoc\wp-admin\admin-ajax.php:0

[30-Nov-2016 17:54:15 UTC] PHP   2. do_action() C:\xampp\htdocs\wphcdoc\wp-admin\admin-ajax.php:91

[30-Nov-2016 17:54:15 UTC] PHP   3. call_user_func_array:{C:\xampp\htdocs\wphcdoc\wp-includes\plugin.php:524}() C:\xampp\htdocs\wphcdoc\wp-includes\plugin.php:524

[30-Nov-2016 17:54:15 UTC] PHP   4. wp_ajax_update_plugin() C:\xampp\htdocs\wphcdoc\wp-includes\plugin.php:524

[30-Nov-2016 17:54:15 UTC] PHP   5. Plugin_Upgrader->bulk_upgrade() C:\xampp\htdocs\wphcdoc\wp-admin\includes\ajax-actions.php:3707

[30-Nov-2016 17:54:15 UTC] PHP   6. WP_Upgrader->run() C:\xampp\htdocs\wphcdoc\wp-admin\includes\class-plugin-upgrader.php:286

[30-Nov-2016 17:54:15 UTC] PHP   7. WP_Upgrader->unpack_package() C:\xampp\htdocs\wphcdoc\wp-admin\includes\class-wp-upgrader.php:728

[30-Nov-2016 17:54:15 UTC] PHP   8. unzip_file() C:\xampp\htdocs\wphcdoc\wp-admin\includes\class-wp-upgrader.php:320

[30-Nov-2016 17:54:15 UTC] PHP   9. _unzip_file_ziparchive() C:\xampp\htdocs\wphcdoc\wp-admin\includes\file.php:604

[30-Nov-2016 17:54:15 UTC] PHP  10. WP_Filesystem_Direct->put_contents() C:\xampp\htdocs\wphcdoc\wp-admin\includes\file.php:710

[30-Nov-2016 17:54:15 UTC] PHP  11. fopen() C:\xampp\htdocs\wphcdoc\wp-admin\includes\class-wp-filesystem-direct.php:67

Hope this helps. That's one heck of a long filename at the top.

Beautiful - I just opened a ticket with the licensing/updating software I use. Let's see what they say :)

Outstanding. This issue is not a show-stopper for me, just so you know. No hurry on a solution, from my perspective.

Thanks for the (usual) rapid response, Tom.

Thanks for the help - hopefully this data will be just what was needed to fix this finally :)

Tom, Jay,

I get this as well using XAMPP but not just GP Premium. I also get the same thing with most plugins that have a licence key, example Beaver Builder Pro behaves the same way. I have to deactivate and delete the plugin then manually add and activate the updated version. A bit of a pain, but it doesn't happen that often and I have sort of just gotten used to it :)

Cheers!
Lyle

If you uninstall the plugin, then reinstall the new plugin, do you lose your settings? I realize one can export/import the settings as part of the reinstall process, but I was hoping the settings survived the uninstall.

Jay,

The settings have all survived for me, GP as well as BB and any others I have done this way.

Cheers!
Lyle

Where does a registered GP Premium user download the latest version of plugin? For the life of me, I can't find it on the site.

On this page, upper right, click Account, your downloads are right there on top ... click to download :)

This archived topic is closed to new replies.