-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Error after adding authentication #1102
Comments
@Mimetis any idea what the error is? Sample app with No Authentication - It works perfectly with the same database that is provisioned with no authentication. |
No Idea |
Hi @Mimetis [HelloWebAuthSyncClient.zip] |
plz create a github repository |
Hi @Mimetis github.com/sojan1/Dotmim.Sync.Samples |
Please create a repository with your sample only. |
Hi i have removed all other samples and uploaded again |
link is not working |
i am so sorry for that. |
@Mimetis , Hi, have you had a chance to see the error? |
In the sample you provided, you forgot to add tables to your SyncSetup instance: // [Required]: Get a connection string to your server data source
var connectionString = Configuration.GetSection("ConnectionStrings")["SqlConnection"];
// Set the web server Options
var options = new SyncOptions
{
BatchDirectory = Path.Combine(SyncOptions.GetDefaultUserBatchDirectory(), "server")
};
// ADD TABLES !!!!!!!!!!!!!!!!!!!!
var setup = new SyncSetup();
// ADD
var provider = new SqlSyncChangeTrackingProvider(connectionString);
services.AddSyncServer(provider, setup, options, null); Before testing, be sure you are using a fresh server / client database Last thing, your sample is not running correctly and is not raising the issue you are mentionning. |
provisioning is already done for the database. So should i again have the tables added in the SyncSetup(). |
Hi
It fails after sync reaches 100% and it says UNIQUE constraint failed Is this related to #974 , #907?
I am using the sample application (HelloWebAuthSync).
Hub Database - SQL Server
Client Database -SQLite
i tried from both console application and MAUI. it both shows the same error.
Authentication works well, as i tested it by giving a 'key' different from that of server. and it responds 'unauthorised'
i have also tried [AllowAnonymous] on server still the error is the same.
Error: Dotmim.Sync.SyncException: '[InternalSaveScopeInfoClientAsync]..SQLite Error 19: UNIQUE constraint failed: scope_info_client.sync_scope_id, scope_info_client.sync_scope_name, scope_info_client.sync_scope_hash'.'
Same scope 'v0' synchronizes through a different port (81) [ Sample WebApi with NoAuth under MAUI folder].
![image](https://private-user-images.githubusercontent.com/111710684/267814837-b27f28c6-8036-47fe-b876-3c08c6862392.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MzM3ODcsIm5iZiI6MTczOTQzMzQ4NywicGF0aCI6Ii8xMTE3MTA2ODQvMjY3ODE0ODM3LWIyN2YyOGM2LTgwMzYtNDdmZS1iODc2LTNjMDhjNjg2MjM5Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxM1QwNzU4MDdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iNGM2MTFkNTI0OWMzNThlOTI3NjdmYjA3ZTgzMGI4MGU3NTMxYmRkZmM1MDZkYTVhOGE1OTE5YTE5M2ZmZGYxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.W6YEQc6cvyyxKK6MU9l_zRWQoIXnBo9zBGVJsYxQxa8)
Client
private static async Task SynchronizeAsync()
{
string clientConnectionString = $"Data Source=C:\Users\sojan.GEROC\Documents\Projects\Dotmim.Sync-master\Samples\HelloWebAuthSync\HelloWebAuthSyncClient\CoreDatabase.db";
Server
The text was updated successfully, but these errors were encountered: