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

PocketBase realtime error #3319

Open
congdo opened this issue Jun 15, 2023 · 0 comments · May be fixed by Neo00007/bun#5
Open

PocketBase realtime error #3319

congdo opened this issue Jun 15, 2023 · 0 comments · May be fixed by Neo00007/bun#5
Labels
bug Something isn't working

Comments

@congdo
Copy link

congdo commented Jun 15, 2023

What version of Bun is running?

0.6.9

What platform is your computer?

Linux 6.1.0-7-amd64 x86_64 unknown

What steps can reproduce the bug?

run pocketbase server and execute the following script with bun

import PocketBase from 'pocketbase';

const pb = new PocketBase('http://127.0.0.1:8090');

await pb.collection('users').authWithPassword('test@example.com', '1234567890');

// Subscribe to changes in any record in the collection
pb.collection('example').subscribe('*', function (e) {
    console.log(e.action);
    console.log(e.record);
});

What is the expected behavior?

no error

What do you see instead?

ClientResponseError 0: Something went wrong while processing your request.
 url: ""

 at new ClientResponseError (/node_modules/pocketbase/dist/pocketbase.es.mjs:1:2303) 
 at /node_modules/pocketbase/dist/pocketbase.es.mjs:1:41348 
 at /node_modules/pocketbase/dist/pocketbase.es.mjs:1:39833

sub 2 error handling 200 | var e;
201 | var t = function(e) {
202 |   function ClientResponseError(t) {
203 |     var n, i, o, r, s = this;
204 | 
205 |     return (s = e.call(this, "ClientResponseError") || this).url = "", s.status = 0, s.response = {}, s.isAbort = !1, s.originalError = null, Object.setPrototypeOf(s, ClientResponseError.prototype), t !== null && typeof t == "object" && (s.url = typeof t.url == "string" ? t.url : "", s.status = typeof t.status == "number" ? t.status : 0, s.isAbort = !!t.isAbort, s.originalError = t.originalError, t.response !== null && typeof t.response == "object" ? s.response = t.response : t.data !== null && typeof t.data == "object" ? s.response = t.data : s.response = {}), s.originalError || t instanceof ClientResponseError || (s.originalError = t), typeof DOMException != "undefined" && t instanceof DOMException && (s.isAbort = !0), s.name = "ClientResponseError " + s.status, s.message = (n = s.response) === null || n === void 0 ? void 0 : n.message, s.message || (s.isAbort ? s.message = "The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation." : ((r = (o = (i = s.originalError) === null || i === void 0 ? void 0 : i.cause) === null || o === void 0 ? void 0 : o.message) === null || r === void 0 ? void 0 : r.includes("ECONNREFUSED ::1")) ? s.message = "Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21)." : s.message = "Something went wrong while processing your request."), s;

Additional information

On nodejs it just work but in bun it producing the error above.
Other feature of pocketbase like view, create, update and delete works.

Only the realtime are having issue, the pocketbase server log is giving this

{
  "errorDetails": "No client associated with connection ID \"uUShKwBmmCFzKk0QctfuV9hmNl9hG0MfKpnKt6De\"",
  "errorMessage": "Missing or invalid client id."
}
@congdo congdo added the bug Something isn't working label Jun 15, 2023
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.

1 participant