songchenwen 0 Posted December 17, 2018 Posted December 17, 2018 Newly log in by name failed on an iPhone. The device name contains no ascii characters. When I add several ascii characters to the device name, I can successfully log in. I think the reason for this is that you remove all the non-ascii characters in device name during log in, which result in an empty device name. A potential workaround is to use the device category like "iOS Device" or "Android Device" instead of the empty device name. Logs below. 2018-12-16 23:34:40.273 Info UserManager: Authentication request for *** has succeeded. 2018-12-16 23:34:40.274 Info SessionManager: Creating new access token for user ********* 2018-12-16 23:34:40.275 Error HttpServer: Error processing request *** Error Report *** Version: 3.5.3.0 Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb Operating system: Unix 4.13.4.1 64-Bit OS: True 64-Bit Process: True User Interactive: True Processor count: 8 Program data path: /var/lib/emby Application directory: /opt/emby-server/system Constraint: NOT NULL constraint failed: Tokens.DeviceName SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown. at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc) at SQLitePCL.pretty.StatementImpl.MoveNext() at Emby.Server.Implementations.Security.AuthenticationRepository.<>c__DisplayClass5_0.<Create>b__0(IDatabaseConnection db) at SQLitePCL.pretty.DatabaseConnection.<>c__DisplayClass20_0.<RunInTransaction>b__0(IDatabaseConnection db) at SQLitePCL.pretty.DatabaseConnection.RunInTransaction[T](IDatabaseConnection This, Func`2 f, TransactionMode mode) at SQLitePCL.pretty.DatabaseConnection.RunInTransaction(IDatabaseConnection This, Action`1 action, TransactionMode mode) at Emby.Server.Implementations.Security.AuthenticationRepository.Create(AuthenticationInfo info) at Emby.Server.Implementations.Session.SessionManager.GetAuthorizationToken(User user, String deviceId, String app, String appVersion, String deviceName) at Emby.Server.Implementations.Session.SessionManager.AuthenticateNewSessionInternal(AuthenticationRequest request, Boolean enforcePassword) at MediaBrowser.Api.UserService.Post(AuthenticateUserByName request) at Emby.Server.Implementations.Services.ServiceExecGeneral.GetTaskResult(Task task) at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, ILogger logger, String operationName, CancellationToken cancellationToken) at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IHttpRequest httpReq, String urlString, String host, String localPath, CancellationToken cancellationToken) SQLitePCL.pretty.SQLiteException at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc) at SQLitePCL.pretty.StatementImpl.MoveNext() at Emby.Server.Implementations.Security.AuthenticationRepository.<>c__DisplayClass5_0.<Create>b__0(IDatabaseConnection db) at SQLitePCL.pretty.DatabaseConnection.<>c__DisplayClass20_0.<RunInTransaction>b__0(IDatabaseConnection db) at SQLitePCL.pretty.DatabaseConnection.RunInTransaction[T](IDatabaseConnection This, Func`2 f, TransactionMode mode) at SQLitePCL.pretty.DatabaseConnection.RunInTransaction(IDatabaseConnection This, Action`1 action, TransactionMode mode) at Emby.Server.Implementations.Security.AuthenticationRepository.Create(AuthenticationInfo info) at Emby.Server.Implementations.Session.SessionManager.GetAuthorizationToken(User user, String deviceId, String app, String appVersion, String deviceName) at Emby.Server.Implementations.Session.SessionManager.AuthenticateNewSessionInternal(AuthenticationRequest request, Boolean enforcePassword) at MediaBrowser.Api.UserService.Post(AuthenticateUserByName request) at Emby.Server.Implementations.Services.ServiceExecGeneral.GetTaskResult(Task task) at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, ILogger logger, String operationName, CancellationToken cancellationToken) at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IHttpRequest httpReq, String urlString, String host, String localPath, CancellationToken cancellationToken)
Luke 42078 Posted December 17, 2018 Posted December 17, 2018 @@songchenwen, ah yes, good catch, thanks ! We need to revamp the way we transmit the device name from app to server, but this workaround will be fine in the meantime. Thank you.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now