Closed eldraquereal closed 1 year ago
Seems to run without the keys - also tested with compiled version
It's basically crashing when trying to decrypt direct message. So either the code is buggy related to key, or its buggy related to event format ( can't handle event format).
By any chance your private or public key start with 0? There is a known issue where Nostr Console can't seem to handle public keys that start with 0.
No, a 5 (pub) and an f (priv) - private key is one generated by Alby if any use?
Interestingly, if I just have the public key on the command line I can read and enter public channels fine - as soon as I add the private key it errors.
can you check if any of these keys is not 64 bytes? It may happen, so just checking.
No, a 5 (pub) and an f (priv) - private key is one generated by Alby if any use?
Interestingly, if I just have the public key on the command line I can read and enter public channels fine - as soon as I add the private key it errors.
have you tried using the priv key and only the priv key?
Just for the record, there are two formats of keys: 1 is the hex format that nostr_console takes, and another is the npub format that's used by Damus. Both can be used to represent the same key.
Issue b: Seems to be same issue: Almost exact same error is seen with private key 1 with argument --prikey=0000000000000000000000000000000000000000000000000000000000000001
Waiting for user posts to come in........done
Waiting for feed to come in..............done
Unhandled exception:
RangeError (end): Invalid value: Not in inclusive range 0..3: -1
#0 RangeError.checkValidRange (dart:core/errors.dart:363:9)
#1 _StringBase.substring (dart:core-patch/string_patch.dart:400:27)
#2 EventData.decryptDirectMessage (package:nostr_console/event_ds.dart:426:27)
#3 EventData.translateAndExpandMentions (package:nostr_console/event_ds.dart:383:27)
#4 Store.handleDirectMessages (package:nostr_console/tree_ds.dart:784:24)
#5 new Store.fromEvents.<anonymous closure> (package:nostr_console/tree_ds.dart:843:9)
#6 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:617:13)
#7 new Store.fromEvents (package:nostr_console/tree_ds.dart:830:24)
#8 getTree (package:nostr_console/tree_ds.dart:2143:24)
#9 main.<anonymous closure>.<anonymous closure> (file:///C:/Users/Vishal/Documents/GitHub/nostr_console/bin/nostr_console.dart:333:26)
#10 new Future.delayed.<anonymous closure> (dart:async/future.dart:424:39)
#11 Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
#12 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
#13 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
hi eldraquereal, can you try running the same keys with the latest release here, version 0.1.5-beta.
I have fixed some such crashes with it, wondering if yours too may get fixed.
No further details known, closing.
dart run bin/nostr_console.dart -p thekey -k theprivkey
Going to use the provided private key Going to use default file to read from and store events: all_nostr_events.txt Reading events from default file.......read 0 posts from file all_nostr_events.txt Waiting for user posts to come in........done Waiting for feed to come in..............done Unhandled exception: RangeError (end): Invalid value: Not in inclusive range 0..3: -1
0 RangeError.checkValidRange (dart:core/errors.dart:363:9)
1 _StringBase.substring (dart:core-patch/string_patch.dart:400:27)
2 EventData.decryptDirectMessage (package:nostr_console/event_ds.dart:296:27)
3 EventData.translateAndExpandMentions (package:nostr_console/event_ds.dart:253:27)
4 Store.handleDirectMessages (package:nostr_console/tree_ds.dart:783:24)
5 new Store.fromEvents. (package:nostr_console/tree_ds.dart:845:9)
6 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:617:13)
7 new Store.fromEvents (package:nostr_console/tree_ds.dart:829:24)
8 getTree (package:nostr_console/tree_ds.dart:2105:24)
9 main.. (file:///D:/Apps/nostr_console/bin/nostr_console.dart:312:26)
10 new Future.delayed. (dart:async/future.dart:424:39)
11 Timer._createTimer. (dart:async-patch/timer_patch.dart:18:15)
12 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
13 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)