Wiki: Cannot create new user from Google - String or binary data would be truncated.

Created on 13 Dec 2019  路  3Comments  路  Source: Requarks/wiki

Describe the bug
Some of us were able to create users through google just fine but the third person to try got this error after selecting their google account.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the login page
  2. Click on 'Google'
  3. Pick a google account
  4. See error:
    insert into [users] ([createdAt], [email], [isActive], [isSystem], [isVerified], [localeCode], [name], [pictureUrl], [providerld], [providerKey], [tfalsActive], [updatedAt]) output inserted.[id] values (@p0,@pl, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @pl O, @p11) - String or binary data would be truncated.

Expected behavior
The user gets created.

Screenshots
image

Host Info (please complete the following information):

  • OS: Windows Server 2012 R2
  • Wiki.js version: [e.g. 2.0.12]
  • Database engine: MS SQL Server 2016

Additional context
Add any other context about the problem here.

bug

Most helpful comment

Fixed by 4698afdaeb422b39479a20900c0bbdbb9587684e

You can modify the column. The only issue that could arise is if the login token (which contains the picture url) becomes too large to be stored by the browser.

All 3 comments

I found the issue. The pictureUrl it was trying to insert was 808 characters and the column in the DB is only 255.

Is it a bad idea to modify this column in my database? is it likely to cause issues elsewhere?

Fixed by 4698afdaeb422b39479a20900c0bbdbb9587684e

You can modify the column. The only issue that could arise is if the login token (which contains the picture url) becomes too large to be stored by the browser.

I have changed it to 1000 characters in my DB. And it hasn't caused any issues for me. Thanks for the reassurance

Was this page helpful?
0 / 5 - 0 ratings

Related issues

touhoku-japan picture touhoku-japan  路  3Comments

p-se picture p-se  路  3Comments

SharkProgramming picture SharkProgramming  路  4Comments

sleepadru picture sleepadru  路  4Comments

den1622 picture den1622  路  3Comments