[Bug]: Difference in generating markdown content using Docker on MacOS and Linux
crawl4ai version
unclecode/crawl4ai:0.7.0-r1
Expected Behavior
When running docker containers with the same image I expect to get the same result when deployed to different operating systems.
Current Behavior
Currently I am trying to execute the following request:
curl -X POST http://localhost:11235/md \
-H "Content-Type: application/json" \
-d '{"url":"https://papagal.bg/eik/200140125/b2d5","f":"fit","q":null,"c":"0"}'
I have deployed the unclecode/crawl4ai:0.7.0-r1 docker image on my local MacOS (Sequoia 15.5) and on Ubuntu (24.04.2 LTS) using the following docker-compose.yaml content as described in the docs:
version: '3.8'
services:
crawl4ai-app:
image: unclecode/crawl4ai:0.7.0-r1
ports:
- "11235:11235" # Gunicorn port
volumes:
- /dev/shm:/dev/shm # Chromium performance
deploy:
resources:
limits:
memory: 4G
reservations:
memory: 1G
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:11235/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
user: "appuser"
The behaviour on MacOS is to generate proper markdown without any noise. I get exactly what I need:
{
"url": "https://papagal.bg/eik/200140125/b2d5",
"filter": "fit",
"query": null,
"cache": "0",
"markdown": "[ Български фирмен каталог ](https://papagal.bg/)\n[ Разширено търсене ](https://papagal.bg/advanced_search)\n 1. [ Начало](http://papagal.bg/)\n› › \n 2. [ Област София (столица)](http://papagal.bg/bg/1-sofiya-stolitsa)\n› \n 3. [ Община Столична](http://papagal.bg/bg/1-sofiya-stolitsa/1-stolichna)\n› \n 4. [ гр. София](http://papagal.bg/bg/1-sofiya-stolitsa/1-stolichna/1-sofiya)\n\n\n# 123-СПП ЕООД \n\nСтатус\n \nАктивен \n\nЕИК/ПИК\n 200140125 \n\nРегистрация по ЗДДС\n Да - BG200140125 от 30.07.2013 на основание друго от ЗДДС \n\nДата на регистрация\n 03.06.2008 15:48 \n\nНаименование\n 123-СПП \n\nТранслитерация\n 123-SPP \n\nОборот\n 713 000 лв. оборот за 2012 г. \n\nСлужители\n 9 служители към 2012 г. \n\nПравна форма\n Еднолично дружество с ограничена отговорност (ЕООД) \n\nСедалище адрес\n БЪЛГАРИЯ, гр. София, р-н Люлин, бл. 202, вх. Е, ет. 2 Има **42** фирми на този адрес [виж фирмите](https://papagal.bg/seat/1/5362/none/none/202/618) \n\nПредмет на дейност\n ТЪРГОВСКО ПРЕДСТАВИТЕЛСТВО И ПОСРЕДНИЧЕСТВО И АГЕНТСТВО НА МЕСТНИ И ЧУЖДЕСТРАННИ ЛИЦА; ПРОДАЖБА НА СТОКИ ОТ СОБСТВЕНО ПРОИЗВОДСТВО; ТЪРГОВИЯ С НЕДВИЖИМИ ИМОТИ; ВЪТРЕШЕН, ВЪТРЕШНООБЩНОСТЕН И МЕЖДУНА... ТЪРГОВСКО ПРЕДСТАВИТЕЛСТВО И ПОСРЕДНИЧЕСТВО И АГЕНТСТВО НА МЕСТНИ И ЧУЖДЕСТРАННИ ЛИЦА; ПРОДАЖБА НА СТОКИ ОТ СОБСТВЕНО ПРОИЗВОДСТВО; ТЪРГОВИЯ С НЕДВИЖИМИ ИМОТИ; ВЪТРЕШЕН, ВЪТРЕШНООБЩНОСТЕН И МЕЖДУНАРОДЕН ПРЕВОЗ НА ТОВАРИ С АВТОМОБИЛЕН ТРАНСПОРТ; СПЕДИЦИОННА, СКЛАДОВА ДЕЙНОСТ; ИНФОРМАЦИОННА, КОНСУЛТАНТСКА И РЕКЛАМНА ДЕЙНОСТ; ВНОС, ИЗНОС И РЕЕКСПОРТ НА СТОКИ; ТЪРГОВИЯ С ТОРОВЕ, ПРЕПАРАТИ И ДРУГИ СТОКИ ЗА ЗЕМЕДЕЛИЕТО; ОТДАВАНе ПА МПС-ТА ПОД НАЕМ, ОРГАНИЗАЦИЯ И ПОЛЗВАНЕ НА СКЛАДОВЕ ПОД МИТНИЧЕСКИ И ДАНЪЧЕН КОНТРОЛ, КАКТО И ВСЯКАКВИ ДРУГИ ДЕЙНОСТИ И УСЛУГИ, НЕЗАБРАНЕНИ СЪС ЗАКОН. [прочети още](javascript:;) [скрии](javascript:;) \n\nПредставляващи\n Управител: [ВАЛЕНТИН ИМРЕ ДУЗМАТ](https://papagal.bg/p/afbca812304e81764496deb2e7917cd6839ea1a91d522e2fb458ea3175bcc84d-1/dcc0) (свързан с 47 фирми) \n\nСобственост\n Едноличен собственик на капитала: [ВАЛЕНТИН ИМРЕ ДУЗМАТ](https://papagal.bg/p/afbca812304e81764496deb2e7917cd6839ea1a91d522e2fb458ea3175bcc84d-1/dcc0) (свързан с 47 фирми) \n\nКапитал размер\n 5 000 лева (3 500 лева внесен) \n### Дъщерни дружества\nНяма данни. \n### Финансови показатели\nГодина | Марж на печалбата \n---|--- \n2012 | 713 000 лв. \n2011 | 0 лв. \n### Служители\nГодина \n--- \n2012 \n### Мнения\nВсе още няма добавени мнения за тази фирма. \n### Резюме\nФирма 123-СПП ЕООД на латиница \"123-SPP\" с ЕИК/ПИК 200140125 е основана на 3 Юни 2008 година с правна форма \"Еднолично дружество с ограничена отговорност\" или на кратко \"ЕООД\". Седалището на компанията се намира в гр. София, а началният внесен капитал е в размер на 3 500 лева. Оборота на фирмата за 2012 година е в размер на 713 000 лв. \n### Хронология\n03.06.2008\n**Регистрация на фирмата**\n**Управител**\n[СТАНИСЛАВ ПАВЛОВ ПАСКАЛЕВ](https://papagal.bg/p/8981c66fa63bd4320e03695f761d951b1b9fbdd2c2bfe16dae2e2f361b3a9758-1/7218)\n**Едноличен собственик на капитала**\n[СТАНИСЛАВ ПАВЛОВ ПАСКАЛЕВ](https://papagal.bg/p/8981c66fa63bd4320e03695f761d951b1b9fbdd2c2bfe16dae2e2f361b3a9758-1/7218)\n08.03.2012\n**Промяна Управител**\n[СТАНИСЛАВ ПАВЛОВ ПАСКАЛЕВ](https://papagal.bg/p/8981c66fa63bd4320e03695f761d951b1b9fbdd2c2bfe16dae2e2f361b3a9758-1/7218)\n**Промяна Едноличен собственик на капитала**\n[СТАНИСЛАВ ПАВЛОВ ПАСКАЛЕВ](https://papagal.bg/p/8981c66fa63bd4320e03695f761d951b1b9fbdd2c2bfe16dae2e2f361b3a9758-1/7218)\n**Промяна предмет на дейност**\n30.07.2013\n**Регистрация по ЗДДС** Фирмата се регистрира по ЗДДС с номер BG200140125 на основание друго от ЗДДС \n### Свързани фирми\n[ЕЛ ИНСТАЛ](https://papagal.bg/eik/131415675/2825) [ХЮМЪН РИЛЕЙШЪНС КОНСУЛТИНГ](https://papagal.bg/eik/130970688/a01e) [МОНСУН КОФИ КЪМПАНИ](https://papagal.bg/eik/175203026/15e8) [КАТИ И СИН](https://papagal.bg/eik/121788188/5c4d) [НИК-М](https://papagal.bg/eik/121051312/55d2) [ТИЙМ ФАКТОР](https://papagal.bg/eik/175241564/b6a7) [ОЛ - ВА ТЕКСТИЛ](https://papagal.bg/eik/109511207/262f) [ХЕРМЕС ЕКО](https://papagal.bg/eik/130533966/97cf) [АРИА МУВЪРС](https://papagal.bg/eik/200516684/dc46) [ЕВРОМАКС - 9](https://papagal.bg/eik/200581852/4486) [Е ЕН ДИ](https://papagal.bg/eik/200604440/1240)\n[ Следваща фирма ](https://papagal.bg/eik/200140132/4c34)\n2025, ПАПАГАЛ.БГ ООД, papagal.bg [За контакти](https://papagal.bg/contacts) | [Политика за поверителност](https://papagal.bg/pages/privacy-policy)\nДанните използвани в сайта са взети от [портала за отворени данни на Република България - egov.bg](https://data.egov.bg/) Последно обновяване на данните: 18.07.2025 \n",
"success": true
}
But when I deploy the docker container on Ubuntu 24.04.2 LTS and execute the same request I get a lot more content that includes the cookie popup. It is too long and I can't the whole response but here is a chunk of it:
{
"url": "https://papagal.bg/eik/200140125/b2d5",
"filter": "fit",
"query": null,
"cache": "0",
"markdown": "[ Български фирмен каталог ](https://papagal.bg/)\n[ Разширено търсене ](https://papagal.bg/advanced_search)\n 1. [ Начало](http://papagal.bg/)\n› › \n 2. [ Област София (столица)](http://papagal.bg/bg/1-sofiya-stolitsa)\n› \n 3. [ Община Столична](http://papagal.bg/bg/1-sofiya-stolitsa/1-stolichna)\n› \n 4. [ гр. София](http://papagal.bg/bg/1-sofiya-stolitsa/1-stolichna/1-sofiya)\n\n\n# 123-СПП ЕООД \n\nСтатус\n \nАктивен \n\nЕИК/ПИК\n 200140125 \n\nРегистрация по ЗДДС\n Да - BG200140125 от 30.07.2013 на основание друго от ЗДДС \n\nДата на регистрация\n 03.06.2008 15:48 \n\nНаименование\n 123-СПП \n\nТранслитерация\n 123-SPP \n\nОборот\n 713 000 лв. оборот за 2012 г. \n\nСлужители\n 9 служители към 2012 г. \n\nПравна форма\n Еднолично дружество с ограничена отговорност (ЕООД) \n\nСедалище адрес\n БЪЛГАРИЯ, гр. София, р-н Люлин, бл. 202, вх. Е, ет. 2 Има **42** фирми на този адрес [виж фирмите](https://papagal.bg/seat/1/5362/none/none/202/618) \n\nПредмет на дейност\n ТЪРГОВСКО ПРЕДСТАВИТЕЛСТВО И ПОСРЕДНИЧЕСТВО И АГЕНТСТВО НА МЕСТНИ И ЧУЖДЕСТРАННИ ЛИЦА; ПРОДАЖБА НА СТОКИ ОТ СОБСТВЕНО ПРОИЗВОДСТВО; ТЪРГОВИЯ С НЕДВИЖИМИ ИМОТИ; ВЪТРЕШЕН, ВЪТРЕШНООБЩНОСТЕН И МЕЖДУНА... ТЪРГОВСКО ПРЕДСТАВИТЕЛСТВО И ПОСРЕДНИЧЕСТВО И АГЕНТСТВО НА МЕСТНИ И ЧУЖДЕСТРАННИ ЛИЦА; ПРОДАЖБА НА СТОКИ ОТ СОБСТВЕНО ПРОИЗВОДСТВО; ТЪРГОВИЯ С НЕДВИЖИМИ ИМОТИ; ВЪТРЕШЕН, ВЪТРЕШНООБЩНОСТЕН И МЕЖДУНАРОДЕН ПРЕВОЗ НА ТОВАРИ С АВТОМОБИЛЕН ТРАНСПОРТ; СПЕДИЦИОННА, СКЛАДОВА ДЕЙНОСТ; ИНФОРМАЦИОННА, КОНСУЛТАНТСКА И РЕКЛАМНА ДЕЙНОСТ; ВНОС, ИЗНОС И РЕЕКСПОРТ НА СТОКИ; ТЪРГОВИЯ С ТОРОВЕ, ПРЕПАРАТИ И ДРУГИ СТОКИ ЗА ЗЕМЕДЕЛИЕТО; ОТДАВАНе ПА МПС-ТА ПОД НАЕМ, ОРГАНИЗАЦИЯ И ПОЛЗВАНЕ НА СКЛАДОВЕ ПОД МИТНИЧЕСКИ И ДАНЪЧЕН КОНТРОЛ, КАКТО И ВСЯКАКВИ ДРУГИ ДЕЙНОСТИ И УСЛУГИ, НЕЗАБРАНЕНИ СЪС ЗАКОН. [прочети още](javascript:;) [скрии](javascript:;) \n\nПредставляващи\n Управител: [ВАЛЕНТИН ИМРЕ ДУЗМАТ](https://papagal.bg/p/afbca812304e81764496deb2e7917cd6839ea1a91d522e2fb458ea3175bcc84d-1/dcc0) (свързан с 47 фирми) \n\nСобственост\n Едноличен собственик на капитала: [ВАЛЕНТИН ИМРЕ ДУЗМАТ](https://papagal.bg/p/afbca812304e81764496deb2e7917cd6839ea1a91d522e2fb458ea3175bcc84d-1/dcc0) (свързан с 47 фирми) \n\nКапитал размер\n 5 000 лева (3 500 лева внесен) \n### Дъщерни дружества\nНяма данни. \n### Финансови показатели\nГодина | Марж на печалбата \n---|--- \n2012 | 713 000 лв. \n2011 | 0 лв. \n### Служители\nГодина \n--- \n2012 \n### Мнения\nВсе още няма добавени мнения за тази фирма. \n### Резюме\nФирма 123-СПП ЕООД на латиница \"123-SPP\" с ЕИК/ПИК 200140125 е основана на 3 Юни 2008 година с правна форма \"Еднолично дружество с ограничена отговорност\" или на кратко \"ЕООД\". Седалището на компанията се намира в гр. София, а началният внесен капитал е в размер на 3 500 лева. Оборота на фирмата за 2012 година е в размер на 713 000 лв. \n### Хронология\n03.06.2008\n**Регистрация на фирмата**\n**Управител**\n[СТАНИСЛАВ ПАВЛОВ ПАСКАЛЕВ](https://papagal.bg/p/8981c66fa63bd4320e03695f761d951b1b9fbdd2c2bfe16dae2e2f361b3a9758-1/7218)\n**Едноличен собственик на капитала**\n[СТАНИСЛАВ ПАВЛОВ ПАСКАЛЕВ](https://papagal.bg/p/8981c66fa63bd4320e03695f761d951b1b9fbdd2c2bfe16dae2e2f361b3a9758-1/7218)\n08.03.2012\n**Промяна Управител**\n[СТАНИСЛАВ ПАВЛОВ ПАСКАЛЕВ](https://papagal.bg/p/8981c66fa63bd4320e03695f761d951b1b9fbdd2c2bfe16dae2e2f361b3a9758-1/7218)\n**Промяна Едноличен собственик на капитала**\n[СТАНИСЛАВ ПАВЛОВ ПАСКАЛЕВ](https://papagal.bg/p/8981c66fa63bd4320e03695f761d951b1b9fbdd2c2bfe16dae2e2f361b3a9758-1/7218)\n**Промяна предмет на дейност**\n30.07.2013\n**Регистрация по ЗДДС** Фирмата се регистрира по ЗДДС с номер BG200140125 на основание друго от ЗДДС \n### Свързани фирми\n[ЕЛ ИНСТАЛ](https://papagal.bg/eik/131415675/2825) [ХЮМЪН РИЛЕЙШЪНС КОНСУЛТИНГ](https://papagal.bg/eik/130970688/a01e) [МОНСУН КОФИ КЪМПАНИ](https://papagal.bg/eik/175203026/15e8) [КАТИ И СИН](https://papagal.bg/eik/121788188/5c4d) [НИК-М](https://papagal.bg/eik/121051312/55d2) [ТИЙМ ФАКТОР](https://papagal.bg/eik/175241564/b6a7) [ОЛ - ВА ТЕКСТИЛ](https://papagal.bg/eik/109511207/262f) [ХЕРМЕС ЕКО](https://papagal.bg/eik/130533966/97cf) [АРИА МУВЪРС](https://papagal.bg/eik/200516684/dc46) [ЕВРОМАКС - 9](https://papagal.bg/eik/200581852/4486) [Е ЕН ДИ](https://papagal.bg/eik/200604440/1240)\n[ Следваща фирма ](https://papagal.bg/eik/200140132/4c34)\n2025, ПАПАГАЛ.БГ ООД, papagal.bg [За контакти](https://papagal.bg/contacts) | [Политика за поверителност](https://papagal.bg/pages/privacy-policy)\nДанните използвани в сайта са взети от [портала за отворени данни на Република България - egov.bg](https://data.egov.bg/) Последно обновяване на данните: 18.07.2025 \n# Папагал.БГ asks for your consent to use your personal data to:\n * Personalised advertising and content, advertising and content measurement, audience research and services development\n * Store and/or access information on a device\n\n\nLearn more\n * [How can I change my choice?](https://papagal.bg/eik/200140125/b2d5)\n * [What if I don't consent?](https://papagal.bg/eik/200140125/b2d5)\n * [How does legitimate interest work?](https://papagal.bg/eik/200140125/b2d5)\n * [Do I have to consent to everything?](https://papagal.bg/eik/200140125/b2d5)\n\n\nYour personal data will be processed and information from your device (cookies, unique identifiers, and other device data) may be stored by, accessed by and shared with [142 TCF vendor(s) and 68 ad partner(s)](https://papagal.bg/eik/200140125/b2d5), or used specifically by this site or app.\nSome vendors may process your personal data on the basis of legitimate interest, which you can object to by managing your options below. Look for a link at the bottom of this page to manage or withdraw consent in privacy and cookie settings.\nConsent\nManage options\nData preferences\n# Manage your data\nYou can choose how your personal data is used. Vendors want your permission to do the following:\nTCF vendors\n## Store and/or access information on a device\nCookies, device or similar online identifiers (e.g. login-based identifiers, randomly assigned identifiers, network based identifiers) together with other information (e.g. browser type and information, language, screen size, supported technologies etc.) can be stored or read on your device to recognise it each time it connects to an app or to a website, for one or several of the purposes presented here.\n[View details](https://papagal.bg/eik/200140125/b2d5)\nConsent (122 vendors)\n## Use limited data to select advertising\nAdvertising presented to you on this service can be based on limited data, such as the website or app you are using, your non-precise location, your device type or which content you are (or have been) interacting with (for example, to limit the number of times an ad is presented to you).\n[View details](https://papagal.bg/eik/200140125/b2d5)\nConsent (76 vendors)Legitimate interest (39 vendors)\n## Create profiles for personalised advertising\nInformation about your activity on this service (such as forms you submit, content you look at) can be stored and combined with other information about you (for example, information from your previous activity on this service and other websites or apps) or similar users. This is then used to build or improve a profile about you (that might include possible interests and personal aspects). Your profile can be used (also later) to present advertising that appears more relevant based on your possible interests by this and other entities.\n[View details](https://papagal.bg/eik/200140125/b2d5)\nConsent (103 vendors)\n## Use profiles to select personalised advertising\nAdvertising presented to you on this service can be based on your advertising profiles, which can reflect your activity on this service or other websites or apps (like the forms you submit, content you look at), possible interests and personal aspects.\n[View details](https://papagal.bg/eik/200140125/b2d5)\nConsent (102 vendors)\n## Create profiles to personalise content\nInformation about your activity on this service (for instance, forms you submit, non-advertising content you look at) can be stored and combined with other information about you (such as your previous activity on this service or other websites or apps) or similar users. This is then used to build or improve a profile about you (which might for example include possible interests and personal aspects). Your profile can be used (also later) to present content that appears more relevant based on your possible interests, such as by adapting the order in which content is shown to you, so that it is even easier for you to find content that matches your interests.\n[View details](https://papagal.bg/eik/200140125/b2d5)\nConsent (29 vendors)\n## Use profiles to select personalised content\nContent presented to you on this service can be based on your content personalisation profiles, which can reflect your activity on this or other services (for instance, the forms you submit, content you look at), possible interests and personal aspects. This can for example be used to adapt the order in which content is shown to you, so that it is even easier for you to find (non-advertising) content that matches your interests.\n[View details]... <and continues>"
"success": true
}
This behaviour is being reproduced 100% of the time both on MacOS and Ubuntu.
Is this reproducible?
Yes
Inputs Causing the Bug
- Endpoint: `/md`
- URL: https://papagal.bg/eik/200140125/b2d5
- Request body: `{"url":"https://papagal.bg/eik/200140125/b2d5","f":"fit","q":null,"c":"0"}`
Steps to Reproduce
1. Deploy the latest docker image on MacOS and Linux
2. Try to generate markdown using the `/md` endpoint, the default settings and the following URL: https://papagal.bg/eik/200140125/b2d5
3. Observe that the response on MacOS is clean without cookie pop up content.
4. Observe that the response on Linux contains 20 times more content and adds the cookie pop up noise.
Code snippets
OS
macOS and Linux
Python version
3.12.11
Browser
No response
Browser version
No response
Error logs & Screenshots (if applicable)
No response
@snaksa What you're seeing is likely not a bug in crawl4ai itself, but a case of inconsistent site behaviour depending on how the site detects the environment. Even though both your Mac and Ubuntu setups are running the same Docker image, the difference in responses (i.e., cookie popup content appearing only on Ubuntu) can happen due to one or more of the following reasons:
-
User-Agent or Platform Detection Some websites dynamically show or suppress cookie banners based on the User-Agent string or platform indicators. If Chromium inside the container on Ubuntu reports a slightly different platform than on macOS, the site might decide to show the cookie popup only in one case.
-
Different Browser Profiles or Extensions Even with the same Docker image, small differences in Chromium build, profile config, or extensions can cause different renderings or responses.
-
GeoIP or Network-Based Behavior Some consent platforms only show cookie banners to users in specific regions (like under GDPR). If the machines are on different networks or using VPNs, the IP geolocation could cause different behavior.
✅ Suggested Fixes and Workarounds
To ensure consistent behavior across environments:
- Standardize the User-Agent Force the browser to use a fixed User-Agent string: Check how to pass it to the crawler herehere
- Write a js code snippet to dismiss the banner, if it exists in DOM. Pass this to the crawler via js_code in the CrawlerRunConfig. Crawler basically will execute this code before it proceeds to scrape the page, therefore remove DOM from the page
- Create a browser profile in which you have dismissed the cookie setting, then pass that browser profile via browser config.
If you still face issue with this, come over to the office hours on our discord server every Wednesday 3:30PM IST. I'll be around to help you.