FG

All Issues

24,993 verified issues

🌐 Web & Full-Stack
Fresh9 days ago

Consider support for dynamic middleware loading

I've been playing around with a server that can dynamically configure itself with middleware based on user preferences. Think of a little form with some checkboxes, and toggling a box will load/unload a particular bit of middleware. While I am able to technically do this, the means by which I've made it "possible" is horrible. [code block] My objective: find a solid way to add middleware _after_ expressInit but _before_ router to allow for dynamic middleware configuration at any time. [code block] Any thoughts on how bad this idea is are welcome!

Confidence57%
57%
Candidate Fix
1 fix
📡 Networking
Fresh9 days ago

WebSocket connection to failed: Invalid frame header

`WebSocket connection to 'ws://10.1.30.58/socket.io/?EIO=3&transport=websocket' failed: Invalid frame header` server debug: [code block] On client side: `var socket = io({transports: ['websocket']}); //socket.io` What's wrong?

Confidence57%
57%
Candidate Fix
1 fix
📡 Networking
Fresh9 days ago

Double connect

somehow double connect happens to clients(meaning all the handlers are called twice), could not reproduce the situation on my own, but keep receiving bug reports, the behavior is exactly the same if you call socket.socket.connect() on already connected socket.(tested on websocket and flashsocket)

Confidence57%
57%
Candidate Fix
1 fix
🔌 APIs & SDKsGoogle
Fresh9 days ago

How to upload file type in nodejs googleapis (in express multer)

I have a problem in uploding pdf file from from fontend in Nodejs so the problem is how to convert file type to correct form to upload to google drive my file type is like this { fieldname: 'file', originalname: 'test.pdf', encoding: '7bit', mimetype: 'application/pdf', buffer: <Buffer 25 50 44 46 2d 31 2e 34 0a 25 20 e2 e3 cf d3 0a 34 0a 30 0a 6f 62 6a 0a 3c 3c 0a 2f 54 79 70 65 0a 2f 43 61 74 61 6c 6f 67 0a 2f 4e 61 6d 65 73 0a 3c ... >, size: 150251 } and my code is like this ` const {google} = require('googleapis') const drive = google.drive('v3') const app = express() const upload = multer() app.post( 'test-upload-pdf-file', upload.single('file'), (req, res, next) => { drive.files.create({ resource: { mimeType: 'application/pdf'}, media: {mimeType: 'application/pdf', body: req.file.buffer}, fields: 'id' }, function (err, file) { } )`

Confidence57%
57%
Candidate Fix
1 fix
🔌 APIs & SDKs
Fresh9 days ago

Interceptors - how to prevent intercepted messages from resolving as error

I'm trying to make an interceptor for 401 responses that result from expired token. Upon interception I want to login and retry the requests with the new token. My problem is that login is also done asynchronously, so by the time the retry happens, the original promises reject. Is there a way around that? Here's my code: [code block]

Confidence57%
57%
Candidate Fix
1 fix
🗄️ Databases
Fresh9 days ago

Fails to connect to redis, when running inside of docker container

Hey, the library works like a charm, thanks a lot. My application is a microservice, which connects to a redis database, which is running inside of docker. However, I can not connect to redis, when my application is running inside of container. I can still connect to redis remotely via cli on other host and it clearly works. I can also run my application outside of docker (directly on my host machine) and it would still connect. But when I build and run the image, it says: [code block] I also tried to provision my application to docker swarm with compose file on the same network as redis [code block] But it still wouldn't connect Here is the code, I use in my application: [code block] Thank you in advance.

Confidence57%
57%
Candidate Fix
1 fix
📡 Networking
Fresh9 days ago

Setting a timer for a long period of time warning

Hi, I'm getting the following warnings when using socket.io with my React Native project. I'm on React Native version 0.44.3 and socket.io-client: 1.5.1 Any ideas of how to solve or is this a bug? It seems to be slowing my whole app down significantly, as well as producing lots of console warnings. Here is the error in the console: Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See https://github.com/facebook/react-native/issues/12981 for more info. (Saw setTimeout with duration 85000ms) console.warn @ index.android.bundle:40843 setTimeout @ index.android.bundle:3412 Socket.onHeartbeat @ index.android.bundle:72517 Emitter.emit @ index.android.bundle:74290 Socket.onPacket @ index.android.bundle:72470 (anonymous) @ index.android.bundle:72336 Emitter.emit @ index.android.bundle:74290 Transport.onPacket @ index.android.bundle:73298 Transport.onData @ index.android.bundle:73294 ws.onmessage @ index.android.bundle:74952 dispatchEvent @ index.android.bundle:13268 (anonymous) @ index.android.bundle:12969 emit @ index.android.bundle:3853 __callFunction @ index.android.bundle:2092 (anonymous) @ index.android.bundle:1950 __guard @ index.android.bundle:2064 callFunctionReturnFlushedQueue @ index.android.bundle:1949 (anonymous) @ debuggerWorker.js:71 index.android.bundle:40843 Remote debugger is in a background tab

Confidence57%
57%
Candidate Fix
1 fix
🗄️ DatabasesMongoDB
Fresh9 days ago

Support multiple validator errors

Support multiple validator errors

Confidence57%
57%
Candidate Fix
1 fix
🌐 Web & Full-Stack
Fresh9 days ago

.hidden does not work with flex

if I have `flex` and `hidden` in one class the `flex` class seems to overide the `hidden` class. I feel the `hidden` class should have higher importance Here is a fiddle link: https://jsfiddle.net/338mbbr5/1/ [code block]

Confidence57%
57%
Candidate Fix
1 fix
🌐 Web & Full-Stack
Fresh9 days ago

Negative insets?

Sometimes it's useful to have negative values for `top`, `right`, `bottom`, or `left`. Should there be a `negativeInset` theme key, like `negativeMargin`, to generate those? The classes would be `-inset-[key]`, `-top-[key]`, etc.

Confidence57%
57%
Candidate Fix
1 fix
☁️ Cloud & DevOpsAmazon
Fresh9 days ago

AJV Schema should accept useDotenv=false

In version 2.14 `configSchema.js`contains `useDotenv: { const: true },` but `false`is a valid value cf https://www.serverless.com/framework/docs/providers/aws/guide/serverless.yml/ Also deprecation warning LOAD_VARIABLES_FROM_ENV_FILES should not be triggered when `useDotenv=false`.

Confidence57%
57%
Candidate Fix
1 fix
🛠️ Developer Tools
Fresh9 days ago

Formatting of generators changed without sufficient consensus

I noted in #3903 that the formatting of generators was recently changed based on an issue (#7028) that had a total of just 2 up-votes (excluding the OP's). I was under the impression that such changes would require far more consensus and motivation. There are issues with many more votes that have not yet even been considered. I'm opening this issue to suggest that the relevant changes be reverted until a proper process has been followed. FWIW, the original arguments didn't seem that compelling to me, but ultimately this is a very subjective matter and there isn't really a right or wrong answer. However, the change should only be made if there are either objective reasons to do so, or a really high percentage of votes in favour of the change. I'd like to avoid discussing the pros and cons in this issue, as that can be done elsewhere.

Confidence57%
57%
Candidate Fix
1 fix
🤖 AI & LLMs
Fresh9 days ago

Langchain doesn't work on AWS Lambda with either faiss or hnswlib

The current version is broken on AWS lambda, both with Faiss and HNSWlib. I've spent the last few days building test cases on both platforms, but haven't dived into the langchain code. The typical outcome is: "Could not import faiss-node. Please install faiss-node as a dependency with, e.g. `npm install -S faiss-node`.\n\nError: libgomp.so.1: cannot open shared object file: No such file or directory" Same with HNSWlib (substitute hnswlib for faiss in the error above). Also see https://github.com/hwchase17/langchainjs/issues/943 https://github.com/hwchase17/langchainjs/issues/1764 Hope this helps - langchain is amazing, and if it worked on AWS it would be even better :) David

Confidence57%
57%
Candidate Fix
1 fix
☁️ Cloud & DevOpsDocker
Fresh9 days ago

Give Compose mascot a name

Description In 2013 we asked the growing Docker community to choose a name for the project mascot, and "Moby Dock" has since be the name of our beloved whale. Compose's octopus mascot doesn't have a name. With Docker Compose v2 announced for General Availability, it's time we make Compose a first-class citizen! And as an open-source project, we want community to be the one driving this decision update to avoid conflict with living or historical persona, we don't accept real name, only will select creative invented name based on project context and/or mascot's octopus kind How does it work Please - add your suggestions to this issue as comments - vote for your preferred names using 👍 or 👎 reactions on those comments. _This issue is moderated: any irrelevant content will be deleted, thanks for your understanding_

Confidence57%
57%
Candidate Fix
1 fix
🤖 AI & LLMs
Fresh9 days ago

Support For Hamming Distance

Would be interested to see pgvector support hamming distance. An example of an existing implementation can be found in lantern Example Use Case: Storing PDQ hashes, a photo-hashing algorithm, as binary vectors which can be compared via hamming distance.

Confidence57%
57%
Candidate Fix
1 fix
🔌 APIs & SDKsTwilio
Fresh9 days ago

Wrong validation on accountSid when using API Sid/Api Key to initialize the client

Issue Summary When initialize the client using API Sid/Key, validation still applied to the username field which will check if the field starts with 'AC'. But API Sid should start with 'SK'. Steps to Reproduce Initialize the twilio SDK client using API Sid/Key Code Snippet [code block] Exception/Log [code block] Technical details: twilio-node version: 3.48.0 node version: 13.12.0

Confidence57%
57%
Candidate Fix
1 fix
🤖 AI & LLMs
Fresh9 days ago

Iterative index scans

Hi all, I wanted to share some work on iterative index scans to get feedback. - hnsw-streaming branch - ivfflat-streaming branch You can enable this functionality (naming TDB) with: [code block] For HNSW, it keeps track of discarded candidates at layer 0. When more tuples are needed, it calls `HnswSearchLayer` / Algorithm 2 with the nearest discarded candidates as entry points (in batches of `ef_search`). The scan terminates when enough tuples are found, `hnsw.ef_stream` elements are visited, or `work_mem` is exceeded. For IVFFlat, it scans the next closest lists in groups of `ivfflat.probes`, up to `ivfflat.max_probes`. --- One issue I'm having trouble addressing is how to terminate scans for queries with distance filters. In the query below, if only 9 records are within the distance, it'll continue scanning the index. I've tried using `xs_orderbyvals` on `IndexScanDesc`, but it doesn't seem to help. [code block]

Confidence57%
57%
Candidate Fix
1 fix
🗄️ Databases
Fresh9 days ago

Trouble with File Upload in Self-Hosted Supabase Using Docker

Bug report - [x] I confirm this is a bug with Supabase, not with my own application. - [x] I confirm I have searched the Docs, GitHub Discussions, and Discord. Describe the bug I'm currently facing a perplexing problem while attempting to manually upload files to the Supabase bucket on my self-hosted instance using Docker. The issue arises when I initiate the upload process – the progress gets stuck at 0% and the upload never seems to commence. I've conducted this experiment on multiple computers and have tried various file types, yet regrettably, none of these attempts have proved successful. To Reproduce 1. Set up self-hosted Supabase instance using Docker. 2. Open the dashboard and head to bucket 3. Upload one/multiple files Expected behavior The manual file upload process should initiate normally, progressing from 0% to completion, allowing the files to be uploaded successfully to the Supabase bucket. Screenshots System information - OS: Rocky Linux 9 - Browser: Microsoft Edge, Chrome - Version of supabase-js: latest - Version of Node.js: 20.5.1 Additional context - I have ensured that I haven't made any erroneous configurations in my settings, but I'm open to the possibility that I might have missed something crucial. - Interestingly, upon executing the command "docker ps -a," I can confirm that the storage function is indeed running, which adds a layer of complexity to diagnosing the issue. [code block] - It's worth mentioning that I've also port forwarded the

Confidence57%
57%
Candidate Fix
1 fix
🗄️ Databases
Fresh9 days ago

[BUG]: jsonb type on postgres implement incorrectly

What version of `drizzle-orm` are you using? 0.29.0 What version of `drizzle-kit` are you using? 0.20.1 Describe the Bug 1. create tbl01 in the postgres db 2. run this code [code block] Expected behavior jsonb type incorrectly save data as json string, so we cannot query data field using ->> operator in the postgres. Environment & setup _No response_

Confidence57%
57%
Candidate Fix
1 fix
🌐 Web & Full-Stack
Fresh9 days ago

[v10] bug: TypeScript not willing to serialize the type of my client

Provide environment information System: OS: macOS 12.5 CPU: (10) arm64 Apple M1 Pro Memory: 152.64 MB / 32.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v16.16.0/bin/yarn npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm Browsers: Chrome: 104.0.5112.101 Safari: 15.6 Describe the bug I am seeing an error in my editor saying: `The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.` on my `setupTRPC` for my Next.js project. This is coming after a migration from v9 to v10 where I was hoping to see this problem resolve. However, it seems to have moved from my root router to the `setupTRPC`. This leads me to believe that the type annotation is getting too long for the TS interpreter in VSCode so it's punting the effort/complaining. However, I'll let the real TS genies figure it out. 😄 To reproduce Providing a minimal reproduction might not be applicable here? This bug occurs because of lots of code, not little code. 😄 Rather, here is a link to my source code. You'll find the TS error on this line. Removing these two falsy declaration values from tsconfig will reveal the error! Additional information _No response_ 👨‍👧‍👦 Contributing - [ ] 🙋‍♂️ Yes, I'd be down to file a PR fixing this bug!

Confidence57%
57%
Candidate Fix
1 fix
← PrevPage 80 of 1250Next →