Skip to content

Cross origin request blocked #1153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
elpamplina opened this issue May 16, 2025 · 5 comments
Open

Cross origin request blocked #1153

elpamplina opened this issue May 16, 2025 · 5 comments
Labels
bug Something isn't working need investigation

Comments

@elpamplina
Copy link

Site

phanpy.social

Version

2025.04.28.5849b4d

Instance

masto.es

Browser

  • Firefox 138.0.1 (64-bit) (spanish)
  • Linux Mint Debian Edition (faye)
  • Cinnamon 6.4.8

Bug description

Since yesterday (May 15), Phanpy can't load anything. Raises errors in the browser console:

Solicitud de origen cruzado bloqueada: La política de mismo origen no permite la lectura de recursos remotos en https://beacon.min.js/. (Razón: Solicitud CORS sin éxito). Código de estado: (null).

La URI de origen del <script> no está permitida en este docuento: "https://beacon.min.js/". [phanpy.social:92:316](https://phanpy.social/?code=GI8larqYLrdO2uZNXN5tK4kEb4sR8_TTwB_V-8J0glo)
Solicitud de origen cruzado bloqueada: La política de mismo origen no permite la lectura de recursos remotos en https://masto.es/api/v1/preferences. (Razón: Solicitud CORS sin éxito). Código de estado: (null).

Solicitud de origen cruzado bloqueada: La política de mismo origen no permite la lectura de recursos remotos en https://masto.es/api/v2/instance. (Razón: Solicitud CORS sin éxito). Código de estado: (null).

Solicitud de origen cruzado bloqueada: La política de mismo origen no permite la lectura de recursos remotos en https://masto.es/api/v1/accounts/verify_credentials. (Razón: Solicitud CORS sin éxito). Código de estado: (null).

Solicitud de origen cruzado bloqueada: La política de mismo origen no permite la lectura de recursos remotos en https://masto.es/api/v1/instance. (Razón: Solicitud CORS sin éxito). Código de estado: (null).


I tried to delete cookies and storage, but same problem persist.

To reproduce

No response

Expected behavior

No response

Other

No response

@elpamplina elpamplina added the bug Something isn't working label May 16, 2025
@elpamplina
Copy link
Author

Update:
I tried it on Firefox 138.0.3 on Windows 10, and get a lot of errors in console, but this time app seems to work fine. The messages are loaded.

Solicitud de origen cruzado bloqueada: La política de mismo origen no permite la lectura de recursos remotos en https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015. (Razón: Solicitud CORS sin éxito). Código de estado: (null).
Ninguno de los hashes “sha512” en el atributo integrity coincide con el contenido del subrecurso “https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015”. El hash calculado es “z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==”. phanpy.social
GET
wss://masto.es/api/v1/streaming
NS_ERROR_WEBSOCKET_CONNECTION_REFUSED

Fallo al cargar 'https://masto.es/system/cache/accounts/avatars/114/174/034/016/913/382/original/db9ac8db5b53f1e4.jpeg'. Un ServiceWorker ha pasado un promise a FetchEvent.respondWith() que lo ha rechazado con 'Error: no-response :: [{"url":"https://masto.es/system/cache/accounts/avatars/114/174/034/016/913/382/original/db9ac8db5b53f1e4.jpeg","error":{}}]'. sw.js:1:185
Solicitud de origen cruzado bloqueada: La política de mismo origen no permite la lectura de recursos remotos en https://masto.es/system/cache/accounts/avatars/114/174/034/016/913/382/original/db9ac8db5b53f1e4.jpeg. (Razón: Solicitud CORS sin éxito). Código de estado: (null).
Fallo al cargar 'https://masto.es/system/cache/accounts/avatars/109/333/219/130/174/288/original/14e350d642e0b4f5.png'. Un ServiceWorker ha pasado un promise a FetchEvent.respondWith() que lo ha rechazado con 'Error: no-response :: [{"url":"https://masto.es/system/cache/accounts/avatars/109/333/219/130/174/288/original/14e350d642e0b4f5.png","error":{}}]'. sw.js:1:185
Solicitud de origen cruzado bloqueada: La política de mismo origen no permite la lectura de recursos remotos en https://masto.es/system/cache/accounts/avatars/109/333/219/130/174/288/original/14e350d642e0b4f5.png. (Razón: Solicitud CORS sin éxito). Código de estado: (null).
Firefox no puede establecer una conexión con el servidor en wss://masto.es/api/v1/streaming. useTitle-Ca7e4SsU.js:45:31232
WebSocket error: 
error { target: WebSocket, isTrusted: true, srcElement: WebSocket, currentTarget: WebSocket, eventPhase: 2, bubbles: false, cancelable: false, returnValue: true, defaultPrevented: false, composed: false, … }
useTitle-Ca7e4SsU.js:45:42067
💬 DETECTLANG TINYLD 
Array [ "en" ]
ScheduledAtField-Da890CRx.js:153:1829
GET
wss://masto.es/api/v1/streaming
NS_ERROR_WEBSOCKET_CONNECTION_REFUSED

Firefox no puede establecer una conexión con el servidor en wss://masto.es/api/v1/streaming. useTitle-Ca7e4SsU.js:45:31232
WebSocket error: 
error { target: WebSocket, isTrusted: true, srcElement: WebSocket, currentTarget: WebSocket, eventPhase: 2, bubbles: false, cancelable: false, returnValue: true, defaultPrevented: false, composed: false, … }
useTitle-Ca7e4SsU.js:45:42067
GET
wss://masto.es/api/v1/streaming
NS_ERROR_WEBSOCKET_CONNECTION_REFUSED

Firefox no puede establecer una conexión con el servidor en wss://masto.es/api/v1/streaming. useTitle-Ca7e4SsU.js:45:31232
WebSocket error: 
error { target: WebSocket, isTrusted: true, srcElement: WebSocket, currentTarget: WebSocket, eventPhase: 2, bubbles: false, cancelable: false, returnValue: true, defaultPrevented: false, composed: false, … }
useTitle-Ca7e4SsU.js:45:42067
XHRGET
https://masto.es/api/v1/push/subscription
[HTTP/3 404  93ms]

GET
wss://masto.es/api/v1/streaming
NS_ERROR_WEBSOCKET_CONNECTION_REFUSED

Firefox no puede establecer una conexión con el servidor en wss://masto.es/api/v1/streaming. useTitle-Ca7e4SsU.js:45:31232
WebSocket error: 
error { target: WebSocket, isTrusted: true, srcElement: WebSocket, currentTarget: WebSocket, eventPhase: 2, bubbles: false, cancelable: false, returnValue: true, defaultPrevented: false, composed: false, … }
useTitle-Ca7e4SsU.js:45:42067
GET
wss://masto.es/api/v1/streaming
NS_ERROR_WEBSOCKET_CONNECTION_REFUSED

Firefox no puede establecer una conexión con el servidor en wss://masto.es/api/v1/streaming. useTitle-Ca7e4SsU.js:45:31232
WebSocket error: 
error { target: WebSocket, isTrusted: true, srcElement: WebSocket, currentTarget: WebSocket, eventPhase: 2, bubbles: false, cancelable: false, returnValue: true, defaultPrevented: false, composed: false, … }
useTitle-Ca7e4SsU.js:45:42067

@cheeaun
Copy link
Owner

cheeaun commented May 17, 2025

@elpamplina there's no way to fix this on Phanpy's side (or any client-side web apps) unfortunately 😔

There are few possible scenarios:

  • masto.es was temporarily down, CORS headers were missing and Firefox cached the no-CORS responses
  • your network connection had some issues, the responses didn't have CORS, Firefox cached them again
  • your network (VPN, router, ISP) had issues, accidentally/temporarily strip off the CORS headers from masto.es, Firefox can't see them

If it works for you now, that's great — Firefox and most browsers will clear CORS cache at some point and re-request.

If there are still random issues, try clear the site's cache in Firefox.

@cairobraga
Copy link

cairobraga commented May 17, 2025

I'm having the same issue, with Phanpy and Elk (elk-zone/elk#3186), on LibreWolf 138.

@elpamplina
Copy link
Author

I've tested it on two differents ISPs on Linux and Windows, Firefox and Chrome.

The console errors raised in all scenarios, but with ISP1 the app doesn't work anymore, and with ISP2 app works despite console errors. So you're right that there's an ISP issue in it.

I attach a screen capture of Phanpy running in Chrome on Windows 10, showing console with 49 errors. Errors count increments as I scroll over messages.

Image

@elpamplina
Copy link
Author

I've tested all again, and now the app works in both ISPs, although the console errors still raise. I think it's a (very strange) network issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need investigation
Projects
None yet
Development

No branches or pull requests

3 participants