-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Not implemented: Http2Session.socket #20903
Comments
Which version of Deno are you using? |
I got the same issue. I am running deno version Here's the version information:
|
Same issue here with Here is the code used: import {GetTopicsResponse, PubSub} from "npm:@google-cloud/pubsub";
const pubsub = new PubSub({
projectId: "project-id"
});
const response: GetTopicsResponse = await pubsub.getTopics();
console.dir(response); |
could this be the reason I get this error 'Uncaught TypeError: socket.setTimeout is not a function' when I run 'deno run -A npm:sanity@latest init --env'? |
@JonathonRP I think it's #20923. |
same here
With npm:firebase-admin/firestore. |
Same with @google-cloud/datastore |
I got it working by using esm.sh which automatically provides polyfills for features Deno doesn't support yet. import vision from "https://esm.sh/@google-cloud/vision"; |
@bartlomieju I'm also running into this when trying to run a basic variation of the
Have to go back to node :( temporal is a non-negotiable. Seems to also be related to: #16647 |
I guess this should be more an issue regarding esm.sh but I figured I'd post it here as well if it helps with debugging. import ps from 'https://esm.sh/@google-cloud/pubsub';
|
The same issue with Deno v1.38.5 |
any luck from anyone regarding pubsub? I tried using an import map and a few other things, and no bueno deno --version import { GetTopicsResponse, PubSub } from "npm:@google-cloud/[email protected]";
const pubsub = new PubSub({
projectId: "xxx",
});
try {
const response: GetTopicsResponse = await pubsub.getTopics();
console.dir(response);
} catch (err) {
console.log("error", err);
} it's almost there :) just a little bit more! |
same here with firebase-admin (12.0.0)
|
Same here. If I understand correctly looking at the Deno codebase, deno/ext/node/polyfills/http2.ts Lines 181 to 184 in bc8d00c
|
Hello, I've been following this issue very closely and I didn't see any update on discord or github. @bartlomieju do you have any update to share? 🥲 |
Same situation here, trying to use Deno with Firebase Admin. Let us know if there is any update @bartlomieju In my case I am getting the next error: [npm] deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
[npm] deprecated har-validator@5.1.5: this library is no longer supported
[npm] deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
error: Uncaught (in promise) Error: Failed to initialize Google Cloud Firestore client with the available credentials. Must initialize the SDK with a certificate credential or application default credentials to use Cloud Firestore API. For the next code: import {
applicationDefault,
initializeApp,
} from "https://esm.sh/[email protected]/app";
import { getFirestore } from "https://esm.sh/[email protected]/firestore";
const app = initializeApp({
credential: applicationDefault(),
});
const firestore = getFirestore(app);
// Get document from Firestore
firestore
.doc("users/test")
.get()
.then((doc) => {
console.log(doc.data());
}); I have tried this same code in NodeJS exporting Wanted to give it a try to the cron jobs. Hopefully this will get to deno soon . . . Deno version I am using: $ deno --version
deno 1.40.3 (release, x86_64-pc-windows-msvc)
v8 12.1.285.6
typescript 5.3.3 |
i have tried peaking through the Google Cloud issues, and haven't found a lot pertaining to deno |
After #22512, @google-cloud/pubsub is working even though warnings are thrown:
I'll work on supporting socket now. |
I confirm It doesn't crash anymore! Thanks a lot for your help and the progress made on this topic 🚀 |
Not sure if this is a misconfiguration on my end, but I'm hitting this warning (then a timeout) when publishing messages to PubSub, using deno 1.41.3: import { PubSub } from "npm:@google-cloud/[email protected]";
import { Buffer } from "node:buffer";
const keyFilename = '/path/to/file';
const pubsub = new PubSub({ keyFilename });
const handle = pubsub.topic('my-test-topic');
await handle.publishMessage({
data: Buffer.from('test'),
attributes: {
articleId: "a5470071-0764-4dab-a645-afd2af2bcb79",
trackerId: "9b156235-463f-4eb8-9dc2-ea12057eeb14"
},
}); Output:
Edit: Debugging info for posterity
|
import { Connection, Client } from 'npm:@temporalio/client';
try {
const connection = await Connection.connect();
const temporalClient = new Client({
connection,
})
} catch (error) {
console.error('Failed to connect to the Temporal server:', error);
} Warning: Not implemented: Http2Session.socket
error: Uncaught (in promise) TypeError: session.socket.once is not a function
at Subchannel.transitionToState (file:///home/burak/.cache/deno/npm/registry.npmjs.org/@grpc/grpc-js/1.7.3/build/src/subchannel.js:536:32)
at ClientHttp2Session.<anonymous> (file:///home/burak/.cache/deno/npm/registry.npmjs.org/@grpc/grpc-js/1.7.3/build/src/subchannel.js:420:22)
at Object.onceWrapper (ext:deno_node/_events.mjs:511:26)
at ClientHttp2Session.emit (ext:deno_node/_events.mjs:386:28)
at node:http2:284:12
at Object.runMicrotasks (ext:core/01_core.js:642:26)
at processTicksAndRejections (ext:deno_node/_next_tick.ts:39:10)
at runNextTicks (ext:deno_node/_next_tick.ts:48:3)
at eventLoopTick (ext:core/01_core.js:175:21)
Watcher Process failed. Restarting on file change...
deno --version
deno 1.43.3 (release, x86_64-unknown-linux-gnu)
v8 12.4.254.13
typescript 5.4.5 |
@burakakca |
@satyarohith I tried and I got same error like above Also i tried latest version of that package Warning: Not implemented: Http2Session.socket
error: Uncaught (in promise) Error: stream closed because of a broken pipe
at async node:http2:569:37 |
@burakakca can you try running with the latest canary (deno upgrade --canary)? I wonder if #24147 fixed it. I appreciate if you can paste debug logs too (use I could run the example but temporal charges $200 to just sign up. |
Yes, sure I'm just using the temporalio docker for local development. deno 1.44.1+3765e6b (canary, x86_64-unknown-linux-gnu)
v8 12.6.228.9
typescript 5.4.5 Output: GRPC_VERBOSITY=debug GRPC_TRACE=all deno run main.ts
✅ Granted env access to "GRPC_NODE_VERBOSITY".
✅ Granted env access to "GRPC_VERBOSITY".
✅ Granted env access to "GRPC_NODE_TRACE".
✅ Granted env access to "GRPC_TRACE".
✅ Granted env access to "GRPC_SSL_CIPHER_SUITES".
✅ Granted env access to "GRPC_DEFAULT_SSL_ROOTS_FILE_PATH".
✅ Granted env access to "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION".
✅ Granted env access to "grpc_proxy".
✅ Granted env access to "https_proxy".
✅ Granted env access to "http_proxy".
D 2024-06-12T12:31:24.122Z | v1.10.8 887139 | resolving_load_balancer | dns:127.0.0.1:7233 IDLE -> IDLE
D 2024-06-12T12:31:24.125Z | v1.10.8 887139 | connectivity_state | (1) dns:127.0.0.1:7233 IDLE -> IDLE
D 2024-06-12T12:31:24.126Z | v1.10.8 887139 | dns_resolver | Resolver constructed for target dns:127.0.0.1:7233
D 2024-06-12T12:31:24.128Z | v1.10.8 887139 | channel | (1) dns:127.0.0.1:7233 Channel constructed with options {
"grpc.keepalive_permit_without_calls": 1,
"grpc.keepalive_time_ms": 30000,
"grpc.keepalive_timeout_ms": 15000
}
D 2024-06-12T12:31:24.133Z | v1.10.8 887139 | channel_stacktrace | (1) Channel constructed
at new InternalChannel (file:///home/burak/.cache/deno/npm/registry.npmjs.org/@grpc/grpc-js/1.10.8/build/src/internal-channel.js:248:23)
at new ChannelImplementation (file:///home/burak/.cache/deno/npm/registry.npmjs.org/@grpc/grpc-js/1.10.8/build/src/channel.js:35:32)
at new Client (file:///home/burak/.cache/deno/npm/registry.npmjs.org/@grpc/grpc-js/1.10.8/build/src/client.js:66:36)
at new ServiceClientImpl (file:///home/burak/.cache/deno/npm/registry.npmjs.org/@grpc/grpc-js/1.10.8/build/src/make-client.js:58:5)
at Function.createCtorOptions (file:///home/burak/.cache/deno/npm/registry.npmjs.org/@temporalio/client/1.10.1/lib/connection.js:124:24)
at Function.lazy (file:///home/burak/.cache/deno/npm/registry.npmjs.org/@temporalio/client/1.10.1/lib/connection.js:201:30)
at Function.connect (file:///home/burak/.cache/deno/npm/registry.npmjs.org/@temporalio/client/1.10.1/lib/connection.js:210:27)
at file:///home/burak/Desktop/deno/testTemporal/main.ts:6:37
D 2024-06-12T12:31:24.221Z | v1.10.8 887139 | dns_resolver | Returning IP address for target dns:127.0.0.1:7233
D 2024-06-12T12:31:24.221Z | v1.10.8 887139 | resolving_load_balancer | dns:127.0.0.1:7233 IDLE -> CONNECTING
D 2024-06-12T12:31:24.221Z | v1.10.8 887139 | connectivity_state | (1) dns:127.0.0.1:7233 IDLE -> CONNECTING
D 2024-06-12T12:31:24.225Z | v1.10.8 887139 | subchannel | (1) 127.0.0.1:7233 Subchannel constructed with options {
"grpc.keepalive_permit_without_calls": 1,
"grpc.keepalive_time_ms": 30000,
"grpc.keepalive_timeout_ms": 15000
}
D 2024-06-12T12:31:24.225Z | v1.10.8 887139 | subchannel_refcount | (1) 127.0.0.1:7233 refcount 0 -> 1
D 2024-06-12T12:31:24.225Z | v1.10.8 887139 | subchannel_refcount | (1) 127.0.0.1:7233 refcount 1 -> 2
D 2024-06-12T12:31:24.225Z | v1.10.8 887139 | pick_first | Start connecting to subchannel with address 127.0.0.1:7233
D 2024-06-12T12:31:24.226Z | v1.10.8 887139 | pick_first | IDLE -> CONNECTING
D 2024-06-12T12:31:24.226Z | v1.10.8 887139 | resolving_load_balancer | dns:127.0.0.1:7233 CONNECTING -> CONNECTING
D 2024-06-12T12:31:24.226Z | v1.10.8 887139 | connectivity_state | (1) dns:127.0.0.1:7233 CONNECTING -> CONNECTING
D 2024-06-12T12:31:24.226Z | v1.10.8 887139 | subchannel | (1) 127.0.0.1:7233 IDLE -> CONNECTING
D 2024-06-12T12:31:24.226Z | v1.10.8 887139 | transport | dns:127.0.0.1:7233 creating HTTP/2 session to 127.0.0.1:7233
✅ Granted net access to "127.0.0.1:7233".
D 2024-06-12T12:31:26.946Z | v1.10.8 887139 | keepalive | (1) 127.0.0.1:7233 Starting keepalive timer for 30000ms
D 2024-06-12T12:31:26.946Z | v1.10.8 887139 | subchannel | (1) 127.0.0.1:7233 CONNECTING -> READY
D 2024-06-12T12:31:26.947Z | v1.10.8 887139 | pick_first | Pick subchannel with address 127.0.0.1:7233
D 2024-06-12T12:31:26.947Z | v1.10.8 887139 | subchannel_refcount | (1) 127.0.0.1:7233 refcount 2 -> 3
D 2024-06-12T12:31:26.947Z | v1.10.8 887139 | subchannel_refcount | (1) 127.0.0.1:7233 refcount 3 -> 2
D 2024-06-12T12:31:26.948Z | v1.10.8 887139 | pick_first | CONNECTING -> READY
D 2024-06-12T12:31:26.948Z | v1.10.8 887139 | resolving_load_balancer | dns:127.0.0.1:7233 CONNECTING -> READY
D 2024-06-12T12:31:26.948Z | v1.10.8 887139 | connectivity_state | (1) dns:127.0.0.1:7233 CONNECTING -> READY
D 2024-06-12T12:31:26.960Z | v1.10.8 887139 | channel | (1) dns:127.0.0.1:7233 createResolvingCall [0] method="/temporal.api.workflowservice.v1.WorkflowService/GetSystemInfo", deadline=2024-06-12T12:31:34.220Z
D 2024-06-12T12:31:26.960Z | v1.10.8 887139 | resolving_call | [0] Created
D 2024-06-12T12:31:26.961Z | v1.10.8 887139 | resolving_call | [0] Deadline: 2024-06-12T12:31:34.220Z
D 2024-06-12T12:31:26.961Z | v1.10.8 887139 | resolving_call | [0] Deadline will be reached in 7259ms
D 2024-06-12T12:31:26.963Z | v1.10.8 887139 | resolving_call | [0] start called
D 2024-06-12T12:31:26.967Z | v1.10.8 887139 | resolving_call | [0] startRead called
D 2024-06-12T12:31:26.967Z | v1.10.8 887139 | resolving_call | [0] write() called with message of length 0
D 2024-06-12T12:31:26.968Z | v1.10.8 887139 | resolving_call | [0] halfClose called
D 2024-06-12T12:31:26.968Z | v1.10.8 887139 | channel | (1) dns:127.0.0.1:7233 createRetryingCall [1] method="/temporal.api.workflowservice.v1.WorkflowService/GetSystemInfo"
D 2024-06-12T12:31:26.969Z | v1.10.8 887139 | resolving_call | [0] Created child [1]
D 2024-06-12T12:31:26.969Z | v1.10.8 887139 | retrying_call | [1] start called
D 2024-06-12T12:31:26.969Z | v1.10.8 887139 | channel | (1) dns:127.0.0.1:7233 createLoadBalancingCall [2] method="/temporal.api.workflowservice.v1.WorkflowService/GetSystemInfo"
D 2024-06-12T12:31:26.970Z | v1.10.8 887139 | retrying_call | [1] Created child call [2] for attempt 1
D 2024-06-12T12:31:26.970Z | v1.10.8 887139 | load_balancing_call | [2] start called
D 2024-06-12T12:31:26.970Z | v1.10.8 887139 | load_balancing_call | [2] Pick called
D 2024-06-12T12:31:26.971Z | v1.10.8 887139 | load_balancing_call | [2] Pick result: COMPLETE subchannel: (1) 127.0.0.1:7233 status: undefined undefined
D 2024-06-12T12:31:26.971Z | v1.10.8 887139 | retrying_call | [1] startRead called
D 2024-06-12T12:31:26.971Z | v1.10.8 887139 | load_balancing_call | [2] startRead called
D 2024-06-12T12:31:26.974Z | v1.10.8 887139 | transport_flowctrl | (1) 127.0.0.1:7233 local window size: undefined remote window size: undefined
Warning: Not implemented: Http2Session.socket
D 2024-06-12T12:31:26.974Z | v1.10.8 887139 | transport_internals | (1) 127.0.0.1:7233 session.closed=false session.destroyed=false session.socket.destroyed=undefined
D 2024-06-12T12:31:26.975Z | v1.10.8 887139 | load_balancing_call | [2] Created child call [3]
D 2024-06-12T12:31:26.977Z | v1.10.8 887139 | retrying_call | [1] write() called with message of length 5
D 2024-06-12T12:31:26.977Z | v1.10.8 887139 | load_balancing_call | [2] write() called with message of length 5
D 2024-06-12T12:31:26.977Z | v1.10.8 887139 | subchannel_call | [3] write() called with message of length 5
D 2024-06-12T12:31:26.977Z | v1.10.8 887139 | subchannel_call | [3] sending data chunk of length 5
D 2024-06-12T12:31:26.978Z | v1.10.8 887139 | retrying_call | [1] halfClose called
D 2024-06-12T12:31:26.979Z | v1.10.8 887139 | load_balancing_call | [2] halfClose called
D 2024-06-12T12:31:26.979Z | v1.10.8 887139 | subchannel_call | [3] end() called
D 2024-06-12T12:31:26.979Z | v1.10.8 887139 | subchannel_call | [3] calling end() on HTTP/2 stream
D 2024-06-12T12:31:26.980Z | v1.10.8 887139 | pick_first | READY -> READY
D 2024-06-12T12:31:26.980Z | v1.10.8 887139 | resolving_load_balancer | dns:127.0.0.1:7233 READY -> READY
D 2024-06-12T12:31:26.980Z | v1.10.8 887139 | connectivity_state | (1) dns:127.0.0.1:7233 READY -> READY
D 2024-06-12T12:31:26.981Z | v1.10.8 887139 | subchannel_call | [3] Received server headers:
:status: 200
content-type: application/grpc
D 2024-06-12T12:31:26.982Z | v1.10.8 887139 | load_balancing_call | [2] Received metadata
D 2024-06-12T12:31:26.982Z | v1.10.8 887139 | retrying_call | [1] Received metadata from child [2]
D 2024-06-12T12:31:26.982Z | v1.10.8 887139 | retrying_call | [1] Committing call [2] at index 0
D 2024-06-12T12:31:26.982Z | v1.10.8 887139 | resolving_call | [0] Received metadata
D 2024-06-12T12:31:26.983Z | v1.10.8 887139 | subchannel_call | [3] receive HTTP/2 data frame of length 35
D 2024-06-12T12:31:26.983Z | v1.10.8 887139 | subchannel_call | [3] parsed message of length 35
D 2024-06-12T12:31:26.983Z | v1.10.8 887139 | subchannel_call | [3] pushing to reader message of length 35
D 2024-06-12T12:31:26.983Z | v1.10.8 887139 | load_balancing_call | [2] Received message
D 2024-06-12T12:31:26.983Z | v1.10.8 887139 | retrying_call | [1] Received message from child [2]
D 2024-06-12T12:31:26.984Z | v1.10.8 887139 | resolving_call | [0] Received message
D 2024-06-12T12:31:26.984Z | v1.10.8 887139 | subchannel_call | [3] Received server trailers:
grpc-status: 0
grpc-message:
D 2024-06-12T12:31:26.984Z | v1.10.8 887139 | subchannel_call | [3] received status code 0 from server
D 2024-06-12T12:31:26.984Z | v1.10.8 887139 | subchannel_call | [3] received status details string "" from server
D 2024-06-12T12:31:26.986Z | v1.10.8 887139 | resolving_call | [0] Finished filtering received message
D 2024-06-12T12:31:26.987Z | v1.10.8 887139 | subchannel_call | [3] ended with status: code=0 details=""
D 2024-06-12T12:31:26.987Z | v1.10.8 887139 | load_balancing_call | [2] Received status
D 2024-06-12T12:31:26.987Z | v1.10.8 887139 | load_balancing_call | [2] ended with status: code=0 details="" start time=2024-06-12T12:31:26.970Z
D 2024-06-12T12:31:26.987Z | v1.10.8 887139 | retrying_call | [1] Received status from child [2]
D 2024-06-12T12:31:26.987Z | v1.10.8 887139 | retrying_call | [1] state=COMMITTED handling status with progress PROCESSED from child [2] in state ACTIVE
D 2024-06-12T12:31:26.987Z | v1.10.8 887139 | retrying_call | [1] ended with status: code=0 details="" start time=2024-06-12T12:31:26.969Z
D 2024-06-12T12:31:26.987Z | v1.10.8 887139 | resolving_call | [0] Received status
D 2024-06-12T12:31:26.988Z | v1.10.8 887139 | resolving_call | [0] ended with status: code=0 details=""
✅ Granted sys access to "hostname". |
While I was mistaken on my previous message, PubSub works properly now with Deno
|
I'm trying using "npm:[email protected]" and it still doesn't work: |
I have the same issue with
Debug Logs
|
code
The text was updated successfully, but these errors were encountered: