anusii / podnotes

GNU General Public License v3.0
2 stars 3 forks source link

LOGIN: app hangs on auth 'Cancel' with null error #66

Open jesscmoore opened 7 months ago

jesscmoore commented 7 months ago

On pressing 'Cancel' in the authorisation pop up, the app crashes with null value error

It opens a login successful window, and the podnotes app hangs, whereas it should close the window and go back to the app login.

Tested on: macos, chrome, web - all hang on press 'Cancel'

Image

Image

chrome error:

flutter run -d chrome
Launching lib/main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...             24.1s
This app is linked to the debug service: ws://127.0.0.1:53066/OFMrOr6dr_E=/ws
Debug service listening on ws://127.0.0.1:53066/OFMrOr6dr_E=/ws

🔥  To hot restart changes while running, press "r" or "R".
For a more detailed help message, press "h". To quit, press "q".

A Dart VM Service on Chrome is available at: http://127.0.0.1:53066/OFMrOr6dr_E=
The Flutter DevTools debugger and profiler on Chrome is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:53066/OFMrOr6dr_E=
Error: Unexpected null value.
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 297:3       throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 806:18  nullCheck
packages/solid_auth/src/openid/src/model/token_response.dart 25:66                get idToken
packages/solid_auth/src/openid/src/openid.dart 231:39                             <fn>
packages/solid_auth/src/openid/src/openid.dart 234:40                             generateLogoutUrl
packages/solid_auth/solid_auth_client.dart 220:34                                 authenticate
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50                <fn>
dart-sdk/lib/async/zone.dart 1661:54                                              runUnary
dart-sdk/lib/async/future_impl.dart 162:18                                        handleValue
dart-sdk/lib/async/future_impl.dart 838:44                                        handleValueCallback
dart-sdk/lib/async/future_impl.dart 867:13                                        _propagateToListeners
dart-sdk/lib/async/future_impl.dart 643:5                                         [_completeWithValue]
dart-sdk/lib/async/future_impl.dart 713:7                                         callback
dart-sdk/lib/async/schedule_microtask.dart 40:11                                  _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5                                   _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 181:7                <fn>

macos error

flutter run -d macos
Launching lib/main.dart on macOS in debug mode...
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006000-0016091821C3401E }
{ platform:macOS, arch:x86_64, id:00006000-0016091821C3401E }
Building macOS application...
2023-12-11 07:28:51.218 podnotes[78857:1212617] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
Syncing files to device macOS...                                   120ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on macOS is available at: http://127.0.0.1:53358/5mQ79ARPK5Y=/
The Flutter DevTools debugger and profiler on macOS is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:53358/5mQ79ARPK5Y=/
flutter: server started 4400
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
#0      TokenResponse.idToken (package:solid_auth/src/openid/src/model/token_response.dart:25:66)
#1      Credential.generateLogoutUrl (package:solid_auth/src/openid/src/openid.dart:231:31)
#2      authenticate (package:solid_auth/solid_auth_client.dart:220:35)
<asynchronous suspension>
#3      LoginScreen.createSolidLoginRow.<anonymous closure> (package:podnotes/login/screen.dart:201:19)
<asynchronous suspension>
gjwgit commented 7 months ago

Confirmed I get the same error on Linux.