Skip to content

Usernotes write error #123

Description

@CryptoMaximalist

I'm trying out usernotes instead of modnotes to possibly reduce API hits, and running a very barebones config: https://pastebin.com/GbggRW4m

I'm using the sample code to add a usernote from here: https://github.com/FoxxMD/context-mod/blob/master/docs/subreddit/components/userNotes/usernoteSP.yaml

Below is the logs error:

12:25:11 CDT debug  : [App] API Usage Rolling Avg: 0.07/s | Est Depletion: 2 hours (8,190 seconds)
12:25:08 CDT debug  : [Delayed Activities] No Activities ready to queue
12:25:03 CDT debug  : [Delayed Activities] No Activities ready to queue
12:25:01 CDT debug  : [App] API Usage Rolling Avg: 0.07/s | Est Depletion: 2 hours (8,190 seconds)
12:25:00 CDT info   : [App] CryptoContextModBot from localhost:8095 => CONNECTED
12:24:58 CDT debug  : [Delayed Activities] No Activities ready to queue
12:24:55 CDT verbose: [COM itqv3by] Reddit API Stats: Initial 588 | Current 584 | Used ~4 | Events ~0.00/s
12:24:55 CDT verbose: [COM itqv3by] Run Stats:        Checks 0 | Rules => Total: 0 Unique: 1 Cached: -1 Rolling Avg: ~0.00/s | Actions 0
12:24:55 CDT debug  : [COM itqv3by] [RUN OtherSubsRun] [CHK FreekarmaComments] [Post Check Trigger] Behavior => NEXT RUN => Skip remaining checks and go to next Run
12:24:55 CDT info   : [COM itqv3by] [RUN OtherSubsRun] [CHK FreekarmaComments] Ran Actions: Usernote - usernote
12:24:55 CDT error  : [COM itqv3by] [RUN OtherSubsRun] [CHK FreekarmaComments] [Action Usernote] Action did not run successfully due to unexpected error
ErrorWithCause: 
    at UserNoteAction.handle (/app/src/Action/index.js:123:37)
    at async CommentCheck.runActions (/app/src/Check/index.js:496:29)
    at async CommentCheck.handle (/app/src/Check/index.js:330:49)
    at async Run.handle (/app/src/Run/index.js:156:38)
    at async Manager.handleActivity (/app/src/Subreddit/Manager.js:832:51)
    at async /app/src/Subreddit/Manager.js:363:17

caused by: TypeError: Cannot read properties of undefined (reading 'matches')
    at /app/src/Subreddit/SubredditResources.js:2814:88
    at Array.filter (<anonymous>)
    at notePass (/app/src/Subreddit/SubredditResources.js:2814:74)
    at SubredditResources.isAuthor (/app/src/Subreddit/SubredditResources.js:2834:44)
    at async UserNoteAction.process (/app/src/Action/UserNoteAction.js:43:45)
    at async UserNoteAction.handle (/app/src/Action/index.js:113:29)
    at async CommentCheck.runActions (/app/src/Check/index.js:496:29)
    at async CommentCheck.handle (/app/src/Check/index.js:330:49)
    at async Run.handle (/app/src/Run/index.js:156:38)
    at async Manager.handleActivity (/app/src/Subreddit/Manager.js:832:51)
    at async /app/src/Subreddit/Manager.js:363:17
12:24:55 CDT verbose: [COM itqv3by] [RUN OtherSubsRun] [CHK FreekarmaComments] [Action Usernote] Note:

(spamwatch) User has 32 activities in 1 freekarma sub(s)
12:24:55 CDT debug  : [COM itqv3by] [RUN OtherSubsRun] [CHK FreekarmaComments] Running Actions
12:24:55 CDT info   : [COM itqv3by] [RUN OtherSubsRun] [CHK FreekarmaComments] ✓ => Rules: ✓ Recent - FreeKarmaRule
12:24:55 CDT verbose: [COM itqv3by] [RUN OtherSubsRun] [CHK FreekarmaComments] [Rule Recent - FreeKarmaRule] ✓ 32 activities found in 1 of the specified subreddits (out of 5 total) MET threshold of >= 1 activities -- subreddits: FreeKarma4You
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Subreddit Check] Passed: {"name":{}}
12:24:55 CDT debug  : [COM itqv3by] [Resources] [Activities Fetch] 100 Activities Fetched (1 API Calls) | 39 Met Window Range After Pre Filter
12:24:54 CDT verbose: [COM itqv3by] [RUN OtherSubsRun] [CHK FreekarmaComments] [Author Filter] ✓ => Exclusive author criteria matched => 1 Passed (isMod) | 0 Failed
12:24:54 CDT debug  : [COM itqv3by] [RUN OtherSubsRun] [CHK FreekarmaComments] [Author Filter] Criteria Details: 
isMod => ✓ => Expected: true => Found: false (Exclude passes when Expected is not Found)
12:24:54 CDT debug  : [COM itqv3by] [RUN OtherSubsRun] [CHK FreekarmaComments] [Author Filter] ✓ (AND) => Exclusive Author Criteria 1 => 1 Passed (isMod) | 0 Failed
12:24:54 CDT debug  : [COM itqv3by] [Resources] Cache Hit: Author Check on johnhhyip (Hash authorCrit-CryptoCurrency-johnhhyip-4d05f2d5b644fc00947bbeccc279c0d8994683d4)
12:24:54 CDT verbose: [COM itqv3by] [RUN OtherSubsRun] [Author Filter] ✓ => Exclusive author criteria matched => 1 Passed (isMod) | 0 Failed
12:24:54 CDT debug  : [COM itqv3by] [RUN OtherSubsRun] [Author Filter] Criteria Details: 
isMod => ✓ => Expected: true => Found: false (Exclude passes when Expected is not Found)
12:24:54 CDT debug  : [COM itqv3by] [RUN OtherSubsRun] [Author Filter] ✓ (AND) => Exclusive Author Criteria 1 => 1 Passed (isMod) | 0 Failed
12:24:54 CDT info   : [COM itqv3by] <EVENT>  (Dispatched by undefined | CryptoContextModBot) WTF happened to eth just now? I don't get it the Macro is still the same why the sudden pump? by johnhhyip in https://reddit.com/r/CryptoCurrency/comments/ycqkjy/daily_general_discussion_october_25_2022_gmt0/itqv3by/
12:24:54 CDT info   :  /u/CryptoContextModBot Queued check on https://reddit.com/r/CryptoCurrency/comments/ycqkjy/daily_general_discussion_october_25_2022_gmt0/itqv3by/
12:24:53 CDT debug  : [Delayed Activities] No Activities ready to queue
12:24:48 CDT debug  : [Delayed Activities] No Activities ready to queue
12:24:43 CDT debug  : [Delayed Activities] No Activities ready to queue
12:24:38 CDT debug  : [Delayed Activities] No Activities ready to queue
12:24:33 CDT debug  : [Delayed Activities] No Activities ready to queue
12:24:28 CDT debug  : [Delayed Activities] No Activities ready to queue
12:24:26 CDT info   :  Event polling is PAUSED. (Note: To change polling behavior you must first STOP event polling)
12:24:26 CDT debug  : [Polling] [Comment] Stopping Polling Interval
12:24:26 CDT info   :  /u/CryptoContextModBot invoked 'pause' action for event on r/CryptoCurrency
12:24:23 CDT debug  : [Delayed Activities] No Activities ready to queue
12:24:22 CDT info   :  Activity processing queue started RUNNING with 0 queued activities
12:24:22 CDT info   :  Event polling STARTED
12:24:22 CDT debug  : [Polling] [Comment] Polling Interval Started
12:24:22 CDT debug  :  Starting own streams => COMMENT 30s interval
12:24:22 CDT debug  :  Polling NEWCOMM => create new dedicated stream
12:24:22 CDT info   :  /u/CryptoContextModBot invoked 'start' action for bot on r/CryptoCurrency
12:22:49 CDT debug  : [App] Skipping config check/restart on heartbeat due to previously being stopped by user
12:15:49 CDT info   :  Activity processing queue state set to STOPPED by user
12:15:49 CDT info   :  Note: Polling behavior will be re-built from configuration when next started
12:15:49 CDT info   :  Events STOPPED by user
12:15:49 CDT info   :  /u/CryptoContextModBot invoked 'stop' action for bot on r/CryptoCurrency
12:14:48 CDT info   :  Activity processing queue stopped by system and 2 queued activities cleared (waited 1 seconds while activity processing finished)
12:14:48 CDT warn   :  Waited longer than 5 seconds to stop activities. Something isn't right so forcing stop :/ 
12:14:48 CDT verbose:  Activity processing queue is stopping...waiting for 0 activities to finish processing
12:14:46 CDT verbose: [COM itqv5sx] Reddit API Stats: Initial 0 | Current 0 | Used ~0 | Events ~0.43/s
12:14:46 CDT verbose: [COM itqv5sx] Run Stats:        Checks 0 | Rules => Total: 0 Unique: 0 Cached: 0 Rolling Avg: ~0.36/s | Actions 0
12:14:46 CDT verbose: [COM itqv5sx] No checks triggered

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions