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

Garbage in tweet cause the sync to stop working #195

Open
jeffmaury opened this issue Aug 30, 2024 · 8 comments Β· Fixed by #216
Open

Garbage in tweet cause the sync to stop working #195

jeffmaury opened this issue Aug 30, 2024 · 8 comments Β· Fixed by #216
Labels
bug Something isn't working

Comments

@jeffmaury
Copy link

jeffmaury commented Aug 30, 2024

Describe the bug
A tweet causes the sync to stop working anymore

🦣 client       √ connected
☁️ client       √ connected
profile-sync    √ task finished
content-mapper  √ tweets: total: 1 retweets: 0 replies: 0 quotes: 0
content-mapper  √ task finished
content-sync    / post: β†’ generating β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100% Β« We are hiring: SE (https:... Β»TypeError: Cannot read properties of undefined (reading 'matchAll')
    at file:///C:/Users/Jeff/work/src/github.com/louisgrasset/touitomamout/dist/helpers/tweet/split-tweet-text/extract-words-and-spacers.js:36:34
    at Array.forEach (<anonymous>)
    at extractWordsAndSpacers (file:///C:/Users/Jeff/work/src/github.com/louisgrasset/touitomamout/dist/helpers/tweet/split-tweet-text/extract-words-and-spacers.js:35:13)
    at splitTweetText (file:///C:/Users/Jeff/work/src/github.com/louisgrasset/touitomamout/dist/helpers/tweet/split-tweet-text/split-tweet-text.js:23:21)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async makeBlueskyPost (file:///C:/Users/Jeff/work/src/github.com/louisgrasset/touitomamout/dist/helpers/post/make-bluesky-post.js:40:17)
    at async makePost (file:///C:/Users/Jeff/work/src/github.com/louisgrasset/touitomamout/dist/helpers/post/make-post.js:29:23)
    at async postsSynchronizerService (file:///C:/Users/Jeff/work/src/github.com/louisgrasset/touitomamout/dist/services/posts-synchronizer.service.js:26:70)
    at async touitomamout (file:///C:/Users/Jeff/work/src/github.com/louisgrasset/touitomamout/dist/index.js:21:31)
    at async file:///C:/Users/Jeff/work/src/github.com/louisgrasset/touitomamout/dist/index.js:33:1

To Reproduce
The tweet causing the issue: https://x.com/jeffmaury/status/1829184894372884970

Expected behavior
An error message about parsing error and continue syncing

Screenshots
N/A

Additional supporting information
Windows11 Pro laptop
Using ce672e8

@jeffmaury jeffmaury added the bug Something isn't working label Aug 30, 2024
@trfetzer
Copy link

Have you found a way to fix this without all the content being reposted?

@jeffmaury
Copy link
Author

Have you found a way to fix this without all the content being reposted?

I made a local patch but was not sure about the code so did not submit a PR. Maybe look at #201

@trfetzer
Copy link

trfetzer commented Oct 5, 2024

No I tried to fix it but, well to cut a long story short it didnt work. Did you have a clever or quick way of even identifying the tweet that had the character? Just so that one can avoid using potentially problematic characters.

@louisgrasset
Copy link
Owner

Hello, I've been investigating this. I'm not able to actually reproduce it with the given tweet. Though, I've been able to identify potentially error prone case, so I made a fix for it. Let me know if the issue persist

@trfetzer
Copy link

trfetzer commented Oct 9, 2024

The error still seems to happen unfortunately. It is incredibly strange as I can not identify which posts are triggering this either. @jeffmaury how have you come along on this?

2024-10-09 19:27:21 TypeError: Cannot read properties of undefined (reading 'matchAll')
2024-10-09 19:27:21 at file:///app/dist/index.js:11546:21
2024-10-09 19:27:21 at Array.forEach ()
2024-10-09 19:27:21 at gl (file:///app/dist/index.js:11545:12)
2024-10-09 19:27:21 at Ki (file:///app/dist/index.js:11581:13)
2024-10-09 19:27:21 at async Il (file:///app/dist/index.js:11619:13)
2024-10-09 19:27:21 at async Ol (file:///app/dist/index.js:11652:13)
2024-10-09 19:27:21 at async Gl (file:///app/dist/index.js:11747:40)
2024-10-09 19:27:21 at async vi (file:///app/dist/index.js:11976:13)
2024-10-09 19:27:21 at async Timeout._onTimeout (file:///app/dist/index.js:11992:5)

@jeffmaury
Copy link
Author

A tweet with several links

@trfetzer
Copy link

trfetzer commented Oct 9, 2024

thanks, would make sense to reopen this potentially @louisgrasset , it has been quite erratic behavior.

@louisgrasset
Copy link
Owner

By the way, the potential fix is only on dev tag (just in case you did not tested it)

@louisgrasset louisgrasset reopened this Oct 10, 2024
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

Successfully merging a pull request may close this issue.

3 participants