Skip to content

European Cookie Bullshit

Feature Requests

Suggested Topics


  • Site Metrics

    Feature Requests
    2
    +1
    1 Votes
    2 Posts
    104 Views
    codenamejessicaC
    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.
  • 0 Votes
    3 Posts
    117 Views
    A
    Yes, I have tried the sso-oauth2-multiple plugin, and I am currently working on it. However, I am facing some issues. While the user credentials for login and registration are being stored in Keycloak, I am encountering the following errors: Refresh Token Error: 2024-11-21 18:49:12,101 WARN [org.keycloak.events] (executor-thread-17) type="REFRESH_TOKEN_ERROR", realmId="REDACTED", realmName="REDACTED", clientId="REDACTED", userId="null", ipAddress="0:0:0:0:0:0:0:1", error="invalid_token", reason="Token is not active", grant_type="refresh_token", client_auth_method="client-secret" Login Error: 2024-11-21 18:49:40,492 WARN [org.keycloak.events] (executor-thread-18) type="LOGIN_ERROR", realmId="REDACTED", realmName="REDACTED", clientId="REDACTED", userId="REDACTED", ipAddress="0:0:0:0:0:0:0:1", error="invalid_user_credentials", auth_method="openid-connect", auth_type="code", redirect_uri="http://localhost/REDACTED", code_id="REDACTED", username="REDACTED" also seeing the following errors in the console. [image: 1732199758383-a30c36a1-ccc1-4665-abe9-7a3ccb644333-image.png] These errors seem to suggest issues with either the refresh token being inactive or invalid user credentials during login. Do you have any suggestions on resolving these?
  • Real-time posting (socket) improvements

    Feature Requests
    4
    0 Votes
    4 Posts
    173 Views
    barisB
    It looks like this and yeah it is for registered users. [image: 1730513433494-11b8f777-e10c-49ec-b70d-2912e8029ad3-image.png]
  • 0 Votes
    1 Posts
    112 Views
    D
    in this file: src/controllers/uploads.js:154 uploadsController.uploadFile = async function (uid, uploadedFile) { if (plugins.hooks.hasListeners('filter:uploadFile')) { return await plugins.hooks.fire('filter:uploadFile', { file: uploadedFile, uid: uid, folder: 'files', }); } if (!uploadedFile) { throw new Error('[[error:invalid-file]]'); } const isAdmin = await user.isAdministrator(uid); if (!isAdmin && uploadedFile.size > meta.config.maximumFileSize * 1024) { throw new Error(`[[error:file-too-big, ${meta.config.maximumFileSize}]]`); } const allowed = file.allowedExtensions(); const extension = path.extname(uploadedFile.name).toLowerCase(); if (allowed.length > 0 && (!extension || extension === '.' || !allowed.includes(extension))) { throw new Error(`[[error:invalid-file-type, ${allowed.join(', ')}]]`); } const currentDate = new Date(); const year = currentDate.getFullYear() + ''; const month = String(currentDate.getMonth() + 1).padStart(2, '0') + ''; const date = String(currentDate.getDate()).padStart(2, '0') + ''; const random = Math.random().toString(36).substring(2, 4); const dirPath = path.join('files', year, month, date, random); return await saveFileToLocal(uid, dirPath, uploadedFile); }; i thinks this is good for files manager
  • View recently read topics

    Feature Requests
    9
    1 Votes
    9 Posts
    337 Views
    eeeeeE
    Just my opinion but I can't see the use of seeing list of things Ive already read, and >99% of people wouldnt use it. Its better as a plugin (if required), because no point to make Core more complex with rarely (or never) used features. Any hours spent developing that would be 100x better spent on the 'elephant in the room' email signup issues.

Looks like your connection to NodeBB Community was lost, please wait while we try to reconnect.