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

DCPError: no transports defined #332

Open
philippedistributive opened this issue Apr 30, 2024 · 6 comments
Open

DCPError: no transports defined #332

philippedistributive opened this issue Apr 30, 2024 · 6 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@philippedistributive
Copy link
Collaborator

Issue type

Bug

How did you install PythonMonkey?

None

OS platform and distribution

No response

Python version (python --version)

No response

PythonMonkey version (pip show pythonmonkey)

No response

Bug Description

sometimes get

Warning: keepalive failed for compute groups service DCPError: no transports defined
DCPError@webpack://dcp/./src/common/dcp-error.js?:22:5Connection530$$connectTransport@webpack://dcp/./src/protocol/connection.js?:825:22
asyncConnection530$$connectInternal@webpack://dcp/./src/protocol/connection.js?:757:16
async
Connection530$$connect@webpack://dcp/./src/protocol/connection.js?:667:10
Connection530$$send@webpack://dcp/./src/protocol/connection.js?:1170:15
DcpMessage$$send@webpack://dcp/./src/protocol/dcp-message.js?:58:26
Connection530$$keepalive@webpack://dcp/./src/protocol/connection.js?:1225:18
keepAlive@webpack://dcp/./src/dcp-client/compute-groups/index.js?:65:36
addJobToGroups@webpack://dcp/./src/dcp-client/compute-groups/index.js?:458:17
joinComputeGroups@webpack://dcp/./src/dcp-client/job/index.js?:1304:47
exec@webpack://dcp/./src/dcp-client/job/index.js?:999:43
sendPromiseRejectWrapper@webpack://dcp/./src/protocol/connection.js?:1135:32
DialogueRegistry$$clear@webpack://dcp/./src/protocol/dialogue-registry.js?:173:24
finalize@webpack://dcp/./src/protocol/connection.js?:491:29
Connection530$$shutdown/<@webpack://dcp/./src/protocol/connection.js?:460:9
Connection530$$a$enqueue@webpack://dcp/./src/protocol/connection.js?:1118:27
Connection530$$send@webpack://dcp/./src/protocol/connection.js?:1182:36
DcpMessage$$send@webpack://dcp/./src/protocol/dcp-message.js?:58:26
Connection530$$keepalive@webpack://dcp/./src/protocol/connection.js?:1225:18
keepAlive@webpack://dcp/./src/dcp-client/compute-groups/index.js?:65:36
addJobToGroups@webpack://dcp/./src/dcp-client/compute-groups/index.js?:458:17
joinComputeGroups@webpack://dcp/./src/dcp-client/job/index.js?:1304:47
exec@webpack://dcp/./src/dcp-client/job/index.js?:999:43
code: 'DCPC-1014', message: 'no transports defined'

Standalone code to reproduce the issue

No response

Relevant log output or backtrace

No response

Additional info if applicable

No response

What branch of PythonMonkey were you developing on? (If applicable)

No response

@philippedistributive philippedistributive added this to the v1.0.0 milestone Apr 30, 2024
@philippedistributive philippedistributive self-assigned this Apr 30, 2024
@philippedistributive philippedistributive added the bug Something isn't working label Apr 30, 2024
@wesgarland
Copy link
Collaborator

FYI - this probably means that XHR threw an exception, so DCP wanted to move to a non-socketio transport, but we only have one transport implemented right now. We consider uncategorized exceptions like this to be fatal errors for a given connection.

@philippedistributive
Copy link
Collaborator Author

just reproed by Caleb

@wiwichips
Copy link
Collaborator

wiwichips commented Jul 1, 2024

I'm hitting this as well - with stack:

Uncaught undefined DCPError: no transports defined
    DCPError@webpack://dcp/./src/common/dcp-error.js?:22:5Connection530$$connectTransport@webpack://dcp/./src/protocol/connection.js?:828:22
    async*Connection530$$connectInternal@webpack://dcp/./src/protocol/connection.js?:760:16
    async*Connection530$$connect@webpack://dcp/./src/protocol/connection.js?:674:10
    Connection530$$send@webpack://dcp/./src/protocol/connection.js?:1189:15
    Connection530$$request@webpack://dcp/./src/protocol/connection.js?:1233:15
    provisionSubscriptionTokens@webpack://dcp/./src/events/event-subscriber.js?:227:48
    subscribeManyEvents@webpack://dcp/./src/events/event-subscriber.js?:307:18
    subscribeCustomEvents@webpack://dcp/./src/dcp-client/job/index.js?:1228:34
    addInitialEvents@webpack://dcp/./src/dcp-client/job/index.js?:1189:18
    async*exec@webpack://dcp/./src/dcp-client/job/index.js?:954:39

  timestamp: 2024-07-01T21:45:41.886Z,
  code: 'DCPC-1014',
  process: 'z-pure-pm-joe' undefined
Uncaught undefined DCPError: no transports defined
    DCPError@webpack://dcp/./src/common/dcp-error.js?:22:5Connection530$$connectTransport@webpack://dcp/./src/protocol/connection.js?:828:22
    async*Connection530$$connectInternal@webpack://dcp/./src/protocol/connection.js?:760:16
    async*Connection530$$connect@webpack://dcp/./src/protocol/connection.js?:674:10
    Connection530$$send@webpack://dcp/./src/protocol/connection.js?:1189:15
    Connection530$$request@webpack://dcp/./src/protocol/connection.js?:1233:15
    provisionSubscriptionTokens@webpack://dcp/./src/events/event-subscriber.js?:227:48
    subscribeManyEvents@webpack://dcp/./src/events/event-subscriber.js?:307:18
    subscribeCustomEvents@webpack://dcp/./src/dcp-client/job/index.js?:1228:34
    addInitialEvents@webpack://dcp/./src/dcp-client/job/index.js?:1189:18
    async*exec@webpack://dcp/./src/dcp-client/job/index.js?:954:39

  timestamp: 2024-07-01T21:45:49.390Z,
  code: 'DCPC-1014',
  process: 'z-pure-pm-joe' undefined
undefined Error: xhr poll error
    TransportError@webpack://dcp/./node_modules/@kingsds/engine.io-client/build/cjs/transport.js?:14:9
    onError@webpack://dcp/./node_modules/@kingsds/engine.io-client/build/cjs/transport.js?:46:37
    doPoll/<@webpack://dcp/./node_modules/@kingsds/engine.io-client/build/cjs/transports/polling.js?:255:18
    Emitter.prototype.emit@webpack://dcp/./node_modules/@socket.io/component-emitter/index.mjs?:140:20
    onError@webpack://dcp/./node_modules/@kingsds/engine.io-client/build/cjs/transports/polling.js?:356:14
    create/xhr.onreadystatechange/<@webpack://dcp/./node_modules/@kingsds/engine.io-client/build/cjs/transports/polling.js?:329:30

  description: 0,
  context: 
   XMLHttpRequest {
     onloadstart: undefined,
     onprogress: undefined,
     onabort: undefined,
     onerror: undefined,
     onload: undefined,
     ontimeout: undefined,
     onloadend: undefined,
     onreadystatechange: [Function],
     UNSENT: 0,
     OPENED: 1,
     HEADERS_RECEIVED: 2,
     LOADING: 3,
     DONE: 4,
     timeout: 0 },
  type: 'TransportError',
  transport: 'socketio',
  httpStatus: 0,
  httpHeaders: {},
  __statusTextCode: undefined undefined

from the following repro:

#!/usr/bin/env python3
import pythonmonkey as pm
import asyncio

#relative path - but fwiw, I'm on develop dcp-client & dcp as of 2024-07-01
dcpClient = pm.require('./dcp/js/node_modules/dcp-client')
dcpClient['init']()

async def compute_for_it():
    pm.eval('''
    globalThis.myJob = dcp.compute.for([1,2,3,4,5,6,7,8,9,10], (x) => { progress(); return x + x })
    ''')
asyncio.run(compute_for_it())

my_j = pm.eval("globalThis.myJob")

my_j.on('readystatechange', print)
my_j.on('accepted', lambda: print(my_j.id))
my_j.on('result', print)

my_j.public.name = 'simple example'

async def exec_it():
    return await my_j.exec()
res = asyncio.run(exec_it())

print(pm.eval('Array.from')(res))

@wiwichips
Copy link
Collaborator

Still getting this issue

@wiwichips
Copy link
Collaborator

See private KDS Slack thread about my reporting of this bug and it being frequent.

@philippedistributive
Copy link
Collaborator Author

philippedistributive commented Jul 10, 2024

I just saw a new manifestation of this error while running in a public library, with a high-repro rate:

Uncaught undefined DCPError: no transports defined
DCPError@webpack://dcp/./src/common/dcp-error.js?:22:5Connection530$$connectTransport@webpack://dcp/./src/protocol/connection.js?:828:22
asyncConnection530$$connectInternal@webpack://dcp/./src/protocol/connection.js?:760:16
async
Connection530$$connect@webpack://dcp/./src/protocol/connection.js?:674:10
Connection530$$send@webpack://dcp/./src/protocol/connection.js?:1189:15
Connection530$$request@webpack://dcp/./src/protocol/connection.js?:1233:15
provisionSubscriptionTokens@webpack://dcp/./src/events/event-subscriber.js?:227:48
subscribeManyEvents@webpack://dcp/./src/events/event-subscriber.js?:307:18
subscribeNewEvents@webpack://dcp/./src/dcp-client/job/index.js?:1219:32
addInitialEvents@webpack://dcp/./src/dcp-client/job/index.js?:1172:16
async*exec@webpack://dcp/./src/dcp-client/job/index.js?:954:39

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
Status: In progress
Development

No branches or pull requests

5 participants