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

Blank page for new user in 5.0.9 and 5.0.11 #4087

Closed
wolkenschieber opened this issue Jul 16, 2013 · 22 comments
Closed

Blank page for new user in 5.0.9 and 5.0.11 #4087

wolkenschieber opened this issue Jul 16, 2013 · 22 comments

Comments

@wolkenschieber
Copy link

I have a problem with new users. If I create a new owncloud user and try to logon with him, only a blank page is shown.

Scenario to reproduce:

  • Login with admin
  • Create new user
  • Logout admin
  • Login with new user
    -> Blank page is shown

Environment: VServer
Server: Apache
Database: Postgres
Client: FIrefox/Opera/Chromium
Owncloud: 5.0.9
Php: 5.3.10

from apache's error log:
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[2
3502]: Not null violation: 7 ERROR: null value in column "unencrypted_size" violates not-null constraint' in /var/www/owncloud/lib/db
.php:1031\nStack trace:\n#0 /var/www/owncloud/lib/db.php(1031): PDOStatement->execute(Array)\n#1 /var/www/owncloud/lib/files/cache/cac
he.php(216): PDOStatementWrapper->execute(Array)\n#2 /var/www/owncloud/lib/files/cache/scanner.php(101): OC\Files\Cache\Cache->put(
'', Array)\n#3 /var/www/owncloud/lib/files/cache/scanner.php(82): OC\Files\Cache\Scanner->scanFile('')\n#4 /var/www/owncloud/lib/files/cache/scanner.php(120): OC\Files\Cache\Scanner->scanFile('files', 3)\n#5 /var/www/owncloud/lib/files/view.php(808): OC\Files\Cache\Scanner->scan('files', false)\n#6 /var/www/owncloud/lib/files/filesystem.php(644): OC\Files\View->getDirectoryContent('')\n#7 /var/www/owncloud/apps/files/index.php(61): OC\Files\Filesystem::getDirectoryContent('')\n#8 /var/www/owncloud/lib/base.php(688): require_once('/var/www/ownclo...')\n#9 /var/www/owncloud in /var/www/owncloud/lib/db.php on line 1031

from postgres error log:
STATEMENT: INSERT INTO "oc_filecache"("mimepart", "mimetype", "mtime", "size", "etag", "path_hash", "path", "parent", "name", "encrypted", "storage") VALUES($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)
ERROR: null value in column "unencrypted_size" violates not-null constraint

Edit:
Same happens with current version 5.0.11. Solving the issue with the ALTER TABLE command still works.

@wolkenschieber
Copy link
Author

After update from 5.0.8 to 5.0.9, following appeared also in the database log:

ERROR: relation "oc_fscache" does not exist at character 36
STATEMENT:
SELECT DISTINCT "user"
FROM "oc_fscache"

Maybe related?

@mmehnert
Copy link

Same here.

@thorpedo
Copy link

same here ...
{"app":"PHP","message":"SQLSTATE[23502]: Not null violation: 7 ERROR: el valor null para la columna \u00abunencrypted_size\u00bb viola la restricci\u00f3n not null at /var/www/html/owncloud/lib/db.php#1031","level":4,"time":1374061191}
{"app":"PHP","message":"Undefined offset: 0 at /var/www/html/owncloud/lib/user/database.php#141","level":2,"time":1374061193}
{"app":"PHP","message":"Undefined offset: 0 at /var/www/html/owncloud/lib/user/database.php#141","level":2,"time":1374061222}
{"app":"PHP","message":"SQLSTATE[23502]: Not null violation: 7 ERROR: el valor null para la columna \u00abunencrypted_size\u00bb viola la restricci\u00f3n not null at /var/www/html/owncloud/lib/db.php#1031","level":4,"time":1374061246}
{"app":"PHP","message":"Undefined offset: 0 at /var/www/html/owncloud/lib/user/database.php#141","level":2,"time":1374061250}

@stolfgang
Copy link

Hi,
same error...
{"app":"PHP","message":"SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "unencrypted_size" violates not-null constraint\nDETAIL: Failing row contains (11338, 2, files/wad2013071b.pdf, b030b7791dd6195dd140107cb40103a7, 12, wad2013071b.pdf, 13, 5, 644593, 1373708718, 0, 51e788e2be74c, null). at /usr/share/webapps/owncloud/lib/db.php#1031","level":4,"time":1374128354}
{"app":"PHP","message":"SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "unencrypted_size" violates not-null constraint\nDETAIL: Failing row contains (11339, 2, files/wad2013071b.pdf, b030b7791dd6195dd140107cb40103a7, 12, wad2013071b.pdf, 13, 5, 644593, 1373708718, 0, 51e788e7b93b1, null). at /usr/share/webapps/owncloud/lib/db.php#1031","level":4,"time":1374128359}
{"app":"PHP","message":"SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "unencrypted_size" violates not-null constraint\nDETAIL: Failing row contains (11437, 2, files/wad2013071b.pdf, b030b7791dd6195dd140107cb40103a7, 12, wad2013071b.pdf, 13, 5, 644593, 1373708718, 0, 51e847645a82a, null). at /usr/share/webapps/owncloud/lib/db.php#1031","level":4,"time":1374177124}

@karlitschek
Copy link
Contributor

@icewind1991 @schiesbn any idea what this could be?

@thorpedo
Copy link

quick fix on db make an alter table oc_filecache encryptsize field change to set value to 0

@debfx
Copy link

debfx commented Jul 22, 2013

The DB updater removes the default value of unencrypted_size while the code expects a non-null default value.
Changing "" to "0" for unencrypted_size in db_structure.xml might fix this.

@wolkenschieber
Copy link
Author

Database schema also needs update:

ownclouddb=# ALTER TABLE ONLY oc_filecache ALTER COLUMN unencrypted_size SET DEFAULT '0';

@m407
Copy link

m407 commented Jul 27, 2013

Had the same error. wolkenschieber solution works for me.

@JimmyAx
Copy link

JimmyAx commented Aug 9, 2013

I also got this one. Solution by @wolkenschieber works great.

@ghost ghost mentioned this issue Aug 12, 2013
@nerzhul
Copy link

nerzhul commented Aug 12, 2013

Confirmed, @wolkenschieber fix works very well.

@voidzero
Copy link

Works for me too. Thanks @wolkenschieber

@tfl
Copy link

tfl commented Aug 14, 2013

@wolkenschieber fixed it for me too

@remd1196
Copy link

ran into a similar issue, using OC 5.0.10, after creating a file from the web interface. it resulted in blanking the folder. I then tried to erase the created file from the command line, then the whole "file" interface was blank. Other ones like "Admin" or "Calendar" where still accessible though direct links.
Error:
Fatal PHP SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "unencrypted_size" violates not-null constraint at /var/www/owncloud/lib/db.php#1075

This happened after enabling and using the encryption app. Disabling the app didnt fix the issue either.
Restoring from a previous backup didnt help either (Didnt restore the db though).

running the suggested command on the OC database fixed the issue:
ALTER TABLE ONLY oc_filecache ALTER COLUMN unencrypted_size SET DEFAULT '0';

Thanks !

@ludwich
Copy link

ludwich commented Aug 23, 2013

Can someone plz help me since i have same issue but dont really understand how you fixed this

@stolfgang
Copy link

Hi,
this Error still exists in OC 5.0.11.
You have to run the cmd "ALTER TABLE ONLY oc_filecache ALTER COLUMN unencrypted_size SET DEFAULT '0';"
after every update of OC.

@tfl
Copy link

tfl commented Sep 11, 2013

I created a pull request for this small change in db_structure.xml

@wolkenschieber
Copy link
Author

Just updated to owncloud 5.0.12. The manual database scheme update wasn't necessary after the process. Can anyone confirm this, so I can close this issue?

@tfl
Copy link

tfl commented Oct 4, 2013

Will try it on sunday evening or on monday.

@nerzhul
Copy link

nerzhul commented Oct 4, 2013

I update my FreeBSD port and i try it.

@nerzhul
Copy link

nerzhul commented Oct 4, 2013

Confirmed. It works perfectly on my FreeBSD 9.2 (pg 9.0), you can close this issue.

@VicDeo
Copy link
Member

VicDeo commented Oct 4, 2013

@wolkenschieber thanks for tracking your report for all this time 🍺
Closing as fixed

@VicDeo VicDeo closed this as completed Oct 4, 2013
@lock lock bot locked as resolved and limited conversation to collaborators Aug 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests