Skip to content
  • 2 Votes
    20 Posts
    2k Views
    Jessica BrownC
    Try now, if it doesn't work. Then log out and log in, it should work then
  • 0 Votes
    3 Posts
    156 Views
    S
    @baris wonderful! it works. Thanks.
  • Site Metrics

    Feature Requests
    2
    +1
    1 Votes
    2 Posts
    131 Views
    Jessica BrownC
    OK! So I officially HATE programming for WebSockets!!! Also it finally freaking works now... [image: 1734265101425-95a2487f-053a-44d7-842e-ce34ee7e8d22-image.png] tl;dr Let me preface this by saying that I’m usually more on the backend and systems side of development, where things are a bit more predictable. I’m not constantly pushing or pulling data dynamically, so WebSockets haven’t been a major part of my daily grind. Most of my interactions with them have been limited to fixing something trivial like an nginx.conf issue (you know, the "why isn’t this reverse proxy working?!" moments) or tweaking configuration for an existing setup. But then I decided to dive into actually developing a WebSocket implementation in NodeJS. Oh boy, was that an adventure. And by "adventure," I mean the kind where you’re stranded in a forest with no map, no snacks, no tent, no friends, no legs, no arms, and it’s starting to rain. Let's take an adventure together, shall we? Here are the main pain points I’ve encountered so far: The State Management Rabbit Hole WebSockets are a beast (you know the real word I wanted to use) when it comes to managing states. You have to keep track of which clients are connected, what data they should receive, and when to clean up stale connections. It’s like maintaining a live orchestra while random musicians keep joining and leaving mid-performance. Error Handling is a Nightmare Oh, you thought HTTP error codes were frustrating? Wait until you try debugging a WebSocket connection that mysteriously drops, reconnects, or worse, stays open but doesn’t actually work. The lack of clear error feedback is maddening. Concurrency, But Make It Fun... Not! Handling multiple connections simultaneously in NodeJS isn’t terrible in theory. But in practice, juggling all these connections and ensuring they don’t block each other feels like spinning plates on fire. Forget one plate, and suddenly your server’s on the floor. Protocol Nuances WebSocket communication requires a careful dance of handshakes and messages. Forget one small step, and everything crumbles. I definitely spent more time than I’d like to admit chasing down handshake errors that turned out to be... drumroll... a header issue. Testing Is a Whole Other Can of Worms Writing tests for WebSocket functionality is challenging. Simulating client-server communication, ensuring reconnections work as intended, and validating edge cases is a slog. There’s no easy curl command for WebSockets. Port in Use We haven’t even started talking about port conflicts yet... Oh yeah, THAT was fun. Nothing like the good ol’ "Port 3001 in use". Wait, WHAT?! I run lsof -i :3001 to track down the culprit, and it returns... nothing. Absolutely nothing. Thanks, WebSocket! You’re really earning that love-hate badge today. I know WebSockets are powerful, especially for real-time communication like chat apps, live notifications, or... you know... dashboards. But wow, they don’t make it easy to appreciate their elegance during development. For now, I’ll begrudgingly admit that I’m learning a lot. But I’ll also happily admit that I’m counting down the days until this project is done.
  • Am I Missing Something?

    Unsolved Technical Support
    1
    0 Votes
    1 Posts
    88 Views
    Jessica BrownC
    Ok, I may be the weird one here, but I want to display Powered by NodeBB on the forums of my site. Although it is not there, I know I can put it in a widget and display it in the global footer. But I am surprised that it isn't there by default. Did I accidently turn it off? Is it not there by default on the Peace Theme? Thought I would ask first.
  • [nodebb-theme-peace] Peace Theme for NodeBB

    NodeBB Themes
    16
    +0
    15 Votes
    16 Posts
    9k Views
    Jessica BrownC
    @baris Thank you, yeah I already did that, fork will make the modification once I move the main site's header over and put it in its breadcrumb area. Anyways, I really appreciate how quickly you respond, and will continue to do my addons over time.
  • 2 Votes
    9 Posts
    4k Views
    https://github.com/q8888620002/nodebb-plugin-elasticsearch#readme Does anyone know if the elasticsearch plugin is currently working? This plugin has commit history up to 2017. Or is the meilisearch plugin the latest? Should I use https://github.com/oplik0/nodebb-plugin-meilisearch? I need to implement Korean search, so I need (additionally) a search function in addition to nodebb-plugin-dbsearch.
  • NodeBB 3.11.0

    NodeBB Development
    5
    +5
    4 Votes
    5 Posts
    760 Views
    buskerB
    It's a very useful feature improvement.
  • Lemmy and NodeBB

    ActivityPub
    17
    0 Votes
    17 Posts
    2k Views
    julianJ
    @[email protected] image attachments should be better handled by NodeBB now
  • Add a back to top button

    General Discussion
    2
    +0
    3 Votes
    2 Posts
    378 Views
    Jessica BrownC
    I've added this to a template I am building. Nice work. Simple, yet effective!
  • Allow User Data and Cookies Cross Domain

    Unsolved Technical Support
    5
    1 Votes
    5 Posts
    150 Views
    Jessica BrownC
    Actually, figured it out! I would like to tell you what I did, but I really don't know. I broke my CSRF tokens, then in pure panic fixed it by messing around with the nginx config. But let me show you what is working: The nginx config above (I edited it with the new one) This code here for the Logout: updateUserNavForLoggedInUser(userData) { const navContainer = document.getElementById('elUserNav'); const userPicture = userData.picture ? `<a href="https://discussions.codenamejessica.com/user/${userData.username}" rel="nofollow" class="nodebbUserPhoto nodebbUserPhoto--fluid nodebbUserNav__link" title="Go to ${userData.username}'s profile"> <img src="${userData.picture}" alt="${userData.username}" class="nodebbUserNav__avatar"> </a>` : `<a href="https://discussions.codenamejessica.com/user/${userData.username}" rel="nofollow" data-nodebb-hook="userNoPhotoWithUrl" class="nodebbUserPhoto nodebbUserPhoto--fluid nodebbUserNav__link" title="Go to ${userData.username}'s profile"> <div class="nodeBBNavNoPhotoTile"> ${this.getInitial(userData.username)} </div> </a>`; navContainer.innerHTML = ` <li data-el="profile"> ${userPicture} </li> <li data-el="logout"> <button class="nodebbUserNav__link" id="logoutButton"> <i class="fa-solid fa-right-from-bracket" aria-hidden="true"></i> <span class="nodebbUserNav__text">Log Out</span> </button> </li> `; // Attach the logout functionality to the button document.getElementById('logoutButton').addEventListener('click', this.logoutUser); }, logoutUser() { axios.get('https://discussions.codenamejessica.com/api/config', { withCredentials: true, // Include cookies }) .then(response => { const csrfToken = response.data.csrf_token; // Extract CSRF token return axios.post('https://discussions.codenamejessica.com/logout', {}, { withCredentials: true, // Include cookies headers: { 'x-csrf-token': csrfToken, // Use retrieved CSRF token }, }); }) .then(() => { window.location.href = 'https://codenamejessica.com/'; }) .catch(error => { console.error('Error logging out:', error); alert('Failed to log out. Please try again.'); }); }, Ultimately It took getting the user's x-csrf token, which I acquired by adding the x-csrf items and adding the logout to the api section of the nginx config. Then I was able to acquire the x-csrf from the const csrfToken = response.data.csrf_token;. Sending that in with a post, and redirect back to the website. AGGHHH! That was hard! Don't judge me, I see your eyes giving me those looks.
  • Inconsistent Line Spacing Issue in Peace Theme

    Bug Reports
    10
    +0
    0 Votes
    10 Posts
    141 Views
    Jessica BrownC
    It seemed to work on mine: [image: 1733994812099-8416c85f-a14c-467e-8a83-746a76cae4c4-image.png] Did you make sure you enabled Custom CSS switch? [image: 1733994866043-7e13e08d-78ba-4761-9927-4ed3df4fbde6-image.png]
  • Pass variables into nodebb

    General Discussion
    5
    0 Votes
    5 Posts
    187 Views
    phenomlabP
    @codenamejessica no problems. It's standard GET and POST variable passing which works fine with same-origin
  • Post spacing

    General Discussion
    5
    +0
    0 Votes
    5 Posts
    149 Views
    D
    @baris I'll let it stay as it is then. Thank you.
  • nodebb custom plugin does not work

    NodeBB Plugins
    3
    0 Votes
    3 Posts
    115 Views
    <baris>B
    @fahx00s post your custom plugin on github so we can see the code. If the client side js isn't executed properly that's likely a build issue.
  • Persona logo too small

    Solved Technical Support
    3
    0 Votes
    3 Posts
    88 Views
    kainosK
    @baris said in Persona logo too small: You can use the custom css tab to change the height on persona, something like below. .header .forum-logo { max-height: 75px; // default is 50px for persona width: auto; } So simple, thanks baris
  • 5 Votes
    1 Posts
    257 Views
    julianJ
    The full minutes from the Forum and Threaded Discussions Task Force monthly meeting (held on 5 December) can be found at this Google Docs link The minutes are also inline below. Apologies in advance if I misrepresented anybody or missed any crucial bits of information. December 2024 Minutes Forum and Threaded Discussions Task Force --- Housekeeping Julian noted that the event description in the SWICG calendar calls for a monthly meeting from 1700 to 1800 UTC, although the scheduled time is pegged to 1300 to 1400 Eastern Time (observing DST). Dmitri (absent from meeting) to update event description as:Article and Mastodon treatment of non-notes Darius provided an update – been under the weather and busy with some other work-related items, but: Mastodon team cautiously optimistic about upstream PR, some concerns were voiced over things like inline images Hopefully by next month will have something more concrete to show to them; re: demo package Evan (@[email protected]) planning to get some people together in-person, to work together at FOSDEM in Brussels (Feb 2025); specifically to address long-form text issue Discussions about this in the task force would be considered the crucial pre-work Darius will update the group if something happens before January (re: code or PR package) A test instance up and running, Darius plans to make it more accessible for others to check out Silverpill’s FEP 171b is now an official draft, open for comments on SocialHub No specifics, just a news item. Context collections FEP Convergence Rationale for recommendation outlined in meeting agenda. Evan (@[email protected]) and a (@[email protected]) met up just prior to the WG meeting to discuss and work out differences between their FEPs; main notes: Using context to represent a reply tree is good Restricting usage of context is not the goal of 7888 or the ForumWG Co-exists well with 76ea’s thr:thread property to denote a reply tree, etc. Recommending use of as:context is one good way forward Evan recommends that the “should” in the proposal be changed to a “may” PROPOSAL: Publishers SHOULD use `context` for grouping related objects in a thread (but this is not the only way to use context). RESOLVED with 8 ayes, no nays, and no abstentions Brainstorming focus items for 2025 Emelia (@[email protected]) – multiple contexts? a (@[email protected]) : we need to also handle the fact that some contexts may not resolve Emelia: as:context can be an array of values in JSON-LD a: inReplyTo can have multiple values too; but in general, on the producing side we generate a single value – generally expect context/thread to remain the same (singular values) Sebi: "we thought a lot about multiple contexts" - led us to the conclusion of using profiles/describes property; per spec can only have one value Julian: Handling when implementors (e.g. lemmy/piefed) don't have the concept of topics a: there are multiple different models of how items are grouped together; reply tree model works for large part of the fediverse; mastodon has concept of reply tree represented internally as a conversation (vs context); this could be expanded into a conversation having an owner, etc.; mastodon has the conceptual ground to build upon Evan: reply trees work well on microblogs, blog comment trees, threaded posting systems, forums; other applications expect a more serial model... messenger/chat systems, where ordering of objects is not in a tree, no explicit relation between them; hashtags, locations, few other ways to use context Emelia: clarify overlap between replies collection and context collection? a: in general will include both ancestors and descendants; could add filters, look at tags, etc. to get subsets. If you are querying by context, you are looking for all objects related by said context Evan: full tree Julian: Mastodon reply-tree service proposed (https://github.com/NeuromatchAcademy/mastodon/pull/44) Julian: worried about scalability and performance of a backend service iterating through an entire reply tree; advocates that retrieving as:context is more performant especially if we build in some tooling for synchronization and member checking Emelia: historical reports of harassment due to `inReplyTo`; when looking at context including descendents, then how do we generate the tree? Evan: fep 76ea goes into detail about how reply trees can be managed a: answer is "who has the authority?"; who decides what goes into the collection? the `attributedTo` actor. For the replies collection, this exists IN PARALLEL TO `context`; in some ways a subset of the thread; could be a point of contention for systems that expect all objects to exist in general vs. conversation oriented Julian: upends expectation that objects are independent Darius: does this relate to announce leaking? recommendations that you not forward the entire object, just the ids Emelia: related but different; announce leaking -- should only ever do objects by ref (by the id) a: the paradigm shift is more social rather than technical -- that you cannot just rely on inReplyTo to prove that an object is approved some duplication as context includes replies, but they are distinct collections. They are decided by different authorities. `replies` is decided by whoever wrote the post Ted (@[email protected]): This sounds a lot like reinventing netnews, without taking the lessons that were learned from it; blurring the ideas of message store/relay/display; for all of this to work, the system has to pick up all replies, and let the client filter. Julian/a: anything specific to share? lessons, etc. – definitely of interest in not repeating the same mistakes
  • Email missing while API create user

    Solved Technical Support
    4
    0 Votes
    4 Posts
    76 Views
    <baris>B
    You can read more info here https://community.nodebb.org/topic/16962/all-about-emails-and-how-they-re-used-in-nodebb, tldr version is passing in email to user.create only sends a confirmation email to that email and doesn't set the email to the user account. Only when the user clicks the link in the confirmation email it is set into the user account.
  • Redirect Users to Another Website for Registration

    Unsolved Technical Support
    3
    0 Votes
    3 Posts
    150 Views
    S
    I've managed to do it with this plugin : https://github.com/julianlam/nodebb-plugin-session-sharing
  • Happy Friday Everyone!

    General Discussion
    1
    0 Votes
    1 Posts
    73 Views
    Jessica BrownC
    As another week comes to a close, let's take a moment to celebrate our accomplishments and recharge for the exciting challenges ahead. Whether you're coding a new feature, troubleshooting a tricky bug, or strategizing your next business move, remember this: You are capable of amazing things. The world of development is a dynamic one, filled with constant learning, problem-solving, and innovation. It demands resilience, creativity, and a growth mindset. Embrace the challenges that come your way, for they are opportunities to learn and grow. Remember the passion that ignited your journey. Whether you're driven by the thrill of building something new, the desire to solve real-world problems, or the dream of creating a successful business, hold onto that fire. Let it fuel your perseverance and inspire you to push beyond your limits. The road to success is rarely linear. There will be setbacks, doubts, and moments of frustration. But even in the face of adversity, never lose sight of your goals. Trust in your abilities, learn from your mistakes, and keep moving forward. We are all part of a vibrant and supportive community. Reach out to your fellow developers, share your knowledge, and seek inspiration from others. Collaboration can spark new ideas, accelerate your progress, and remind you that you're not alone on this journey. As you head into the weekend, take time to relax, recharge, and reflect on your achievements. Celebrate the progress you've made, no matter how small. You deserve it. Here's to a weekend filled with joy, inspiration, and well-deserved rest. Have a fantastic Friday and an even better week ahead! Codename: Jessica Linux Enthusiast | Adventurer | Smart Ass My Site | Join the Forum [image: 9wqynsG.png] [image: endpoint?url=https%3A%2F%2Fquotes.codenamejessica.com%2Frandom-quote&cacheSeconds=10&style=for-the-badge]
  • Acitavation email

    Unsolved Technical Support
    5
    0 Votes
    5 Posts
    104 Views
    Jessica BrownC
    Let's see if we can break this down. This is what happened to me. I made sure 25, 443, 465, and 587 were open in the firewall, but email was still being blocked with similar messages. I contacted IONOS (my hosting provider), and they told me that port 25 blocks any mail attempt and it needs to be opened before 587 would work. I think is stupid (or a croc of $h..) but here we are, they opened port 25 and everything is working again. 550-Requested action not taken: mailbox unavailable: This indicates that the recipient's email address couldn't be found or is inaccessible on their mail server. 550-Sender address is not allowed: This means the recipient's mail server has blocked your server's sender address or domain. 550 1MspyA-1tdm9M1E6a-012smp: This is a unique identifier for the error on the recipient's server, not very helpful for troubleshooting. Here's a breakdown of potential causes and how to troubleshoot them: Recipient Email Address Issues: Typo in the email address: Double-check for any typos in the recipient's email address. Even a small mistake can cause this error. Always start with the simplest solution, and also make sure the mailbox exists and isn't full. (I am sure you have already tried these, but it doesn't hurt to double-triple check) Sender Reputation and Authentication: Sender address is blacklisted: Your server's IP address or sending domain may be on a blacklist due to past spam complaints or issues. You can use tools like MXToolbox to check if your server's IP is blacklisted. Lack of proper authentication: The recipient's server may require authentication (like SPF, DKIM, or DMARC) to verify that your server is authorized to send emails from the sender's domain. Make sure these authentication methods are correctly set up for your domain. Reverse DNS issues: The recipient server might be checking for a valid reverse DNS record for your server's IP address. Ensure that your server has a proper PTR record that matches your domain name. Server Configuration Problems: Firewall issues: A firewall on your server or the recipient's server might be blocking the connection or specific ports needed for email communication. Incorrect MX records: MX records tell email servers where to deliver mail for your domain. If your domain's MX records are incorrect, emails might be sent to the wrong server. Relaying issues: The recipient's server may be configured to prevent relaying, which is when a server sends an email to a recipient that's not hosted on that server. This is a security measure to prevent spam. Other types of troubleshooting Check your server logs: Look for any error messages or clues about why the email was rejected in your mail server logs (e.g., /var/log/mail.log). Contact the recipient's email provider: If you suspect the issue is on their end, you may need to reach out to their email provider for assistance. Once you get it working, don't forget to: Use an email testing tool: Tools like Mail-tester.com can help you diagnose email deliverability problems and identify potential issues with your server configuration or sender reputation. Codename: Jessica Linux Enthusiast | Adventurer | Smart Ass My Site | Join the Forum [image: 9wqynsG.png] [image: endpoint?url=https%3A%2F%2Fquotes.codenamejessica.com%2Frandom-quote&cacheSeconds=10&style=for-the-badge]