Local Puppeteer Bot Functions but Fails to Click Button in Kubernetes

Puppeteer bot works locally but fails to click a button on Kubernetes. Could configuration or page load differences be the cause? See updated code snippet below.

class MeetingHandler {
  async joinCall(meetingUrl, attendee) {
    await this.browserPage.navigate(meetingUrl, { waitUntil: 'domcontentloaded' });
    await this.browserPage.waitForSelector('.enter-btn');
    await this.browserPage.click('.enter-btn');
  }
}

I encountered a similar problem running puppeteer on Kubernetes, and after some trial and error, I found that differences in environment configuration could play a significant role. In my setup, the page loaded slower than in my local environment because of network and resource constraints. To address this, I added an extra wait period after the initial element check, which helped ensure that dynamic elements were completely interactive before attempting to click. Additionally, I verified the launch device settings, particularly the sandboxing options, as those sometimes caused unexpected failures in containerized environments.