- 
                Notifications
    You must be signed in to change notification settings 
- Fork 611
Open
Labels
Description
Summary
On the hello app, the 'Mapping Demo' causes an error that requires the entire page to be refreshed, changing the demo doesn't solve.
Steps to reproduce
See https://doc-hello.streamlit.app/ or https://docs.streamlit.io/get-started/tutorials/create-a-multipage-app
Chose 'Mapping Demo'.
Expected behavior:
The demo should be visible.
Actual behavior:
Error in console shows that
XHRGET https://api.mapbox.com/styles/v1/mapbox/light-v9?access_token=no-token
CORS Missing Allow Origin
Response body is not available to scripts (Reason: CORS Missing Allow Origin)
No response data available for this request
On the page, this is shown instead.
Shader Compilation Error in fragment gpu-aggregation-domain-fragment
   1: #version 300 es
   2: 
   3: // ----- PROLOGUE -------------------------
   4: 
   5: #define SHADER_TYPE_VERTEX
   6: 
   7: #define NVIDIA_GPU
   8: // Nvidia optimizes away the calculation necessary for emulated fp64
   9: #define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1
  10: 
  11: 
  12: 
  13: // ----- APPLICATION DEFINES -------------------------
  14: 
  15: #define NUM_DIMS 2
  16: #define NUM_CHANNELS 2
  17: #define SAMPLER_WIDTH 1024
  18: 
  19: 
  20: // ----- MODULE geometry ---------------
  21: 
  22: #define MODULE_GEOMETRY
  23: #define SMOOTH_EDGE_RADIUS 0.5
  24: 
  25: struct VertexGeometry {
  26:   vec4 position;
  27:   vec3 worldPosition;
  28:   vec3 worldPositionAlt;
  29:   vec3 normal;
  30:   vec2 uv;
  31:   vec3 pickingColor;
  32: } geometry = VertexGeometry(
  33:   vec4(0.0, 0.0, 1.0, 0.0),
  34:   vec3(0.0),
  35:   vec3(0.0),
  36:   vec3(0.0),
  37:   vec2(0.0),
  38:   vec3(0.0)
  39: );
  40: 
  41: // ----- MODULE aggregatorTransform ---------------
  42: 
  43: #define MODULE_AGGREGATORTRANSFORM
  44: uniform aggregatorTransformUniforms {
  45:   ivec4 binIdRange;
  46:   bvec3 isCount;
  47:   bvec3 isMean;
  48:   float naN;
  49: } aggregatorTransform;
  50: 
  51: // ----- MAIN SHADER SOURCE -------------------------
  52: 
  53: 
  54: void DECKGL_FILTER_SIZE(inout vec3 size, VertexGeometry geometry) {
  55: }
  56: void DECKGL_FILTER_GL_POSITION(inout vec4 position, VertexGeometry geometry) {
  57: }
  58: void DECKGL_FILTER_COLOR(inout vec4 color, VertexGeometry geometry) {
  59: }
  60: #define SHADER_NAME gpu-aggregation-domain-vertex
  61: 
  62: uniform sampler2D bins;
  63: 
  64: #if NUM_DIMS == 1
  65: out float binIds;
  66: #else
  67: out vec2 binIds;
  68: #endif
  69: 
  70: #if NUM_CHANNELS == 1
  71: flat out float values;
  72: #elif NUM_CHANNELS == 2
  73: flat out vec2 values;
  74: #else
  75: flat out vec3 values;
  76: #endif
  77: 
  78: const float NAN = intBitsToFloat(-1);
  79: 
  80: void main() {
  81:   int row = gl_VertexID / SAMPLER_WIDTH;
  82:   int col = gl_VertexID - row * SAMPLER_WIDTH;
  83:   vec4 weights = texelFetch(bins, ivec2(col, row), 0);
  84:   vec3 value3 = mix(
  85:     mix(weights.rgb, vec3(weights.a), aggregatorTransform.isCount),
  86:     weights.rgb / max(weights.a, 1.0),
  87:     aggregatorTransform.isMean
  88:   );
  89:   if (weights.a == 0.0) {
  90:     value3 = vec3(NAN);
  91:   }
  92: 
  93: #if NUM_DIMS == 1
  94:   binIds = float(gl_VertexID + aggregatorTransform.binIdRange.x);
  95: #else
  96:   int y = gl_VertexID / (aggregatorTransform.binIdRange.y - aggregatorTransform.binIdRange.x);
  97:   int x = gl_VertexID - y * (aggregatorTransform.binIdRange.y - aggregatorTransform.binIdRange.x);
  98:   binIds.y = float(y + aggregatorTransform.binIdRange.z);
  99:   binIds.x = float(x + aggregatorTransform.binIdRange.x);
 100: #endif
 101: 
 102: #if NUM_CHANNELS == 3
 103:   values = value3;
 104: #elif NUM_CHANNELS == 2
 105:   values = value3.xy;
 106: #else
 107:   values = value3.x;
 108: #endif
 109: 
 110:   gl_Position = vec4(0., 0., 0., 1.);
 111:   // This model renders into a 2x1 texture to obtain min and max simultaneously.
 112:   // See comments in fragment shader
 113:   gl_PointSize = 2.0;
 114: }
Translated Source
#version 150
#extension GL_ARB_explicit_attrib_location : require
layout(std140) uniform webgl_3904161b1e9671f{
  ivec4 webgl_d2e2a19a64293bbd;
  bvec3 webgl_9b654fc050ac2af9;
  bvec3 webgl_6cf504e7f8f693ac;
  float webgl_c2c164873d9d9a2e;
} webgl_25eddf4f3f68b4b1;
uniform sampler2D webgl_34366715d1e069f4;
out vec2 webgl_a36934639df838a0;
flat out vec2 webgl_19b312f042795e4d;
void main(){
  (gl_PointSize = 0.0);
  (gl_Position = vec4(0.0, 0.0, 0.0, 0.0));
  (webgl_19b312f042795e4d = vec2(0.0, 0.0));
  (webgl_a36934639df838a0 = vec2(0.0, 0.0));
  int webgl_48485d1fdc288126 = (gl_VertexID / 1024);
  int webgl_5a71a30409cd6bd6 = (gl_VertexID - (webgl_48485d1fdc288126 * 1024));
  vec4 webgl_d6afe43b4ef75be3 = texelFetch(webgl_34366715d1e069f4, ivec2(webgl_5a71a30409cd6bd6, webgl_48485d1fdc288126), 0);
  vec3 webgl_20ce1816b2b03900 = mix(mix(webgl_d6afe43b4ef75be3.xyz, vec3(webgl_d6afe43b4ef75be3.w), webgl_25eddf4f3f68b4b1.webgl_9b654fc050ac2af9), (webgl_d6afe43b4ef75be3.xyz / max(webgl_d6afe43b4ef75be3.w, 1.0)), webgl_25eddf4f3f68b4b1.webgl_6cf504e7f8f693ac);
  if ((webgl_d6afe43b4ef75be3.w == 0.0))
  {
    (webgl_20ce1816b2b03900 = vec3(uintBitsToFloat(4294967295u), uintBitsToFloat(4294967295u), uintBitsToFloat(4294967295u)));
  }
  int webgl_7d67e5119856dd1b = (gl_VertexID / (webgl_25eddf4f3f68b4b1.webgl_d2e2a19a64293bbd.y - webgl_25eddf4f3f68b4b1.webgl_d2e2a19a64293bbd.x));
  int webgl_350702f5a0424893 = (gl_VertexID - (webgl_7d67e5119856dd1b * (webgl_25eddf4f3f68b4b1.webgl_d2e2a19a64293bbd.y - webgl_25eddf4f3f68b4b1.webgl_d2e2a19a64293bbd.x)));
  (webgl_a36934639df838a0.y = float((webgl_7d67e5119856dd1b + webgl_25eddf4f3f68b4b1.webgl_d2e2a19a64293bbd.z)));
  (webgl_a36934639df838a0.x = float((webgl_350702f5a0424893 + webgl_25eddf4f3f68b4b1.webgl_d2e2a19a64293bbd.x)));
  (webgl_19b312f042795e4d = webgl_20ce1816b2b03900.xy);
  (gl_Position = vec4(0.0, 0.0, 0.0, 1.0));
  (gl_PointSize = 2.0);
}
   1: #version 300 es
   2: 
   3: // ----- PROLOGUE -------------------------
   4: 
   5: #define SHADER_TYPE_FRAGMENT
   6: 
   7: #define NVIDIA_GPU
   8: // Nvidia optimizes away the calculation necessary for emulated fp64
   9: #define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1
  10: 
  11: precision highp float;
  12: 
  13: 
  14: // ----- APPLICATION DEFINES -------------------------
  15: 
  16: #define NUM_DIMS 2
  17: #define NUM_CHANNELS 2
  18: #define SAMPLER_WIDTH 1024
  19: 
  20: 
  21: // ----- MODULE geometry ---------------
  22: 
  23: #define MODULE_GEOMETRY
  24: #define SMOOTH_EDGE_RADIUS 0.5
  25: 
  26: struct FragmentGeometry {
  27:   vec2 uv;
  28: } geometry;
  29: 
  30: float smoothedge(float edge, float x) {
  31:   return smoothstep(edge - SMOOTH_EDGE_RADIUS, edge + SMOOTH_EDGE_RADIUS, x);
  32: }
  33: 
  34: // ----- MODULE aggregatorTransform ---------------
  35: 
  36: #define MODULE_AGGREGATORTRANSFORM
  37: 
  38: // ----- MAIN SHADER SOURCE -------------------------
  39: 
  40: 
  41: void DECKGL_FILTER_COLOR(inout vec4 color, FragmentGeometry geometry) {
  42: }
  43: #define SHADER_NAME gpu-aggregation-domain-fragment
  44: 
  45: precision highp float;
  46: 
  47: #if NUM_CHANNELS == 1
  48: flat in float values;
  49: #elif NUM_CHANNELS == 2
  50: flat in vec2 values;
  51: #else
  52: flat in vec3 values;
  53: #endif
  54: 
  55: out vec4 fragColor;
  56: 
  57: void main() {
  58:   vec3 value3;
  59: #if NUM_CHANNELS == 3
  60:   value3 = values;
  61: #elif NUM_CHANNELS == 2
  62:   value3.xy = values;
  63: #else
  64:   value3.x = values;
  65: #endif
  66:   if (isnan(value3.x)) discard;
  67:   // This shader renders into a 2x1 texture with blending=max
  68:   // The left pixel yields the max value of each channel
  69:   // The right pixel yields the min value of each channel
  70:   if (gl_FragCoord.x < 1.0) {
  71:     fragColor = vec4(value3, 1.0);
  72:   } else {
  73:     fragColor = vec4(-value3, 1.0);
  74:   }
  75: }
Translated Source
#version 150
#extension GL_ARB_explicit_attrib_location : require
flat in vec2 webgl_19b312f042795e4d;
out vec4 webgl_e30b609a99317854;
void main(){
  (webgl_e30b609a99317854 = vec4(0.0, 0.0, 0.0, 0.0));
  vec3 webgl_20ce1816b2b03900 = vec3(0.0, 0.0, 0.0);
  (webgl_20ce1816b2b03900.xy = webgl_19b312f042795e4d);
<img width="1079" height="537" alt="Image" src="https://github.com/user-attachments/assets/866897c7-b430-4f53-b711-9facd9bfff91" />
  if (isnan(webgl_20ce1816b2b03900.x))
  {
    discard;
  }
  if ((gl_FragCoord.x < 1.0))
  {
    (webgl_e30b609a99317854 = vec4(webgl_20ce1816b2b03900, 1.0));
  }
  else
  {
    (webgl_e30b609a99317854 = vec4((-webgl_20ce1816b2b03900), 1.0));
  }
}
Debug info
- OS version: arch Linux
- Browser version: Firefox 142.0.1