Website Content Crawler avatar
Website Content Crawler
Try for free

No credit card required

View all Actors
Website Content Crawler

Website Content Crawler

apify/website-content-crawler
Try for free

No credit card required

Automatically crawl and extract text content from websites with documentation, knowledge bases, help centers, or blogs. This Actor is designed to provide data to feed, fine-tune, or train large language models such as ChatGPT or LLaMA.

User avatar

How to handle such Errors: cookies[0].sameSite: expected one of (Strict|Lax|None)

Closed

livingmydesign opened this issue
a month ago

Hi Team,

as I did not find any workaround online, can someone point me to the right direction on how to solve such cookie-errors:

WARN PlaywrightCrawler: Reclaiming failed request back to the list or queue. browserContext.addCookies: cookies[0].sameSite: expected one of (Strict|Lax|None) 2024-04-07T13:46:35.614Z at crawlerOptions.preNavigationHooks (/home/myuser/dist/input.js:158:47) {"id":"GB7hWwMPIlX3xTf","url":"https://pvaustria.at/","retryCount":1}

User avatar

Hello and thank you for your interest in this Actor!

As the log warning says, the initialCookies input validation fails on your input. For some of the cookies, you are passing "sameSite": "undefined" - and undefined isn't an allowed value for the sameSite field.

You can either set it to one of the allowed values (Lax, Strict or None), or remove the sameSite field from your input completely. See my example run where I just removed the sameSite field from your input (otherwise, it's all the same) and it works just fine.

I'll close this issue now, but feel free to reopen it if you have any questions. Cheers!

Developer
Maintained by Apify
Actor metrics
  • 2k monthly users
  • 99.9% runs succeeded
  • 2.9 days response time
  • Created in Mar 2023
  • Modified 3 days ago