@@ -4,7 +4,7 @@ import { createRemoteBrowserForRun, destroyRemoteBrowser, getActiveBrowserIdBySt
44import { chromium } from 'playwright-extra' ;
55import stealthPlugin from 'puppeteer-extra-plugin-stealth' ;
66import { browserPool } from "../server" ;
7- import { v4 as uuid } from "uuid " ;
7+ import { randomUUID } from "crypto " ;
88import moment from 'moment-timezone' ;
99import cron from 'node-cron' ;
1010import { getDecryptedProxyConfig } from './proxy' ;
@@ -394,11 +394,11 @@ router.post('/recordings/:id/duplicate', requireSignIn, async (req: Authenticate
394394 const currentTimestamp = new Date ( ) . toLocaleString ( ) ;
395395
396396 const newRobot = await Robot . create ( {
397- id : uuid ( ) ,
397+ id : randomUUID ( ) ,
398398 userId : originalRobot . userId ,
399399 recording_meta : {
400400 ...originalRobot . recording_meta ,
401- id : uuid ( ) ,
401+ id : randomUUID ( ) ,
402402 name : `${ originalRobot . recording_meta . name } (${ lastWord } )` ,
403403 createdAt : currentTimestamp ,
404404 updatedAt : currentTimestamp ,
@@ -518,7 +518,7 @@ router.put('/runs/:id', requireSignIn, async (req: AuthenticatedRequest, res) =>
518518 }
519519
520520 // Generate runId first
521- const runId = uuid ( ) ;
521+ const runId = randomUUID ( ) ;
522522
523523 const canCreateBrowser = await browserPool . hasAvailableBrowserSlots ( req . user . id , "run" ) ;
524524
@@ -607,7 +607,7 @@ router.put('/runs/:id', requireSignIn, async (req: AuthenticatedRequest, res) =>
607607 queued : false
608608 } ) ;
609609 } else {
610- const browserId = uuid ( ) ;
610+ const browserId = randomUUID ( ) ;
611611
612612 await Run . create ( {
613613 status : 'queued' ,
0 commit comments