phanpy icon indicating copy to clipboard operation
phanpy copied to clipboard

Cross origin request blocked

Open elpamplina opened this issue 7 months ago • 5 comments

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 avatar May 16 '25 07:05 elpamplina

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

elpamplina avatar May 16 '25 16:05 elpamplina

@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.

cheeaun avatar May 17 '25 00:05 cheeaun

I'm having the same issue, with Phanpy and Elk (https://github.com/elk-zone/elk/issues/3186), on LibreWolf 138.

cairobraga avatar May 17 '25 16:05 cairobraga

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 avatar May 19 '25 16:05 elpamplina

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.

elpamplina avatar May 23 '25 07:05 elpamplina