NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.11k stars 14.15k forks source link

element-desktop window is blank #272843

Closed jluttine closed 11 months ago

jluttine commented 11 months ago

Describe the bug

After upgrading on nixos-unstable, element-desktop opens but the window is totally blank - just white.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Run element-desktop in the terminal.

It's possible that you need to have already signed in and used an older version of element desktop.

On terminal, I see the following output:

``` $ element-desktop /home/jluttine/.config/Element exists: yes /home/jluttine/.config/Riot exists: no [4581:1208/110154.863969:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files No update_base_url is defined: auto update is disabled Fetching translation json for locale: en_EN Changing application language to en-us Fetching translation json for locale: en-us Could not fetch translation json for locale: 'en-us' Error: Cannot find module './i18n/strings/en_US.json' Require stack: - /nix/store/lad0w66r4vxw5cgz4mk80zwvipvgzxws-element-desktop-1.11.50/share/element/electron/lib/language-helper.js - /nix/store/lad0w66r4vxw5cgz4mk80zwvipvgzxws-element-desktop-1.11.50/share/element/electron/lib/tray.js - /nix/store/lad0w66r4vxw5cgz4mk80zwvipvgzxws-element-desktop-1.11.50/share/element/electron/lib/settings.js - /nix/store/lad0w66r4vxw5cgz4mk80zwvipvgzxws-element-desktop-1.11.50/share/element/electron/lib/ipc.js - /nix/store/lad0w66r4vxw5cgz4mk80zwvipvgzxws-element-desktop-1.11.50/share/element/electron/lib/electron-main.js - /nix/store/52mgy3lkjv664sk1cnmvs2vr4azwqinm-electron-unwrapped-26.4.0/libexec/electron/resources/default_app.asar/main.js - at node:internal/modules/cjs/loader:1084:15 at Function._resolveFilename (node:electron/js2c/browser_init:2:117576) at node:internal/modules/cjs/loader:929:27 at Function._load (node:electron/js2c/asar_bundle:2:13327) at Module.require (node:internal/modules/cjs/loader:1150:19) at require (node:internal/modules/cjs/helpers:110:18) at AppLocalization.fetchTranslationJson (/nix/store/lad0w66r4vxw5cgz4mk80zwvipvgzxws-element-desktop-1.11.50/share/element/electron/lib/language-helper.js:86:20) at /nix/store/lad0w66r4vxw5cgz4mk80zwvipvgzxws-element-desktop-1.11.50/share/element/electron/lib/language-helper.js:99:39 at Array.filter () at AppLocalization.setAppLocale (/nix/store/lad0w66r4vxw5cgz4mk80zwvipvgzxws-element-desktop-1.11.50/share/element/electron/lib/language-helper.js:98:39) { code: 'MODULE_NOT_FOUND', requireStack: [ '/nix/store/lad0w66r4vxw5cgz4mk80zwvipvgzxws-element-desktop-1.11.50/share/element/electron/lib/language-helper.js', '/nix/store/lad0w66r4vxw5cgz4mk80zwvipvgzxws-element-desktop-1.11.50/share/element/electron/lib/tray.js', '/nix/store/lad0w66r4vxw5cgz4mk80zwvipvgzxws-element-desktop-1.11.50/share/element/electron/lib/settings.js', '/nix/store/lad0w66r4vxw5cgz4mk80zwvipvgzxws-element-desktop-1.11.50/share/element/electron/lib/ipc.js', '/nix/store/lad0w66r4vxw5cgz4mk80zwvipvgzxws-element-desktop-1.11.50/share/element/electron/lib/electron-main.js', '/nix/store/52mgy3lkjv664sk1cnmvs2vr4azwqinm-electron-unwrapped-26.4.0/libexec/electron/resources/default_app.asar/main.js', undefined ] } Resetting the UI components after locale change Resetting the UI components after locale change ```

While the window is open, the following message repeats in the terminal:

``` Errors: link failed but did not provide an info log [4614:1208/111100.941175:ERROR:shared_context_state.cc(83)] Skia shader compilation error ------------------------ // Vertex SKSL #extension GL_NV_shader_noperspective_interpolation: require uniform float4 sk_RTAdjust;uniform float2 uAtlasSizeInv_S0;in float2 inPosition;in half4 inColor;in ushort2 inTextureCoords;noperspective out float2 vTextureCoords_S0;flat out float vTexIndex_S0;noperspective out half4 vinColor_S0;void main() {// Primitive Processor BitmapText int texIdx = 0;float2 unormTexCoords = float2(inTextureCoords.x, inTextureCoords.y);vTextureCoords_S0 = unormTexCoords * uAtlasSizeInv_S0;vTexIndex_S0 = float(texIdx);vinColor_S0 = inColor;float2 _tmp_1_inPosition = inPosition;sk_Position = inPosition.xy01;} // Fragment SKSL #extension GL_NV_shader_noperspective_interpolation: require uniform sampler2D uTextureSampler_0_S0; noperspective in float2 vTextureCoords_S0;flat in float vTexIndex_S0;noperspective in half4 vinColor_S0;void main() {// Stage 0, BitmapText half4 outputColor_S0;outputColor_S0 = vinColor_S0;half4 texColor;{ texColor = sample(uTextureSampler_0_S0, vTextureCoords_S0).rrrr; }half4 outputCoverage_S0 = texColor;{ // Xfer Processor: Porter Duff sk_FragColor = outputColor_S0 * outputCoverage_S0;}} // Vertex GLSL #version 300 es #extension GL_NV_shader_noperspective_interpolation : require precision mediump float; precision mediump sampler2D; uniform highp vec4 sk_RTAdjust; uniform highp vec2 uAtlasSizeInv_S0; in highp vec2 inPosition; in mediump vec4 inColor; in mediump uvec2 inTextureCoords; noperspective out highp vec2 vTextureCoords_S0; flat out highp float vTexIndex_S0; noperspective out mediump vec4 vinColor_S0; void main() { highp int texIdx = 0; highp vec2 unormTexCoords = vec2(float(inTextureCoords.x), float(inTextureCoords.y)); vTextureCoords_S0 = unormTexCoords * uAtlasSizeInv_S0; vTexIndex_S0 = float(texIdx); vinColor_S0 = inColor; gl_Position = vec4(inPosition, 0.0, 1.0); gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w); } // Fragment GLSL #version 300 es #extension GL_NV_shader_noperspective_interpolation : require precision mediump float; precision mediump sampler2D; out mediump vec4 sk_FragColor; uniform sampler2D uTextureSampler_0_S0; noperspective in highp vec2 vTextureCoords_S0; flat in highp float vTexIndex_S0; noperspective in mediump vec4 vinColor_S0; void main() { mediump vec4 outputColor_S0 = vinColor_S0; mediump vec4 texColor = texture(uTextureSampler_0_S0, vTextureCoords_S0, -0.5).xxxx; mediump vec4 outputCoverage_S0 = texColor; { sk_FragColor = outputColor_S0 * outputCoverage_S0; } } Errors: link failed but did not provide an info log [4614:1208/111100.941799:ERROR:shared_context_state.cc(83)] Skia shader compilation error ------------------------ // Vertex SKSL #extension GL_NV_shader_noperspective_interpolation: require uniform float4 sk_RTAdjust;uniform float3x3 umatrix_S1_c0;in float2 inPosition;in half4 inColor;in float4 inCircleEdge;noperspective out float4 vinCircleEdge_S0;noperspective out half4 vinColor_S0;noperspective out float2 vTransformedCoords_3_S0;void main() {// Primitive Processor CircleGeometryProcessor vinCircleEdge_S0 = inCircleEdge;vinColor_S0 = inColor;float2 _tmp_0_inPosition = inPosition;float2 _tmp_2_inPosition = inPosition;sk_Position = _tmp_0_inPosition.xy01;{ vTransformedCoords_3_S0 = float3x2(umatrix_S1_c0) * _tmp_2_inPosition.xy1; } } // Fragment SKSL #extension GL_NV_shader_noperspective_interpolation: require uniform float3x3 umatrix_S1_c0;uniform sampler2D uTextureSampler_0_S1; noperspective in float4 vinCircleEdge_S0;noperspective in half4 vinColor_S0;noperspective in float2 vTransformedCoords_3_S0;half4 TextureEffect_S1_c0_c0(half4 _input) { return sample(uTextureSampler_0_S1, vTransformedCoords_3_S0);} half4 MatrixEffect_S1_c0(half4 _input) { return TextureEffect_S1_c0_c0(_input); } half4 DisableCoverageAsAlpha_S1(half4 _input) { _input = MatrixEffect_S1_c0(_input); half4 _tmp_0_inColor = _input; return half4(_input); } void main() {// Stage 0, CircleGeometryProcessor float4 circleEdge;circleEdge = vinCircleEdge_S0;half4 outputColor_S0;outputColor_S0 = vinColor_S0;float d = length(circleEdge.xy);half distanceToOuterEdge = half(circleEdge.z * (1.0 - d));half edgeAlpha = saturate(distanceToOuterEdge);half4 outputCoverage_S0 = half4(edgeAlpha);half4 output_S1;output_S1 = DisableCoverageAsAlpha_S1(outputColor_S0);{ // Xfer Processor: Porter Duff sk_FragColor = output_S1 * outputCoverage_S0;}} // Vertex GLSL #version 300 es #extension GL_NV_shader_noperspective_interpolation : require precision mediump float; precision mediump sampler2D; uniform highp vec4 sk_RTAdjust; uniform highp mat3 umatrix_S1_c0; in highp vec2 inPosition; in mediump vec4 inColor; in highp vec4 inCircleEdge; noperspective out highp vec4 vinCircleEdge_S0; noperspective out mediump vec4 vinColor_S0; noperspective out highp vec2 vTransformedCoords_3_S0; void main() { vinCircleEdge_S0 = inCircleEdge; vinColor_S0 = inColor; highp vec2 _tmp_0_inPosition = inPosition; highp vec2 _tmp_2_inPosition = inPosition; gl_Position = vec4(_tmp_0_inPosition, 0.0, 1.0); { vTransformedCoords_3_S0 = mat3x2(umatrix_S1_c0) * vec3(_tmp_2_inPosition, 1.0); } gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w); } // Fragment GLSL #version 300 es #extension GL_NV_shader_noperspective_interpolation : require precision mediump float; precision mediump sampler2D; out mediump vec4 sk_FragColor; uniform highp mat3 umatrix_S1_c0; uniform sampler2D uTextureSampler_0_S1; noperspective in highp vec4 vinCircleEdge_S0; noperspective in mediump vec4 vinColor_S0; noperspective in highp vec2 vTransformedCoords_3_S0; void main() { highp vec4 circleEdge = vinCircleEdge_S0; mediump vec4 outputColor_S0 = vinColor_S0; highp float d = length(circleEdge.xy); mediump float distanceToOuterEdge = circleEdge.z * (1.0 - d); mediump float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0); mediump vec4 outputCoverage_S0 = vec4(edgeAlpha); mediump vec4 _0_input = outputColor_S0; _0_input = texture(uTextureSampler_0_S1, vTransformedCoords_3_S0, -0.5); mediump vec4 output_S1 = _0_input; { sk_FragColor = output_S1 * outputCoverage_S0; } } ```

Expected behavior

Element desktop should show normal content in the window.

Screenshots

Additional context

Notify maintainers

Maintainers: @Ma27 @fadenb @mguentner @Ralith @sumnerevans @NickCao @dali99

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.4, NixOS, 24.05 (Uakari), 24.05.git.a54ab23b588a`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/etc/nixpkgs`

Add a :+1: reaction to issues you find important.

NickCao commented 11 months ago

Please check if this is due to https://github.com/NixOS/nixpkgs/issues/244742

jluttine commented 11 months ago

Ran these commands but it didn't help (the directories did exist and were removed):

$ rm ~/.config/chromium/GrShaderCache -rf
$ rm ~/.config/chromium/ShaderCache -rf
$ rm ~/.config/chromium/Default/GPUCache/ -rf
jluttine commented 11 months ago

And after that this command doesn't find anything anymore so I suppose everything relevant should be removed:

$ find ~ -name "GrShaderCache"
NickCao commented 11 months ago

It should be rm -rf ~/.config/Element/GPUCache, as in https://github.com/NixOS/nixpkgs/issues/244486#issuecomment-1643916313

jluttine commented 11 months ago

That fixed it, thanks!