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

Bitbucket private repo Update error #482

Closed
yeomann opened this issue Oct 28, 2016 · 44 comments
Closed

Bitbucket private repo Update error #482

yeomann opened this issue Oct 28, 2016 · 44 comments

Comments

@yeomann
Copy link

yeomann commented Oct 28, 2016

So, i have to confirm this, from #474 if you see my last message there, referenced comment
I did some digging and experiment. I have created new account on bitbucket and pushed my repo there and let it be Public. After filling bit bucket settings in github updater setting page, i saw notification of new update for my plugin and was able to update successfully my bitbucket hosted plugin with github-updater6.0.0. New version i.e 6.0.2 failed miserably #481
Now, after making the same Repo private i recived the same error mentioned in issue 474 and same error message as shown below in picture.
errorupdate

I now strongly believe my username and password in bitbucket settings of github-updater are correct and In case repo is private, github-updater is having trouble with bitbucket api. Please help.

Many thanks.

@afragen
Copy link
Owner

afragen commented Oct 28, 2016

Can you update from the update-core.php page?

@yeomann
Copy link
Author

yeomann commented Oct 28, 2016

unfortunately, i tried and couldn't. This was the output i end up with

The update process is starting. This process may take a while on some hosts, so please be patient.

Enabling Maintenance mode…

Updating Plugin visual composer adon (1/1)
Downloading update from https://bitbucket.org/danish_innovia/innovia-vcextend/get/master.zip…
Unpacking the update…
An error occurred while updating visual composer adon: The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature
Disabling Maintenance mode…

Some of your translations need updating. Sit tight for a few more seconds while we update them as well.

Updating translations for WP Job Manager (tr_TR)…

Translation updated successfully.

Updating translations for Twenty Fifteen (tr_TR)…

Translation updated successfully.

Updating translations for Twenty Fourteen (tr_TR)…

Translation updated successfully.

Updating translations for Twenty Sixteen (tr_TR)…

Translation updated successfully.

All updates have been completed.

Return to Plugins page | Return to WordPress Updates page

@afragen
Copy link
Owner

afragen commented Oct 28, 2016

I think I found the problem. I switched to loading the Bitbucket authentication headers in the class Bitbucket_API class from class Base. Moving them back seems to have fixed the issue here.

Update to 6.0.0.3 and let me know please.

@afragen afragen reopened this Oct 28, 2016
@yeomann
Copy link
Author

yeomann commented Oct 28, 2016

Weird, I can't see any notification of update for GitHub-updater plugin?! How I should upgrade to 6.0.0.3 also under your repo release, I can see only 6.0.0 version.

@afragen
Copy link
Owner

afragen commented Oct 28, 2016

Switch to branch develop

@yeomann
Copy link
Author

yeomann commented Oct 28, 2016

Can't see switch options how else can i do?
notshowingbranches

@afragen
Copy link
Owner

afragen commented Oct 28, 2016

My guess is the folder is misnamed.

@yeomann
Copy link
Author

yeomann commented Oct 31, 2016

You might have read last comment of mine from #481. So, after unzipping new downloaded repo, i got github-updater-develop as name. Which didn't show me switch branch option. Even after renaming to github-updater, It was the same story. Unfortunately, About updating from bitbucket private repo, it didn't do the job from plugin panel but update worked from only update-core panel with disabling my plugin.

@afragen
Copy link
Owner

afragen commented Oct 31, 2016

Just so we have a new starting point. You have GHU v6.0.0.4 (develop) installed and running.

In my test installation, I renamed my folder to github-updater-develop. I re activated the plugin and was able to see branch switching. I was also able to update my Bitbucket private test plugin from the plugins page.

What error are you getting when you attempt to update from the plugins page. Opening up your browser console error log should show you the errors.

@cbratschi
Copy link

+1: I have the same issue after upgrading to the 4.x version.

@afragen
Copy link
Owner

afragen commented Oct 31, 2016

I cannot replicate this issue. Is it possible to give afragen read access to these repos?

@cbratschi
Copy link

@afragen I applied your patch but this did not change anything. Unfortunately I cannot give you access to our BitBucket account. But if you need any logs let me know.

Is there a simple way to downgrade? I already upgraded our staging and production environments.

@afragen
Copy link
Owner

afragen commented Oct 31, 2016

@cbratschi I don't need access to the whole account. I would just need read access to the repository in question so I can see if there's an issue.

Can you share the files headers?

@yaronguez
Copy link

I'm having the same issue and can grant you access if you'd like to debug.

@afragen
Copy link
Owner

afragen commented Nov 1, 2016

Yes please.

@yeomann
Copy link
Author

yeomann commented Nov 1, 2016

@afragen @yaronguez I grant you guys Read access.
also @afragen i gave you access on my wp site as well.

@yeomann
Copy link
Author

yeomann commented Nov 1, 2016

okay another update, i have installed new WordPress, downloaded and installed new GHU v6.0.0.4 (develop). This time didn't enable naming extend thing and clicked on enable branch switch and wrote my bit-bucket credentials. Lastly, clicked on private repo checkbox. Now after some refreshes, Switching branch option is being shown now. which is great 😸
To test again that private repo update will work, i pused a test commit. Alas, I couldn't update and received same death message i.e
Update Failed: The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature

@afragen
Copy link
Owner

afragen commented Nov 1, 2016

@yeomann I found a bug, thanks. Update to 6.0.0.5 and let me know if you get the same error.

Of course, it may not fix your issue, but possibly related.

@afragen
Copy link
Owner

afragen commented Nov 1, 2016

@yeomann I was able to remote install, revert version, and update successfully from plugin page, using v6.0.0.5

@yaronguez
Copy link

@afragen I tried to manually install 6.0.0.5 and got the error:
Fatal error: Cannot use object of type stdClass as array in /nas/content/live/gcwaralpha/wp-content/plugins/github-updater/src/GitHub_Updater/Base.php on line 1050

I deactivated it and tried activating the clear-github-updater-cache.php file and then reactivated it and still get the error. The only version I can successfully activate is 6.0.0 which throws the zip error when I try to update a plugin.

@afragen
Copy link
Owner

afragen commented Nov 2, 2016

Can you install and activate the Flush cache plugin?

@afragen
Copy link
Owner

afragen commented Nov 2, 2016

@yaronguez
Copy link

Yes, I tried that. I had to deactivate github-updater to access the site at all since everything was white screen. Then I installed and activated the flush cache plugin. Then I deactivated the flush cache plugin and tried installing 6.0.5 again and again got the white screen.

@afragen
Copy link
Owner

afragen commented Nov 2, 2016

The error is because the cache isn't clear. Install but don't activate 6.0.0.5, activate the clear cache plugin, then activate GHU

@afragen
Copy link
Owner

afragen commented Nov 2, 2016

Do you have any caching enabled on your site?

@yaronguez
Copy link

Yes, it's WP Engine and they have their own cache. What stage should I try to clear it?

@yaronguez
Copy link

Okay, installing but not activating github-updater, installing and activating clear cache plugin, activating github-updater and clearing WP Engine cache seems to have fixed the problem. It also seems that I have to now clear WPEngine cache in order for plugin updates from BitBucket to be recognized. Is that expected? Thanks for all your help!

@afragen
Copy link
Owner

afragen commented Nov 2, 2016

I can't speak to how WP Engine's caching works but I would bet that it clears and refreshes more frequently than GHU's cache. I realize it's difficult to be patient but once you've satisfied yourself that everything works, give yourself 12 hours and see if the update shows.

@yeomann
Copy link
Author

yeomann commented Nov 2, 2016

great work @afragen i'll check and tried to update shortly. Looking for returning with good news! Cheers.

@yeomann
Copy link
Author

yeomann commented Nov 2, 2016

i was not able to update same error with v6.0.5 i think i will delete everything clear cache and start over to see, If i'll be able to update successfully (hopefully yes) or not.

@afragen
Copy link
Owner

afragen commented Nov 4, 2016

And...

@cbratschi
Copy link

If I switch to the developer branch the updater tells me I am already at the latest version.

@afragen
Copy link
Owner

afragen commented Nov 7, 2016

It does that sometimes. Keep trying until it works. Shouldn't take too many tries.

@cbratschi
Copy link

@afragen Still the same message after ten tries. It does not matter which branch I'm selecting.

@afragen
Copy link
Owner

afragen commented Nov 7, 2016

@cbratschi keep trying. It's the one thing I could never figure out how to override.

@afragen
Copy link
Owner

afragen commented Nov 7, 2016

@yeomann sorry for others hijacking the issue. Are you still having problems.

@afragen
Copy link
Owner

afragen commented Nov 8, 2016

@cbratschi I think I've fixed the already up to date issue 4dd351f

@cbratschi
Copy link

@afragen Tried now many times but I was still not able to switch to the development version. When will you push the update to production?

@afragen
Copy link
Owner

afragen commented Nov 11, 2016

I should be pushing this out in next couple of days. Have you recently tried to switch?

@afragen
Copy link
Owner

afragen commented Nov 11, 2016

Another way to force a switch would be to edit the main file and set GitHub Branch: master to GitHub Branch: develop. Since the master branch will always be behind the develop branch version-wise, an update will display once the cache/transients is/are refreshed.

@cbratschi
Copy link

@afragen I've reset the cache and after that it was working. I could successfully update my theme after installing the development version. Thanks a lot.

@afragen
Copy link
Owner

afragen commented Nov 21, 2016

@yeomann are you still having this issue or should we close?

@deckerweb
Copy link

deckerweb commented Nov 22, 2016

I am sorry, but I have the same issue now with Bitbucket after using Bitbucket for a side project with a private repo.

Update:
With GH latest develop version installed (v6.0.0.17) all is fine now on my side - thanks! :-)

@afragen afragen closed this as completed Nov 22, 2016
@afragen afragen reopened this Nov 22, 2016
@afragen
Copy link
Owner

afragen commented Nov 22, 2016

@deckerweb I was able to install and update your plugin too. 👍
You should take a look at https://github.com/afragen/wp-dependency-installer

@afragen afragen closed this as completed Nov 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants