Skip to content
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

Blank Screen when accessing one (out of three) clusters #4018

Closed
darkpixel opened this issue Oct 12, 2021 · 45 comments
Closed

Blank Screen when accessing one (out of three) clusters #4018

darkpixel opened this issue Oct 12, 2021 · 45 comments
Assignees
Labels
blocker bug Something isn't working
Milestone

Comments

@darkpixel
Copy link

I have 3 clusters on Digital Ocean under various accounts.
I have always been able to connect to them with Lens.
About a week ago, I suddenly couldn't connect to one of the clusters.
I've tried deleting and re-adding the config in kubectl, I've tried deleting and re-adding it to Lens.
I just get a blank screen. kubectl works fine, it's just Lens that isn't showing anything.
Lens has no trouble with the other clusters. They are all running the same version.

Here's a screenshot of Lens and the terminal I launched it from when I try to connect to the cluster that Lens is having issues with:

Screenshot from 2021-10-12 09-42-00

  • Lens Version: 5.2.5
  • OS: Linux (Mint)
  • Installation method (e.g. snap or AppImage in Linux): AppImage
apiVersion: v1                                                                                                          
clusters:                                                                                                               
- cluster:                                                                                                              
    certificate-authority-data: --redacted--
    server: https://--redacted--.k8s.ondigitalocean.com                                         
  name: do-sfo2-aaronkube                                                                                               
- cluster:                                                                                                              
    certificate-authority-data: --redacted--
    server: https://--redacted--.k8s.ondigitalocean.com                                         
  name: do-sfo2-caitkube                                                                                                
- cluster:                                                                                                              
    certificate-authority-data: --redacted--
    server: https://--redacted--.k8s.ondigitalocean.com                                         
  name: do-sfo3-personalkube                                                                                            
contexts:                                                                                                               
- context:                                                                                                              
    cluster: do-sfo2-aaronkube                                                                                          
    user: do-sfo2-aaronkube-admin                                                                                       
  name: do-sfo2-aaronkube                                                                                               
- context:                                                                                                              
    cluster: do-sfo2-caitkube                                                                                           
    user: do-sfo2-caitkube-admin                                                                                        
  name: do-sfo2-caitkube                                                                                                
- context:                                                                                                              
    cluster: do-sfo3-personalkube                                                                                       
    user: do-sfo3-personalkube-admin                                                                                    
  name: do-sfo3-personalkube                                                                                            
current-context: do-sfo2-aaronkube                                                                                      
kind: Config                                                                                                            
preferences: {}                                                                                                         
users:                                                                                                                  
- name: do-sfo2-aaronkube-admin                                                                                         
  user:                                                                                                                 
    exec:                                                                                                               
      apiVersion: client.authentication.k8s.io/v1beta1                                                                  
      args:                                                                                                             
      - kubernetes                                                                                                      
      - cluster                                                                                                         
      - kubeconfig                                                                                                      
      - exec-credential                                                                                                 
      - --version=v1beta1                                                                                               
      - --context=cait                                                                                                  
      - 28472d7b-cac9-4eb7-redacted
      command: doctl                                                                                                    
      env: null                                                                                                         
      provideClusterInfo: false                                                                                         
- name: do-sfo2-caitkube-admin                                                                                          
  user:                                                                                                                 
    exec:                                                                                                               
      apiVersion: client.authentication.k8s.io/v1beta1                                                                  
      args:                                                                                                             
      - kubernetes                                                                                                      
      - cluster                                                                                                         
      - kubeconfig                                                                                                      
      - exec-credential                                                                                                 
      - --version=v1beta1                                                                                               
      - --context=cait                                                                                                  
      - 016d3b15-5806-4f83-8921-redacted
      command: doctl                                                                                                    
      env: null                                                                                                         
      provideClusterInfo: false                                                                                         
- name: do-sfo2-redactedkube-admin                                                                                        
  user:                                                                                                                 
    token: --redacted--
- name: do-sfo3-personalkube-admin                                                                                      
  user:                                                                                                                 
    exec:                                                                                                               
      apiVersion: client.authentication.k8s.io/v1beta1                                                                  
      args:                                                                                                             
      - kubernetes                                                                                                      
      - cluster                                                                                                         
      - kubeconfig                                                                                                      
      - exec-credential                                                                                                 
      - --version=v1beta1                                                                                               
      - --context=personal                                                                                              
      - 6f766a4d-2e46-4ca9-90c0-redacted
      command: doctl                                                                                                    
      env: null                                                                                                         
      provideClusterInfo: false                                                   

This is a screenshot of the developer console in Lens when it can't connect:
Screenshot from 2021-10-12 09-51-15

@liuzqt
Copy link

liuzqt commented Oct 13, 2021

having same issue in MacOS

Lens: 5.2.5-latest.20211001.2
Electron: 12.2.1
Chrome: 89.0.4389.128
Node: 14.16.0

@jbeaudoin11
Copy link

Same for me. Installed lens about 2 weeks ago. Worked well for a while and now i just can't use it. Tried to reinstall the app, remove and add the cluster, still not able to do anything with the app.

I'm on Linux, Zorin OS

Lens: 5.2.5-latest.20211001.2
Electron: 12.2.1
Chrome: 89.0.4389.128
Node: 14.16.0

@Nokel81
Copy link
Collaborator

Nokel81 commented Oct 13, 2021

If you turn off "Download kubectl binaries matching the Kubernetes cluster version" in preferences does this problem resolve itself?

@jbeaudoin11
Copy link

@Nokel81 No

@Nokel81
Copy link
Collaborator

Nokel81 commented Oct 13, 2021

You have to restart lens currently for that option to be picked up. Including the tray icon

@jbeaudoin11
Copy link

@Nokel81 Yeah, did restart, the problem doesn't look to be a the kubectl level. At least it's not between kubectl and the cluster. Might be between Lens and kubectl 🤷‍♂️.

@darkpixel
Copy link
Author

@Nokel81 Disabled "Download kubectl binaries matching the Kubernetes cluster version" in prefs, quit out of Lens, started it again. No change.

@jbeaudoin11
Copy link

Here is more details about the error message failed to send IPC message "renderer:cluster-id-of-active-view" to view "unknown=7"

Error: Could not call remote method send. Check that the method signature is correct. Underlying error: Object has been destroyed
Underlying stack: TypeError: Object has been destroyed
    at Object.b.send (electron/js2c/browser_init.js:161:2484)
    at /opt/Lens/resources/app.asar/node_modules/@electron/remote/dist/src/main/server.js:454:71
    at IpcMainImpl.<anonymous> (/opt/Lens/resources/app.asar/node_modules/@electron/remote/dist/src/main/server.js:313:27)
    at IpcMainImpl.emit (events.js:315:20)
    at IpcMainImpl.EventEmitter.emit (domain.js:467:12)
    at Object.<anonymous> (electron/js2c/browser_init.js:161:10374)
    at Object.emit (events.js:315:20)
    at Object.EventEmitter.emit (domain.js:467:12)
    at Object.emitter.emit (/opt/Lens/resources/app.asar/node_modules/@sentry/electron/dist/main/integrations/electron.js:63:25)

@Nokel81
Copy link
Collaborator

Nokel81 commented Oct 13, 2021

Yes thanks, that is a unrelated issue, sorry about the noise.

@Doraemoe
Copy link

Doraemoe commented Oct 14, 2021

I have the same problem. On mac, I need to delete ~/Library/Application Support/Lens/lens-local-storage* for it to work again.

@darkpixel
Copy link
Author

Thanks @Doraemoe--that worked for me. ~/.config/Lens on Linux.

@liuzqt
Copy link

liuzqt commented Oct 14, 2021

@Doraemoe also worked for me, thanks!

@phivid
Copy link

phivid commented Oct 14, 2021

Not here ... I needed to delete wider on my macbookpro: rm -rf ~/Library/Application\ Support/Lens/*

@jakolehm jakolehm added this to the 5.3.0 milestone Oct 18, 2021
@Nokel81 Nokel81 self-assigned this Oct 18, 2021
@Bezz242
Copy link

Bezz242 commented Oct 20, 2021

Hi all,

Having the same problem. @Doraemoe 's fix works for me. BUT IT IS REPETITIVE.

Cannot tell what causes it, but in many cases, I had a VPN (over which I reach out to Kubernetes with Lens) drop out. Reconnecting didn't fix the problem.

Could this be a cause?

Cheers, B.

@Nokel81
Copy link
Collaborator

Nokel81 commented Oct 20, 2021

Would you mind providing files under lens-local-storage? What OS are you on?

@Bezz242
Copy link

Bezz242 commented Oct 20, 2021

Hi @Nokel81,

I'm on MacOS, Big Sur 11.6.

For now, it's working and I don't have the contents anymore. Will provide them next time the problem occurs.

Cheers, B.

@Nokel81
Copy link
Collaborator

Nokel81 commented Oct 20, 2021

Okay thanks, the path will be ~/Library/Application Support/lens/lens-local-storage/, I am also interested in ~/Library/Application Support/lens/lens-cluster-store.json

@Bezz242
Copy link

Bezz242 commented Oct 21, 2021

Hi @Nokel81,

I turned the VPN off and on again, but that in itself did not cause the problem. Overnight, the computer fell into stand-by modus and the VPN timed out. Now I have the problem again.
I will send you the files you mentioned. I will use the mail in your profile, as I am not sureif there is any sensitive data in them.

@Nokel81
Copy link
Collaborator

Nokel81 commented Oct 21, 2021

Thanks for the information, I will investigate. Thanks for the information about when it occurred. I will delete your information once I am done.

@Nokel81
Copy link
Collaborator

Nokel81 commented Oct 21, 2021

@Bezz242 Thanks for the files but unfortunately they don't seem to have the cause... will continue investigating.

@liuzqt
Copy link

liuzqt commented Oct 21, 2021

@Nokel81 FYI this issue also occurs while I was using VPN, usually I left my laptop in stand-by mode over the night, and the next day this issue might happen, after VPN drop and reconnect (not sure it always happen everytime, I can make some observation later), the situation looks similar to what @Bezz242 was having.

And I'm running MacOS 10.15.6

I can send some file for your investigation, but is there some private channel I can share file?

@Nokel81
Copy link
Collaborator

Nokel81 commented Oct 21, 2021

My work email in smalton @ mirantis.com if that works for you

@liuzqt
Copy link

liuzqt commented Oct 21, 2021

@Nokel81 sent, thanks

@damour
Copy link

damour commented Oct 24, 2021

image
The same problem. Works fine after removing /lens-local-storage/ content.

@Nokel81
Copy link
Collaborator

Nokel81 commented Nov 15, 2021

Could people please try 5.3.0-alpha.11 from one of the following:

And see if the variety of fixes we have merged resolves this issue for people.

@larrywax
Copy link

Could people please try 5.3.0-alpha.11 from one of the following:

And see if the variety of fixes we have merged resolves this issue for people.

It seems to be working now!

@darkpixel
Copy link
Author

I only ran into the issue once. I was never able to reproduce it reliably, so I can't say that 5.3.0-alpha.11 fixed it or not.

@hugginsio
Copy link

hugginsio commented Nov 15, 2021

On launch of 5.3.0-alpha.11, I still experienced the issue. However, after deleting /lens-local-storage/*, I have not been able to reproduce the issue again.

@Nokel81
Copy link
Collaborator

Nokel81 commented Nov 19, 2021

@damour So you also have the problem that you seem to be missing some data for that pod-logs tab. Which would throw an UnhandledPromiseRejectionError. That should be fixed by #4376

@DerGut
Copy link

DerGut commented Nov 25, 2021

The latest beta seems to solve the issue I had in #4408

@pablodz
Copy link

pablodz commented Nov 25, 2021

same here

@Nokel81 Nokel81 modified the milestones: 5.3.0, 5.3.1, 5.3.2 Nov 25, 2021
@Nokel81
Copy link
Collaborator

Nokel81 commented Dec 1, 2021

I have found the cause of why this happens. It happens when we set state within a render function, thus causing react never to render anything and go into a hot loop before crashing on OOM.

#4376 should fix this for some of the cases, but I will need to do a thorough check in all of our components to make sure that we are not doing that anymore

@Nokel81 Nokel81 modified the milestones: 5.3.2, 5.3.3 Dec 2, 2021
@Nokel81 Nokel81 linked a pull request Dec 2, 2021 that will close this issue
@Nokel81 Nokel81 modified the milestones: 5.3.3, 5.3.4 Dec 9, 2021
@jim-docker jim-docker modified the milestones: 5.3.4, 5.3.5 Jan 20, 2022
@Nokel81
Copy link
Collaborator

Nokel81 commented Jan 24, 2022

Closing as this has been fixed in master.

@Nokel81 Nokel81 closed this as completed Jan 24, 2022
@Nokel81 Nokel81 modified the milestones: 5.3.5, 5.4.0 Jan 24, 2022
@pablodz
Copy link

pablodz commented Jan 24, 2022

Thanks @Nokel81

@ramyadmz
Copy link

command + r solved my issue.

@mahmoudhossam
Copy link

mahmoudhossam commented Feb 22, 2023

I'm still having this issue, with the following warnings in devtools:

[LENS-VIEW]: not initializing view; unknown clusterId="undefined"
__webpack_modules__.1246.BrowserConsole.log @ BrowserConsole.js:41

I've already tried clearing the whole ~/Library/Application Support/lens/ folder and unchecking the "Download kubectl binaries matching the Kubernetes cluster version" checkbox in preferences.

Cmd+R does solve the problem temporarily, but it resets my namespace selection and I have to do this every time I start up Lens which is quite annoying.

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

Successfully merging a pull request may close this issue.