I'm getting the following error when trying to run the Retool RPC agent:
Error running RPC agent Error: Polling timeout after 5000ms
at RetoolAPI.popQuery (file:///C:/Users/Raul%20Gonzalez/RetoolRPC/node_modules/retoolrpc/dist/rpc-f78d3d6d.mjs:314:23)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async RetoolRPC.fetchQueryAndExecute (file:///C:/Users/Raul%20Gonzalez/RetoolRPC/node_modules/retoolrpc/dist/rpc-f78d3d6d.mjs:471:35)
at async loopWithBackoff (file:///C:/Users/Raul%20Gonzalez/RetoolRPC/node_modules/retoolrpc/dist/rpc-f78d3d6d.mjs:229:28)
I was already experiencing this issue in my previous project, so I decided to start fresh. I followed the documentation exactly and used Retoolβs default server.js
setup, but the error still happens immediately after starting the RPC agent.
Default setup .js:
const rpc = new RetoolRPC({
apiToken: 'redacted for privacy',
host: 'https://lynxphx.retool.com',
resourceId: 'redacted for privacy',
environmentName: 'production',
pollingIntervalMs: 1000,
version: '0.0.1', // optional version number for functions schemas
logLevel: 'info', // use 'debug' for more verbose logging
})
rpc.register({
name: 'helloWorld',
arguments: {
name: { type: 'string', description: 'Your name', required: true },
},
implementation: async (args, context) => {
return {
message: `Hello ${args.name}`,
context,
}
},
})
rpc.listen()
This makes me think the issue isnβt related to my codebase. Is something broken with the default polling behavior or the RPC connection itself?
Any advice or things I should double-check?