Open jesscmoore opened 8 months ago
I see the same behavior for at least the 'card#' example with karen-reep. The permission is then visible next time I start with my login so it seems to do something but does not return.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: RangeError (index): Index out of range: no indices are valid: 0
#0 Uint8List.[] (dart:typed_data-patch/typed_data_patch.dart:2259:7)
#1 ASN1Parser.nextObject (package:asn1lib/src/asn1parser.dart:29:21)
#2 RSAKeyParser._parseSequence (package:encrypt/src/algorithms/rsa.dart:258:23)
#3 RSAKeyParser.parse (package:encrypt/src/algorithms/rsa.dart:214:27)
#4 addPermission (package:podnotes/common/rest_api/res_permission.dart:162:31)
<asynchronous suspension>
#5 _ShareNoteState._displayPermissionInputDialog.<anonymous closure>.<anonymous closure> (package:podnotes/notes/share_note.dart:588:17)
<asynchronous suspension>
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: Failed to load data! Try again in a while.
#0 fetchPubFile (package:podnotes/common/rest_api/rest_api.dart:280:5)
<asynchronous suspension>
#1 checkPublicProf (package:podnotes/common/rest_api/res_permission.dart:272:21)
<asynchronous suspension>
#2 addPermission (package:podnotes/common/rest_api/res_permission.dart:107:9)
<asynchronous suspension>
#3 _ShareNoteState._displayPermissionInputDialog.<anonymous closure>.<anonymous closure> (package:podnotes/notes/share_note.dart:588:17)
<asynchronous suspension>
This is duplicate of issue #74, which @anushkavidanage Anushka has assigned himself.
The Range error is happening in res_permission.dart, where the recipient's public key is empty.
var otherPubKey = await fetchOtherPubKey(authData, permissionWebId);
debugPrint("Other person's public key: {$otherPubKey}");
flutter: Other person's public key: {}
flutter: Other person's public key: {}
flutter: Other person's public key: {-----BEGIN RSA PUBLIC KEY-----
-----END RSA PUBLIC KEY-----}
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: RangeError (index): Index out of range: no indices are valid: 0
#0 _typedDataIndexCheck (dart:typed_data-patch/typed_data_patch.dart:5187:5)
#1 Uint8List.[] (dart:typed_data-patch/typed_data_patch.dart:2233:13)
#2 ASN1Parser.nextObject (package:asn1lib/src/asn1parser.dart:29:21)
#3 RSAKeyParser._parseSequence (package:encrypt/src/algorithms/rsa.dart:258:23)
#4 RSAKeyParser.parse (package:encrypt/src/algorithms/rsa.dart:214:27)
#5 addPermission (package:podnotes/common/rest_api/res_permission.dart:165:31)
<asynchronous suspension>
#6 _ShareNoteState._displayPermissionInputDialog.<anonymous closure>.<anonymous closure> (package:podnotes/notes/share_note.dart:588:17)
<asynchronous suspension>
After clicking 'Add Permission' in the share note view, the app is hanging with the 'Granting Access' indicator flashing. Going back into share view for the same note shows an new permission has been granted. However on logging into the recipient's pod, and clicking Shared Notes, I don't see the shared note.
Steps As jesscmoore, shared note 'Test' with rw to https://pods.solidcommunity.au/karen-reep/profile/card# The app hangs on 'Granting Access'
Retrying with karen webid of https://pods.solidcommunity.au/karen-reep/profile/card#me causes same issue.