immense / immense/Remotely

UNIQUE constraint failed: BrandingInfos.Id

Open
#674 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
5.1k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

I get this error message if I try to click on "Branding" (new remotely user account):

```
remotely-remotely-1 | [10:44:53 WRN] Unhandled exception rendering component: An error occurred while saving the entity changes. See the inner exception for details. {EventId={Id=100, Name="ExceptionRenderingComponent"}, SourceContext="Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer", TransportConnectionId="zF8OwUwFgQqfSBoL9TFzbw", RequestId="0HMROHJTC19DK:00000001", RequestPath="/_blazor", ConnectionId="0HMROHJTC19DK", ThreadId=27}
remotely-remotely-1 | Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
remotely-remotely-1 | ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 19: 'UNIQUE constraint failed: BrandingInfos.Id'.
remotely-remotely-1 | at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
remotely-remotely-1 | at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
remotely-remotely-1 | at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
remotely-remotely-1 | at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
remotely-remotely-1 | at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
remotely-remotely-1 | at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
remotely-remotely-1 | at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
remotely-remotely-1 | at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
remotely-remotely-1 | --- End of inner exception stack trace ---
```

**To Reproduce**
Steps to reproduce the behavior:
1. Upgrade from old Remotely Version to new

**Remotely Version**
Version: 2023.06.19.0759

**Additional Context**
Add any other context about the problem here.

- I am running Remotely in Docker

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure after upgrading an older Remotely installation in Docker, then trace the Branding entry point and the BrandingInfos database operation. Check the upgrade path and database state to identify why the Id is inserted twice. Done means opening Branding no longer raises the SQLite UNIQUE constraint error.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sqlite
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.