Skip to content
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

SHARE: 'Add Permission' > granting access causing 'Failed to load data!' #89

Open
jesscmoore opened this issue Dec 12, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@jesscmoore
Copy link
Contributor

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.

Restarted application in 773ms.
flutter: server started 4400
[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>
@gjwgit
Copy link
Contributor

gjwgit commented Dec 13, 2023

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.

image

[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>

@jesscmoore jesscmoore added the bug Something isn't working label Dec 15, 2023
@jesscmoore
Copy link
Contributor Author

Image

[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>

@jesscmoore
Copy link
Contributor Author

This is duplicate of issue #74, which @anushkavidanage Anushka has assigned himself.

@jesscmoore
Copy link
Contributor Author

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>

@jesscmoore jesscmoore assigned jesscmoore and zheyxu and unassigned jesscmoore Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants