Rocket.Chat.Apps-engine
Rocket.Chat.Apps-engine copied to clipboard
URL is not defined in
Server Version: 6.5.3 apps-engine: 1.41.0
Hi,
I am getting the following in the Apps.clickup on the server side:
2024-01-25T15:55:45.852447688-05:00 at OAuth2Client.<anonymous> (/app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/server/oauth2/OAuth2Client.js:79:25)
2024-01-25T15:55:45.852454831-05:00 at Generator.next (<anonymous>)
2024-01-25T15:55:45.852461203-05:00 at fulfilled (/app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/server/oauth2/OAuth2Client.js:5:58)
2024-01-25T15:55:45.852465552-05:00 at VM2 Wrapper.apply (/app/bundle/programs/server/npm/node_modules/vm2/lib/bridge.js:485:11)
2024-01-25T15:55:45.852469059-05:00 at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40```
Seems like the new URL is causing issue in the file, not 100% sure why.
I'm getting the same issue in Github App: #139
@RegisHubelia I solved this issue by importing URL from url
module in OAuth2Client.js
.
Although URL should be a global variable in Node.js environment, it appears that projects with older versions of Node, particularly <= v14, share the same issue. For examples: https://github.com/npm/npm-registry-fetch/issues/49 https://github.com/fent/node-ytdl-core/issues/859