-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
White screen for admin login after enabling encryption app #12412
Comments
@schiesbn |
Do you have anything in the log file which indicated why the initial encryption failed? |
I am not sure? Here is the log file: http://hastebin.com/ikomahunoc Hopefully this is not giving away too much information :). |
Hmm, are you using external storage ? I see SMB in your logs. I suggest to try applying these patches which might help: |
Samba is not activated. I have configured Dropbox and Google Drive as The external storage app was active, but no provider was configured. I will try the patches soon. |
I have the same problem. |
Try the patches, or better, try OC 7.0.4 RC 1 😄 |
But OC 7.0.4 isn't out yet? |
the first release candidate is out: https://mailman.owncloud.org/pipermail/announcements/2014-December/000059.html (aka testing version) |
Hmmm, I have seen this error happeneing for a newly created uer. After login a white page appears with only the same error message like @Carlgo11, and it was on master. But this cannot be reproduced consistently. Newly created users work. Only that one seemed to be the unlucky one. |
CC @dttpy |
Tried and debug the case I had here, I see that the code says "encryption still running, so force logout": https://github.com/owncloud/core/blob/master/apps/files_encryption/hooks/hooks.php#L91 When the code here is reached after the force-login: https://github.com/owncloud/core/blob/master/lib/private/user.php#L236
Note, I have this case on master c5ee95a From what I see the migration seem to have stuck itself for that user:
This is the folder's contents:
And "welcome.txt" is not encrypted. Not sure why the migration managed to stuck itself this way for such a simple situation. So, two bugs:
@schiesbn comments ? |
I didn't find anything in the logs apart from some older messages about that user having the wrong password. But the messages are from months ago and that user got deleted and then added again today. I verified that when a user is deleted the matching "oc_preferences" are properly reset (in case it would be an older stray migration status) |
I'm facing the same problem, and in my case the issue was the encryption of the already existent files took more than 3600 seconds, and the PHP maximum execution time kicked in (I should probably have increased this timeout beforehand, but I only know it know). So some files were left unencrypted, and that seems to be the issue now. For me the proper path would be to resume the encryption where it stopped, since an interrupted migration might happen because of a number of reasons, like the user closing / refreshing the window, etc. |
I'm having the same Issue: after enabling the encryption app I cannot login again - other user accounts work, however. how do I stop the encryption manually? Can this be done somehow via myPHPadmin or any other workaround? sincere thanks! |
the migration status for a user is stored in the table oc_preferences. @schiesbn we should think about a recovery mechanism for an failed/bombed encryption process |
got it! I'm back in! Thanks!!! Looking forward to ne next update on the encryption app before trying that one again :) |
Let's use this ticket for all issues that caused that "getUID()" exception. As described above, this "getUID()" exception is due to the code path that tries to log out the user due to running migration. |
To make it even cleared, the steps to reproduce:
Step 5 will first show a message "encryption is already running". But then after a little while it will refresh the page and show the exception. Expected is that it shows a message "migration is currently running" with a spinner and stay like this. Observed on master (dc86cbd) |
@PVince81 same problem here, pretty much I've done the same steps you mentioned above (without the two browsers) what's the appropriate action to fix my problem here ?
I just don't want to lose any data, or end up in a situation where some of my data is encrypted and the other is not. Please advise ... |
Same problem here. I have a lot of files and it seems that encryption process stopped as described in the previous posts. @PVince81 Patches are already present in 7.0.4 (which is the latest stable). Any suggestion on how to resume the process or revert changes? |
I believe you should be able to change that migration flag to 0 in the database. The reason why the migration flag is there is to avoid having to check for unencrypted files for every login, which would be quite unefficient. That's why when it's done ownCloud will set it to 1. If you have lots of files, there's a chance that PHP will run into a timeout and kill itself / aborting the process. So you might to reset the flag again. There is a discussion about how to prevent timeout issues here: #10657 |
@PVince81 I did that, this allowed me to login, then I tried to decrypt the file in the personal settings but I keep on getting : Couldn't decrypt your files, please check your owncloud.log or ask your administrator I am afraid that I am left in a state where some of my files are still encrypted, is there a way to fix this? Or at least find out which files are still encrypted and try to recover them ? |
This is what I've done:
Now everything works, thank you. |
@frafra Ok, I will try this, but I have a lot of files and I have feeling that I will have to repeat this 100 times. Is there a way to automate the login ? Or trigger the encryption process, I can then write a script that monitors the file_encryption flag in the database and re-triggers the encryption when it fails. |
You could write a bash script and use curl, or write a php script for this. I think that there could be a better solution. Maybe you could backup your files and your database, and try to disable encryption. |
I already backed up my files and database. Ideally I would like to keep the encryption, but at this stage I want to get my owncloud instance functional ! |
It's automatically triggered when you login, so you need to write a script to do it. You could use curl, javascript... There are many ways, but probably someone has a better solution. |
Did you check owncloud.log ? What errors were there ? (to find out why it couldn't decrypt) |
I run into that issue today for 7 out of 8 times setting up encryption (I only have the getUID() error in the logs and I only have the plain welcome.txt)
|
After applying #13314 (and backporting the method |
I setup v7.0.4 |
@MorrisJobke but in your case you doesn't try to login twice like described here #12412 (comment), right? |
@schiesbn No. Just a single browser. Just login and after ~5s I got redirected to the login page (with the patch I got the "forgot password" and without the blank page with the getUID() error in logs) |
I tried with chromium and firefox |
I have a dump of my instance here. Whoever wants to have a look at it. My architecture: Apache 2.4.10 ArchLinux |
Should we keep this open or was the problem solved through the linked PR ? |
I can confirm this issue resolved as of 8.0.1. At least the case I originally posted ;). |
I just ran into the same issue in ownCloud 8.0.2 on Debian wheezy. PS: For those wondering how to fix the MySQL database entry:
And finally set it to 1 with |
@JoKeyser can you post your log from the white screen moment ? Because this is supposed to be fixed already, but maybe you bumped into another error that triggered similar symptoms. |
@PVince81 actually I didn't get a white screen, just a well-formatted message "Initial encryption running… Please try again later." I thought it fits here nevertheless, please correct if it's better somewhere else. Here's all I've got from |
I think you should set the configvalue to 0 to make sure it retries to encrypt your files. If you set it to "1" it will just believe that it was done. |
After enabling the encryption app as the admin, I can no longer login as said user. The login screen shows the "Initializing encryption" message, spins around for a moment, and then the web page becomes and stays white.
I have disabled the extension in the mysql database directly, and then login works as expected.
Trying now to decrypt the previously encrypted data under Personal settings leads to following errors:
Error encryption library No keys available to decrypt the file: bugabinga/files/Screenshot_2014-11-20-10-05-08.png.part 2014-11-25T10:31:19+00:00 Error Encryption library Private key for user "bugabinga" is not valid! Maybe the user password was changed from outside if so please change it back to gain access 2014-11-25T10:30:24+00:00 Error PHP Call to a member function getUID() on a non-object at /var/www/owncloud/lib/private/user.php#241 2014-11-25T10:27:53+00:00 Error PHP Call to a member function getUID() on a non-object at /var/www/owncloud/lib/private/user.php#241 2014-11-25T10:25:52+00:00 Error PHP Call to a member function getUID() on a non-object at /var/www/owncloud/lib/private/user.php#241 2014-11-25T09:42:12+00:00 Error PHP Call to a member function getUID() on a non-object at /var/www/owncloud/lib/private/user.php#241 2014-11-25T09:39:45+00:00 Error PHP Call to a member function getUID() on a non-object at /var/www/owncloud/lib/private/user.php#241 2014-11-25T09:38:55+00:00 Error PHP shell_exec(): Unable to execute 'command -v smbclient 2> /dev/null' at /var/www/owncloud/apps/files_external/lib/smb.php#143 2014-11-25T09:37:15+00:00 Error Encryption library Could not delete shareKey; does not exist: "/oliver/files_encryption/share-keys/memex/Blog design/Picture.jpeg.zbigniew.shareKey" 2014-11-25T09:31:06+00:00 Error Encryption library Could not delete shareKey; does not exist: "/oliver/files_encryption/share-keys/memex/Blog design/Picture.jpeg.sonja.shareKey" 2014-11-25T09:31:06+00:00 Error Encryption library Could not delete shareKey; does not exist: "/oliver/files_encryption/share-keys/memex/Blog design/Picture.jpeg.nina.shareKey" 2014-11-25T09:31:06+00:00 Error Encryption library Could not delete shareKey; does not exist: "/oliver/files_encryption/share-keys/memex/Blog design/Picture.jpeg.micha.shareKey" 2014-11-25T09:31:06+00:00 Error Encryption library Could not delete shareKey; does not exist: "/oliver/files_encryption/share-keys/memex/Blog design/Picture.jpeg.kristin.shareKey" 2014-11-25T09:31:06+00:00
One of those messages probably resulted in me initially providing the wrong password. "bugabinga" is the admin account. I have since double-checked the pw and am sure its correct. It is relatively long (~30chars) with german umlauts.
For all other accounts, encryption seems to work as expected, and login works.
Is there anything in my setup I need to fix? Change permissions on some folders?
O.
The text was updated successfully, but these errors were encountered: