Git Product home page Git Product logo

Comments (12)

ThatOneCalculator avatar ThatOneCalculator commented on May 17, 2024 1

Sorry for the late reply.

Last pull: 3 days ago
Trying to do: run my own instance and make an account
Screenshot:
image

from spacebarchat.

ThatOneCalculator avatar ThatOneCalculator commented on May 17, 2024 1

Sounds good! Just LMK when that's all ready and I'll pull and try and set it up then

from spacebarchat.

SamuelScheit avatar SamuelScheit commented on May 17, 2024

What system are you using, when did you pull the latest version, what were you trying to do?
Also can you send a screenshot of the /auth/register response in your browsers dev tools network tab

from spacebarchat.

ThatOneCalculator avatar ThatOneCalculator commented on May 17, 2024

Output from application (in terminal):

MongoError: BSON field 'update.updates.u' is the wrong type 'array', expected type 'object'
    at MessageStream.messageHandler (/home/the1calc/fosscord_clone/scripts/setup/fosscord/api/node_modules/mongoose/node_modules/mongodb/lib/cmap/connection.js:272:20)
    at MessageStream.emit (events.js:400:28)
    at processIncomingData (/home/the1calc/fosscord_clone/scripts/setup/fosscord/api/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js:144:12)
    at MessageStream._write (/home/the1calc/fosscord_clone/scripts/setup/fosscord/api/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js:42:5)
    at writeOrBuffer (internal/streams/writable.js:358:12)
    at MessageStream.Writable.write (internal/streams/writable.js:303:10)
    at Socket.ondata (internal/streams/readable.js:726:22)
    at Socket.emit (events.js:400:28)
    at addChunk (internal/streams/readable.js:290:12)
    at readableAddChunk (internal/streams/readable.js:265:9)
    at Socket.Readable.push (internal/streams/readable.js:204:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:188:23) {
  operationTime: Timestamp { _bsontype: 'Timestamp', low_: 1, high_: 1628801074 },
  ok: 0,
  code: 14,
  codeName: 'TypeMismatch',
  '$clusterTime': {
    clusterTime: Timestamp { _bsontype: 'Timestamp', low_: 1, high_: 1628801074 },
    signature: { hash: [Binary], keyId: 0 }
  }
} Promise {
  <rejected> MongoError: BSON field 'update.updates.u' is the wrong type 'array', expected type 'object'
      at MessageStream.messageHandler (/home/the1calc/fosscord_clone/scripts/setup/fosscord/api/node_modules/mongoose/node_modules/mongodb/lib/cmap/connection.js:272:20)
      at MessageStream.emit (events.js:400:28)
      at processIncomingData (/home/the1calc/fosscord_clone/scripts/setup/fosscord/api/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js:144:12)
      at MessageStream._write (/home/the1calc/fosscord_clone/scripts/setup/fosscord/api/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js:42:5)
      at writeOrBuffer (internal/streams/writable.js:358:12)
      at MessageStream.Writable.write (internal/streams/writable.js:303:10)
      at Socket.ondata (internal/streams/readable.js:726:22)
      at Socket.emit (events.js:400:28)
      at addChunk (internal/streams/readable.js:290:12)
      at readableAddChunk (internal/streams/readable.js:265:9)
      at Socket.Readable.push (internal/streams/readable.js:204:10)
      at TCP.onStreamRead (internal/stream_base_commons.js:188:23) {
    operationTime: Timestamp { _bsontype: 'Timestamp', low_: 1, high_: 1628801074 },
    ok: 0,
    code: 14,
    codeName: 'TypeMismatch',
    '$clusterTime': { clusterTime: [Timestamp], signature: [Object] }
  }
}
register [email protected] t1c ::ffff:45.49.235.39
Error: Invalid Form Body
    at Object.FieldErrors (/home/the1calc/fosscord_clone/scripts/setup/fosscord/api/dist/util/instanceOf.js:24:12)
    at /home/the1calc/fosscord_clone/scripts/setup/fosscord/api/dist/routes/auth/register.js:80:32
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

from spacebarchat.

SamuelScheit avatar SamuelScheit commented on May 17, 2024

can you show the request body

from spacebarchat.

ThatOneCalculator avatar ThatOneCalculator commented on May 17, 2024

How do I do that?

from spacebarchat.

SamuelScheit avatar SamuelScheit commented on May 17, 2024

click on header of the request /auth/register request in the network dev tools
and scroll down to body

from spacebarchat.

ThatOneCalculator avatar ThatOneCalculator commented on May 17, 2024

image

from spacebarchat.

ThatOneCalculator avatar ThatOneCalculator commented on May 17, 2024

Also, I ran a git pull and now it's completely broken lol

➜  api git:(master) ✗ npm start

> @fosscord/[email protected] start
> npm run build && node dist/start


> @fosscord/[email protected] build
> tsc -b .

src/middlewares/RateLimit.ts:109:18 - error TS2339: Property 'global' does not exist on type '{ ip: { enabled: boolean; count: number; timespan: number; }; routes: { auth?: { login?: RateLimitOptions | undefined; register?: RateLimitOptions | undefined; } | undefined; }; }'.

109  const { routes, global, ip, error } = Config.get().limits.rate;
                     ~~~~~~

src/middlewares/RateLimit.ts:109:30 - error TS2339: Property 'error' does not exist on type '{ ip: { enabled: boolean; count: number; timespan: number; }; routes: { auth?: { login?: RateLimitOptions | undefined; register?: RateLimitOptions | undefined; } | undefined; }; }'.

109  const { routes, global, ip, error } = Config.get().limits.rate;
                                 ~~~~~

src/middlewares/RateLimit.ts:112:13 - error TS2345: Argument of type '{ enabled: boolean; count: number; timespan: number; bucket: string; onlyIp: true; }' is not assignable to parameter of type '{ bucket?: string | undefined; window: number; count: number; bot?: number | undefined; webhook?: number | undefined; oauth?: number | undefined; GET?: number | undefined; MODIFY?: number | undefined; error?: boolean | undefined; success?: boolean | undefined; onlyIp?: boolean | undefined; }'.
  Property 'window' is missing in type '{ enabled: boolean; count: number; timespan: number; bucket: string; onlyIp: true; }' but required in type '{ bucket?: string | undefined; window: number; count: number; bot?: number | undefined; webhook?: number | undefined; oauth?: number | undefined; GET?: number | undefined; MODIFY?: number | undefined; error?: boolean | undefined; success?: boolean | undefined; onlyIp?: boolean | undefined; }'.

112   RateLimit({
                ~
113    bucket: "global",
    ~~~~~~~~~~~~~~~~~~~~
...
115    ...ip
    ~~~~~~~~
116   })
    ~~~

  src/middlewares/RateLimit.ts:36:2
    36  window: number;
        ~~~~~~
    'window' is declared here.

src/middlewares/RateLimit.ts:127:42 - error TS2339: Property 'guild' does not exist on type '{ auth?: { login?: RateLimitOptions | undefined; register?: RateLimitOptions | undefined; } | undefined; }'.

127  app.use("/guilds/:id", RateLimit(routes.guild));
                                             ~~~~~

src/middlewares/RateLimit.ts:128:44 - error TS2339: Property 'webhook' does not exist on type '{ auth?: { login?: RateLimitOptions | undefined; register?: RateLimitOptions | undefined; } | undefined; }'.

128  app.use("/webhooks/:id", RateLimit(routes.webhook));
                                               ~~~~~~~

src/middlewares/RateLimit.ts:129:44 - error TS2339: Property 'channel' does not exist on type '{ auth?: { login?: RateLimitOptions | undefined; register?: RateLimitOptions | undefined; } | undefined; }'.

129  app.use("/channels/:id", RateLimit(routes.channel));
                                               ~~~~~~~

src/middlewares/RateLimit.ts:130:35 - error TS2532: Object is possibly 'undefined'.

130  app.use("/auth/login", RateLimit(routes.auth.login));
                                      ~~~~~~~~~~~

src/middlewares/RateLimit.ts:130:35 - error TS2345: Argument of type 'RateLimitOptions | undefined' is not assignable to parameter of type '{ bucket?: string | undefined; window: number; count: number; bot?: number | undefined; webhook?: number | undefined; oauth?: number | undefined; GET?: number | undefined; MODIFY?: number | undefined; error?: boolean | undefined; success?: boolean | undefined; onlyIp?: boolean | undefined; }'.
  Type 'undefined' is not assignable to type '{ bucket?: string | undefined; window: number; count: number; bot?: number | undefined; webhook?: number | undefined; oauth?: number | undefined; GET?: number | undefined; MODIFY?: number | undefined; error?: boolean | undefined; success?: boolean | undefined; onlyIp?: boolean | undefined; }'.

130  app.use("/auth/login", RateLimit(routes.auth.login));
                                      ~~~~~~~~~~~~~~~~~

src/middlewares/RateLimit.ts:131:38 - error TS2345: Argument of type '{ count?: number | undefined; timespan?: number | undefined; onlyIp: true; success: true; }' is not assignable to parameter of type '{ bucket?: string | undefined; window: number; count: number; bot?: number | undefined; webhook?: number | undefined; oauth?: number | undefined; GET?: number | undefined; MODIFY?: number | undefined; error?: boolean | undefined; success?: boolean | undefined; onlyIp?: boolean | undefined; }'.
  Property 'window' is missing in type '{ count?: number | undefined; timespan?: number | undefined; onlyIp: true; success: true; }' but required in type '{ bucket?: string | undefined; window: number; count: number; bot?: number | undefined; webhook?: number | undefined; oauth?: number | undefined; GET?: number | undefined; MODIFY?: number | undefined; error?: boolean | undefined; success?: boolean | undefined; onlyIp?: boolean | undefined; }'.

131  app.use("/auth/register", RateLimit({ onlyIp: true, success: true, ...routes.auth.register }));
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  src/middlewares/RateLimit.ts:36:2
    36  window: number;
        ~~~~~~
    'window' is declared here.

src/middlewares/RateLimit.ts:131:72 - error TS2532: Object is possibly 'undefined'.

131  app.use("/auth/register", RateLimit({ onlyIp: true, success: true, ...routes.auth.register }));
                                                                           ~~~~~~~~~~~

src/Server.ts:6:22 - error TS2305: Module '"@fosscord/server-util"' has no exported member 'RabbitMQ'.

6 import { Config, db, RabbitMQ } from "@fosscord/server-util";
                       ~~~~~~~~

src/util/Event.ts:1:37 - error TS2305: Module '"@fosscord/server-util"' has no exported member 'RabbitMQ'.

1 import { Config, Event, EventModel, RabbitMQ } from "@fosscord/server-util";
                                      ~~~~~~~~

from spacebarchat.

SamuelScheit avatar SamuelScheit commented on May 17, 2024

yeah we are currently reworking it

from spacebarchat.

SamuelScheit avatar SamuelScheit commented on May 17, 2024

we also added rabbitmq for better event transmission, which needs to be setup
however I'm currently also adding support for local event transmission that uses nodejs.EventEmitter for the server bundle which doesn't need any extra dependency

from spacebarchat.

SamuelScheit avatar SamuelScheit commented on May 17, 2024

We had a major rewrite, so you can use any database you want. By default it uses sqlite (we are currently adding an option to change that).
Please checkout the master branch and try again

from spacebarchat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.