#Third-party cookie will be blocked. Learn more in the Issues tab.

24 messages · Page 1 of 1 (latest)

near bronze
#

I doing an app: headless CMS (astro + wordpress) and try setting render on demand because I don't wanna to rebuildin the whole app when user add sources to wordpress.

So I do the astro.config:

import { defineConfig } from 'astro/config';
import node from '@astrojs/node';

export default defineConfig({
 output: 'server', 
 adapter: node({
    mode: 'standalone'
 }),
});

And after this, when I launch the app it very slow and have this error in console log in devtools:
Third-party cookie will be blocked. Learn more in the Issues tab.
When I click on this issue I see:
No resource with given identifier found
The site will finally start but it is not acceptable to use this in production.

Anybody can help and explain me what happen? what I do wrong?

#

On every page file I import the asynchronous function from API which one doing fetch to download the content from Wordpress

#
import { musicContent } from "../lib/api";
...
const data = await musicContent();
near bronze
#

I check this error appears also in static mode (without that astro config)

near bronze
#
Google for Developers

Jeśli Twoja witryna korzysta z plików cookie innych firm, to dobry moment na podjęcie działań, gdy zbliżamy się do wycofania tych plików. Aby ułatwić testowanie, od 4 stycznia 2024 r. Chrome ograniczył stosowanie plików cookie innych firm u 1% użytkowników. Od III kwartału 2024 r. Chrome zamierza rozszerzyć ograniczenia dotyczące plików cookie i...

#

I use youtube links to render video

#

for 2 ways:

#
  1. in video element
#
  1. in iframe element
#

I changing YouTubeIframeTemplate.js to:

export default function YouTubeIframeTemplate(link){
 // replace 'youtube.com' on 'youtube-nocookie.com' in link
 const noCookieLink = link.replace('youtube.com', 'youtube-nocookie.com');
 return `<iframe class="test" style="position:absolute;top:0;left:5%;width:90%;height:100%;" height="315" src="${noCookieLink}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>`
}
#

because I ask AI and it said me to modify the link to youtube-nocookie, but the error still apperars

near bronze
#

I try to dockerize astro app

#

I do exactly the same liki in this instructions

#

Dockerfile

FROM node:lts AS runtime
WORKDIR /app

COPY . .

RUN npm install
RUN npm run build

ENV HOST=0.0.0.0
ENV PORT=4321
EXPOSE 4321
CMD node ./dist/server/entry.mjs`
#
docker build -t astro .
#
docker run -p 4321:4321 astro