cloudscribe / pwakit

aiming to provide tools to facilitate building PWAs (Progressive Web Apps) with ASP.NET Core
Apache License 2.0
10 stars 0 forks source link

Exception on postgresql - bad Db column name #37

Closed JimKerslake closed 1 year ago

JimKerslake commented 1 year ago

An exception occurred while iterating over the results of a query for context type '"cloudscribe.PwaKit.Storage.EFCore.PostgreSql.PwaDbContext"'." ""Npgsql.PostgresException (0x80004005): 42703: column c.p256dh does not exist POSITION: 77 at Npgsql.Internal.NpgsqlConnector.g__ReadMessageLong|213_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken) at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable1.AsyncEnumerator.MoveNextAsync() Exception data: Severity: ERROR SqlState: 42703 MessageText: column c.p256dh does not exist Hint: Perhaps you meant to reference the column \"c.p256_dh\". Position: 77 File: parse_relation.c Line: 3548 Routine: errorMissingColumn"

JimKerslake commented 1 year ago

Also fix another null ref exception:

An unhandled exception has occurred while executing the request. System.NullReferenceException: Object reference not set to an instance of an object. at cloudscribe.PwaKit.Services.PushServicePushNotificationService.get_PublicKey() in D:\Development\pwakit\src\cloudscribe.PwaKit\Services\Push\PushNotificationService.cs:line 17 at cloudscribe.PwaKit.Controllers.PwaController.GetPublicKey() in D:\Development\pwakit\src\cloudscribe.PwaKit\Controllers\PwaController.cs:line 131 at lambda_method2333(Closure , Object , Object[] )

JimKerslake commented 1 year ago

Also added migration for a stray PgSQL timestamp column to make it 'with timezone'