diff --git a/app/Browser/Jobs/InstagramRepost/InstagramRepostJob.php b/app/Browser/Jobs/InstagramRepost/InstagramRepostJob.php index 5fe3f95..1211e06 100644 --- a/app/Browser/Jobs/InstagramRepost/InstagramRepostJob.php +++ b/app/Browser/Jobs/InstagramRepost/InstagramRepostJob.php @@ -365,9 +365,18 @@ class InstagramRepostJob extends BrowserJob implements ShouldBeUniqueUntilProces $passwordButton = $browser->driver->findElement(WebDriverBy::xpath('//input[contains(@aria-label, "Password")]')); $passwordButton->click(); $passwordButton->sendKeys($this->jobInfos->get("instagram_repost_account_password") . "\n"); + sleep(5); } catch (\Exception $e) { // Probably no need to signin } + try { + $browser->waitForText("Search", 15, true); + $this->removePopups($browser); + } catch (\Exception $e) { + Log::error("Failed to sign in: " . $e->getMessage()); + $browser->screenshot(JobDebugScreenshot::getFileName($this->jobId)); + AllNotification::send(new JobDebugNotification($this->jobId, "Failed to sign in: " . $e->getMessage())); + } } protected function removePopups(Browser $browser)